]> granicus.if.org Git - python/commit
bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5503)
authorBarry Warsaw <barry@python.org>
Sat, 3 Feb 2018 00:49:25 +0000 (19:49 -0500)
committerGitHub <noreply@github.com>
Sat, 3 Feb 2018 00:49:25 +0000 (19:49 -0500)
commita23d30f64bd9c5655cfae7f359d4279c47f6cab3
treed31d8e14daf1cd7f464a2dc001f10c4a0a943265
parent2b5937ec0ae88cd0b4cc0c8534f21c435ee94662
bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5503)

* Make sure ``__spec__.loader`` matches ``__loader__`` for namespace packages.
* Make sure ``__spec__.origin` matches ``__file__`` for namespace packages.

https://bugs.python.org/issue32303
https://bugs.python.org/issue32305
(cherry picked from commit bbbcf8693b876daae4469765aa62f8924f39a7d2)

Co-authored-by: Barry Warsaw <barry@python.org>
Doc/library/importlib.rst
Lib/importlib/_bootstrap.py
Lib/importlib/_bootstrap_external.py
Lib/importlib/resources.py
Lib/test/test_importlib/test_api.py
Lib/test/test_importlib/test_namespace_pkgs.py
Misc/NEWS.d/next/Core and Builtins/2018-02-01-10-16-28.bpo-32303.VsvhSl.rst [new file with mode: 0644]
Misc/NEWS.d/next/Core and Builtins/2018-02-01-10-56-41.bpo-32305.dkU9Qa.rst [new file with mode: 0644]
Python/importlib.h
Python/importlib_external.h