]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-65961: Raise `DeprecationWarning` when `__package__` differs from `__spec__.parent...
authorBrett Cannon <brett@python.org>
Wed, 5 Oct 2022 22:00:45 +0000 (15:00 -0700)
committerGitHub <noreply@github.com>
Wed, 5 Oct 2022 22:00:45 +0000 (15:00 -0700)
commitc206e53bb726fa795d10cfb0e8d1d1a1a5d1aaa7
tree137f9ccf92283c7d33da6f7cf2b614ebcb9ea2c1
parent2016bc54a22b83d0ca9174b64257cc7bb67a0916
gh-65961: Raise `DeprecationWarning` when `__package__` differs from `__spec__.parent` (#97879)

Also remove `importlib.util.set_package()` which was already slated for removal.

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Doc/library/importlib.rst
Doc/reference/import.rst
Doc/whatsnew/3.12.rst
Lib/importlib/_bootstrap.py
Lib/importlib/util.py
Lib/test/test_importlib/import_/test___package__.py
Lib/test/test_importlib/test_util.py
Misc/NEWS.d/next/Core and Builtins/2022-10-05-00-37-27.gh-issue-65961.z0Ys0y.rst [new file with mode: 0644]
Python/import.c