| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…ger None Namespace packages _bootstrap.ModuleSpec.loader attributes are no longer `None` _after_ calling the importlib._bootstrap._init_module_attrs function. See: * https://stackoverflow.com/questions/52869541/namespace-package-spec-loader-and-loader-attributes-not-set-to-none * https://bugs.python.org/issue35181
There was a problem hiding this comment.
I'm going to approve this, since I think the logic is more right with your change. However, it makes me uncomfortable about the fragility of this code snippet, since it isn't tested. Clearly the buggy code wasn't found when the original change was made. Too bad we don't have doctests for the internal documentation.
Not your problem though, and thanks for your contribution!
Sorry, something went wrong.
|
I don't think we need a news item for this so I added the skip news label. Any objections? |
Sorry, something went wrong.
|
I agree on the skip news label. |
Sorry, something went wrong.
|
@warsaw: Please replace # with GH- in the commit message next time. Thanks! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The namespace package importlib._bootstrap.ModuleSpec.loader attribute is no longer None after calling the importlib._bootstrap._init_module_attrs function. But a namespace package can be detected with its importlib._bootstrap.ModuleSpec.origin attribute which is always None.
See https://stackoverflow.com/questions/52869541/namespace-package-spec-loader-and-loader-attributes-not-set-to-none
https://bugs.python.org/issue35181