]> granicus.if.org Git - python/commit
[3.6] bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5504)
authorBarry Warsaw <barry@python.org>
Sat, 3 Feb 2018 04:21:14 +0000 (23:21 -0500)
committerGitHub <noreply@github.com>
Sat, 3 Feb 2018 04:21:14 +0000 (23:21 -0500)
commita71397fb6603d0fe673acd7765c74699cd28fe7b
treeb861446d1911d5861a98df799f209dc12893fa45
parent7e4cf8e95d2971ae0d5fb417152183070184293f
[3.6] bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5504)

* 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/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