| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…func() (pythonGH-157387) A single-phase init function that creates its module using only the last component of a dotted name (as pybind11 does for submodules) got a module whose __name__ was the short name. Set the package context while calling the init function, as the dynamic loader does, so the module gets the full name from the spec. (cherry picked from commit 0486228) Co-authored-by: Itamar Oren <itamarost@gmail.com>
Documentation build overview140 files changed · + 1 added · ± 134 modified · - 5 deleted + Added ± Modified
- Deleted |
Sorry, something went wrong.
…nitfunc() Summary: Backport of the upstream fix (python/cpython#157387, 3.15 backport python/cpython#159316), folded into the `05-native-python-api` patch that carries our 3.14 backport of `PyImport_CreateModuleFromInitfunc`. A single-phase init function that creates its module using only the last component of a dotted name (as pybind11 2.13 does for `PYBIND11_MODULE` extensions inside a package) got a module whose `__name__` was the short name, so `def_submodule` registered submodules under the wrong `sys.modules` keys and `from pkg.ext.sub import x` failed with "`pkg.ext` is not a package". 571 failures in V66 of the py3.14 canary (D82323768) carry this signature. Reviewed By: alexmalyshev Differential Revision: D119701167 fbshipit-source-id: dc50c5ece93752c069548588545eee6526181cad
| Back | FazBrowse Home | New Git URL |
A single-phase init function that creates its module using only the
last component of a dotted name (as pybind11 does for submodules) got
a module whose name was the short name. Set the package context
while calling the init function, as the dynamic loader does, so the
module gets the full name from the spec.
(cherry picked from commit 0486228)
Co-authored-by: Itamar Oren itamarost@gmail.com