8000 gh-65961: Raise `DeprecationWarning` when `__package__` differs from `__spec__.parent` by brettcannon · Pull Request #97879 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-65961: Raise DeprecationWarning when __package__ differs from __spec__.parent #97879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 5, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Misc/NEWS.d/next/Core and Builtins/2022-10-05-00-37-27.gh-issu…
…e-65961.z0Ys0y.rst

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
  • Loading branch information
brettcannon and ericsnowcurrently authored Oct 5, 2022
commit e4e2f26867302d544e5ba14c7985ced56c078144
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
When ``__package__`` is different than ``__spec__.parent``, raise a
``DeprecationWarning``.
``DeprecationWarning`` instead of ``ImportWarning``.

Also remove ``importlib.util.set_package()`` which was scheduled for
removal.
0