René's URL Explorer Experiment


Title: gh-65961: Raise `DeprecationWarning` when `__package__` differs from `__spec__.parent` by brettcannon · Pull Request #97879 · python/cpython · GitHub

Open Graph Title: gh-65961: Raise `DeprecationWarning` when `__package__` differs from `__spec__.parent` by brettcannon · Pull Request #97879 · python/cpython

X Title: gh-65961: Raise `DeprecationWarning` when `__package__` differs from `__spec__.parent` by brettcannon · Pull Request #97879 · python/cpython

Description: Also remove importlib.util.set_package() which was already slated for removal. Issue: gh-65961

Open Graph Description: Also remove importlib.util.set_package() which was already slated for removal. Issue: gh-65961

X Description: Also remove importlib.util.set_package() which was already slated for removal. Issue: gh-65961

Opengraph URL: https://github.com/python/cpython/pull/97879

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:a1cdbd7c-c552-4aef-ce22-db7dfb63f7a3
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8A62:861EA:184BDDF:209F26D:6969BE9F
html-safe-nonce80e3ab158cc92bffd755cbfb953156e09583b9c6bf1400405a9f6f0077834ba8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTYyOjg2MUVBOjE4NEJEREY6MjA5RjI2RDo2OTY5QkU5RiIsInZpc2l0b3JfaWQiOiIyOTU0MjU5NzE2OTIyNTIzMjk1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacbfdecd4979c3eaf14a9385d7d3e125866c2e21d96a043c037bf5eea85fd4d2c1
hovercard-subject-tagpull_request:1076665661
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/97879/files
twitter:imagehttps://avatars.githubusercontent.com/u/54418?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/54418?s=400&v=4
og:image:altAlso remove importlib.util.set_package() which was already slated for removal. Issue: gh-65961
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneacedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release83c08c21cdda978090dc44364b71aa5bc6dcea79
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/97879/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F97879%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F97879%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/97879/files
Reloadhttps://github.com/python/cpython/pull/97879/files
Reloadhttps://github.com/python/cpython/pull/97879/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/97879/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/97879/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
brettcannonhttps://github.com/brettcannon
python:mainhttps://github.com/python/cpython/tree/main
brettcannon:deprecate-__package__https://github.com/brettcannon/cpython/tree/deprecate-__package__
Conversation 10 https://github.com/python/cpython/pull/97879
Commits 6 https://github.com/python/cpython/pull/97879/commits
Checks 0 https://github.com/python/cpython/pull/97879/checks
Files changed https://github.com/python/cpython/pull/97879/files
Please reload this pagehttps://github.com/python/cpython/pull/97879/files
gh-65961: Raise DeprecationWarning when __package__ differs from __spec__.parent https://github.com/python/cpython/pull/97879/files#top
Show all changes 6 commits https://github.com/python/cpython/pull/97879/files
fa3ac86 gh-65961: Raise `DeprecationWarning` when `__package__` differs from … brettcannon Oct 5, 2022 https://github.com/python/cpython/pull/97879/commits/fa3ac866300de39a0d9d4706da3533fe9c21b1d2
a5bae06 Merge branch 'main' into deprecate-__package__ brettcannon Oct 5, 2022 https://github.com/python/cpython/pull/97879/commits/a5bae06b34c30bb1901fc6866fe2090cc75a08a6
380a20b List the removal of `__package__` in What's New brettcannon Oct 5, 2022 https://github.com/python/cpython/pull/97879/commits/380a20b36f92eeee4d92fff0eb9acae4fb58d7d1
820e677 Merge branch 'deprecate-__package__' of https://github.com/brettcanno… brettcannon Oct 5, 2022 https://github.com/python/cpython/pull/97879/commits/820e677ac8322d21f1a08a54449c192ea73fe2c1
e4e2f26 Update Misc/NEWS.d/next/Core and Builtins/2022-10-05-00-37-27.gh-issu… brettcannon Oct 5, 2022 https://github.com/python/cpython/pull/97879/commits/e4e2f26867302d544e5ba14c7985ced56c078144
cb558bd Make a strong recommendation to use `__spec__` brettcannon Oct 5, 2022 https://github.com/python/cpython/pull/97879/commits/cb558bd03447e68929c82a1a05f21d3e6bdd97af
Clear filters https://github.com/python/cpython/pull/97879/files
Please reload this pagehttps://github.com/python/cpython/pull/97879/files
Please reload this pagehttps://github.com/python/cpython/pull/97879/files
importlib.rst https://github.com/python/cpython/pull/97879/files#diff-023b9cd2ff76dd1b2a7117a363f1789d5d192c09d632872934b86e8d3fbe5f3e
import.rst https://github.com/python/cpython/pull/97879/files#diff-a691e0a2b6cd3161c948365aa7aa3f73719c0a77724240331f9ce03e1a816c1d
3.12.rst https://github.com/python/cpython/pull/97879/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
_bootstrap.py https://github.com/python/cpython/pull/97879/files#diff-dba786ae26d5505c4c367a93b1179c2f80f2433d983b84bacb9001fb552f0761
util.py https://github.com/python/cpython/pull/97879/files#diff-4073510b976f7ae092cf599af8fe8ceb187a0eba4579438667b7b5fc229ca6ac
test___package__.py https://github.com/python/cpython/pull/97879/files#diff-45d2f8112799f3ba56b8201548d84cfa70c2633d89f58508cf901f4fd1b46669
test_util.py https://github.com/python/cpython/pull/97879/files#diff-d13bfe3496112854fdea5b6b74909580ce3ee5d57a117b81d7726eea5a1b857f
2022-10-05-00-37-27.gh-issue-65961.z0Ys0y.rst https://github.com/python/cpython/pull/97879/files#diff-9627a7c32e51c17a215fa7a884a23d483b20f9b731a101ff3fd4ab88d338e704
import.c https://github.com/python/cpython/pull/97879/files#diff-28cfc3e2868980a79d93d2ebdc8747dcb9231f3dd7f2caef96e74107d1ea3bf3
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L260
Doc/library/importlib.rsthttps://github.com/python/cpython/pull/97879/files#diff-023b9cd2ff76dd1b2a7117a363f1789d5d192c09d632872934b86e8d3fbe5f3e
View file https://github.com/brettcannon/cpython/blob/cb558bd03447e68929c82a1a05f21d3e6bdd97af/Doc/library/importlib.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/97879/{{ revealButtonHref }}
https://github.com/python/cpython/pull/97879/files#diff-023b9cd2ff76dd1b2a7117a363f1789d5d192c09d632872934b86e8d3fbe5f3e
https://github.com/python/cpython/pull/97879/files#diff-023b9cd2ff76dd1b2a7117a363f1789d5d192c09d632872934b86e8d3fbe5f3e
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L260
Doc/reference/import.rsthttps://github.com/python/cpython/pull/97879/files#diff-a691e0a2b6cd3161c948365aa7aa3f73719c0a77724240331f9ce03e1a816c1d
View file https://github.com/brettcannon/cpython/blob/cb558bd03447e68929c82a1a05f21d3e6bdd97af/Doc/reference/import.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/97879/{{ revealButtonHref }}
https://github.com/python/cpython/pull/97879/files#diff-a691e0a2b6cd3161c948365aa7aa3f73719c0a77724240331f9ce03e1a816c1d
https://github.com/python/cpython/pull/97879/files#diff-a691e0a2b6cd3161c948365aa7aa3f73719c0a77724240331f9ce03e1a816c1d
https://github.com/python/cpython/pull/97879/files#diff-a691e0a2b6cd3161c948365aa7aa3f73719c0a77724240331f9ce03e1a816c1d
https://github.com/python/cpython/pull/97879/files#diff-a691e0a2b6cd3161c948365aa7aa3f73719c0a77724240331f9ce03e1a816c1d
Please reload this pagehttps://github.com/python/cpython/pull/97879/files
https://github.com/python/cpython/pull/97879/files#diff-a691e0a2b6cd3161c948365aa7aa3f73719c0a77724240331f9ce03e1a816c1d
https://github.com/python/cpython/pull/97879/files#diff-a691e0a2b6cd3161c948365aa7aa3f73719c0a77724240331f9ce03e1a816c1d
https://github.com/python/cpython/pull/97879/files#diff-a691e0a2b6cd3161c948365aa7aa3f73719c0a77724240331f9ce03e1a816c1d
https://github.com/python/cpython/pull/97879/files#diff-a691e0a2b6cd3161c948365aa7aa3f73719c0a77724240331f9ce03e1a816c1d
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L114
Doc/whatsnew/3.12.rsthttps://github.com/python/cpython/pull/97879/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
View file https://github.com/brettcannon/cpython/blob/cb558bd03447e68929c82a1a05f21d3e6bdd97af/Doc/whatsnew/3.12.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/97879/{{ revealButtonHref }}
https://github.com/python/cpython/pull/97879/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
https://github.com/python/cpython/pull/97879/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
https://github.com/python/cpython/pull/97879/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
https://github.com/python/cpython/pull/97879/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
https://github.com/python/cpython/pull/97879/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
https://github.com/python/cpython/pull/97879/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L260
Lib/importlib/_bootstrap.pyhttps://github.com/python/cpython/pull/97879/files#diff-dba786ae26d5505c4c367a93b1179c2f80f2433d983b84bacb9001fb552f0761
View file https://github.com/brettcannon/cpython/blob/cb558bd03447e68929c82a1a05f21d3e6bdd97af/Lib/importlib/_bootstrap.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/97879/{{ revealButtonHref }}
https://github.com/python/cpython/pull/97879/files#diff-dba786ae26d5505c4c367a93b1179c2f80f2433d983b84bacb9001fb552f0761
https://github.com/python/cpython/pull/97879/files#diff-dba786ae26d5505c4c367a93b1179c2f80f2433d983b84bacb9001fb552f0761
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L260
Lib/importlib/util.pyhttps://github.com/python/cpython/pull/97879/files#diff-4073510b976f7ae092cf599af8fe8ceb187a0eba4579438667b7b5fc229ca6ac
View file https://github.com/brettcannon/cpython/blob/cb558bd03447e68929c82a1a05f21d3e6bdd97af/Lib/importlib/util.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/97879/{{ revealButtonHref }}
https://github.com/python/cpython/pull/97879/files#diff-4073510b976f7ae092cf599af8fe8ceb187a0eba4579438667b7b5fc229ca6ac
https://github.com/python/cpython/pull/97879/files#diff-4073510b976f7ae092cf599af8fe8ceb187a0eba4579438667b7b5fc229ca6ac
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L260
Lib/test/test_importlib/import_/test___package__.pyhttps://github.com/python/cpython/pull/97879/files#diff-45d2f8112799f3ba56b8201548d84cfa70c2633d89f58508cf901f4fd1b46669
View file https://github.com/brettcannon/cpython/blob/cb558bd03447e68929c82a1a05f21d3e6bdd97af/Lib/test/test_importlib/import_/test___package__.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/97879/{{ revealButtonHref }}
https://github.com/python/cpython/pull/97879/files#diff-45d2f8112799f3ba56b8201548d84cfa70c2633d89f58508cf901f4fd1b46669
https://github.com/python/cpython/pull/97879/files#diff-45d2f8112799f3ba56b8201548d84cfa70c2633d89f58508cf901f4fd1b46669
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L260
Lib/test/test_importlib/test_util.pyhttps://github.com/python/cpython/pull/97879/files#diff-d13bfe3496112854fdea5b6b74909580ce3ee5d57a117b81d7726eea5a1b857f
View file https://github.com/brettcannon/cpython/blob/cb558bd03447e68929c82a1a05f21d3e6bdd97af/Lib/test/test_importlib/test_util.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/97879/{{ revealButtonHref }}
https://github.com/python/cpython/pull/97879/files#diff-d13bfe3496112854fdea5b6b74909580ce3ee5d57a117b81d7726eea5a1b857f
https://github.com/python/cpython/pull/97879/files#diff-d13bfe3496112854fdea5b6b74909580ce3ee5d57a117b81d7726eea5a1b857f
Misc/NEWS.d/next/Core and Builtins/2022-10-05-00-37-27.gh-issue-65961.z0Ys0y.rsthttps://github.com/python/cpython/pull/97879/files#diff-9627a7c32e51c17a215fa7a884a23d483b20f9b731a101ff3fd4ab88d338e704
View file https://github.com/brettcannon/cpython/blob/cb558bd03447e68929c82a1a05f21d3e6bdd97af/Misc/NEWS.d/next/Core%20and%20Builtins/2022-10-05-00-37-27.gh-issue-65961.z0Ys0y.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/97879/{{ revealButtonHref }}
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L261
Python/import.chttps://github.com/python/cpython/pull/97879/files#diff-28cfc3e2868980a79d93d2ebdc8747dcb9231f3dd7f2caef96e74107d1ea3bf3
View file https://github.com/brettcannon/cpython/blob/cb558bd03447e68929c82a1a05f21d3e6bdd97af/Python/import.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/97879/{{ revealButtonHref }}
https://github.com/python/cpython/pull/97879/files#diff-28cfc3e2868980a79d93d2ebdc8747dcb9231f3dd7f2caef96e74107d1ea3bf3
https://github.com/python/cpython/pull/97879/files#diff-28cfc3e2868980a79d93d2ebdc8747dcb9231f3dd7f2caef96e74107d1ea3bf3
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.