GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-65961: Stop setting `__package__` on modules by brettcannon · Pull Request #142055 · python/cpython

Conversation

@brettcannon

@brettcannon brettcannon commented Nov 28, 2025 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: update the import machinery to only use __spec__ #65961

📚 Documentation preview 📚: https://cpython-previews--142055.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@brettcannon
pythonGH-65961: Stop setting __package__ on modules
2726e68
@bedevere-app bedevere-app Bot mentioned this pull request Nov 28, 2025
update the import machinery to only use __spec__ #65961
Open
@brettcannon
Merge branch 'main' into __package__-optional
db6a65b
@brettcannon

brettcannon commented Nov 28, 2025

Copy link
Copy Markdown
Member Author

This is an alternative to #142046 which doesn't even support using __package__.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brettcannon

brettcannon commented Nov 28, 2025

Copy link
Copy Markdown
Member Author

This is a draft PR until either someone can tell me what's going on with test_capi or a rip the test out because I don't see how I'm causing the failure in either this PR and #142046 .

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brettcannon brettcannon mentioned this pull request Nov 28, 2025
GH-65961: Stop setting or using __package__ on modules #142046
Closed
brettcannon added 2 commits November 28, 2025 14:42
@brettcannon
Fix ref in NEWS entry
918ab36
@brettcannon
Merge branch '__package__-optional' of github.com:brettcannon/cpython…
2d559d8
… into __package__-optional
ncoghlan
ncoghlan approved these changes Nov 28, 2025
View reviewed changes

@ncoghlan ncoghlan left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just one minor cosmetic comment on the docs.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/reference/datamodel.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added the awaiting merge label Nov 28, 2025
@brettcannon @ncoghlan
Update Doc/reference/datamodel.rst
d02a8d5
Co-authored-by: Alyssa Coghlan <[email protected]>
@brettcannon

brettcannon commented Nov 28, 2025

Copy link
Copy Markdown
Member Author

Unfortunately it looks like pip didn't get the memo about this upcoming change: https://github.com/pypa/pip/blob/36987b0c31b97ffb9fb7949ded628e9a6b10c016/src/pip/__main__.py#L13

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brettcannon brettcannon closed this Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ncoghlan ncoghlan ncoghlan approved these changes
@pablogsal pablogsal Awaiting requested review from pablogsal pablogsal will be requested when the pull request is marked ready for review pablogsal is a code owner
@lysnikolaou lysnikolaou Awaiting requested review from lysnikolaou lysnikolaou will be requested when the pull request is marked ready for review lysnikolaou is a code owner
@ambv ambv Awaiting requested review from ambv ambv will be requested when the pull request is marked ready for review ambv is a code owner
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner will be requested when the pull request is marked ready for review AA-Turner is a code owner
@gaogaotiantian gaogaotiantian Awaiting requested review from gaogaotiantian gaogaotiantian will be requested when the pull request is marked ready for review gaogaotiantian is a code owner
@terryjreedy terryjreedy Awaiting requested review from terryjreedy terryjreedy will be requested when the pull request is marked ready for review terryjreedy is a code owner
@1st1 1st1 Awaiting requested review from 1st1 1st1 will be requested when the pull request is marked ready for review 1st1 is a code owner
@asvetlov asvetlov Awaiting requested review from asvetlov asvetlov will be requested when the pull request is marked ready for review asvetlov is a code owner
@kumaraditya303 kumaraditya303 Awaiting requested review from kumaraditya303 kumaraditya303 will be requested when the pull request is marked ready for review kumaraditya303 is a code owner
@willingc willingc Awaiting requested review from willingc willingc will be requested when the pull request is marked ready for review willingc is a code owner
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently will be requested when the pull request is marked ready for review ericsnowcurrently is a code owner
@FFY00 FFY00 Awaiting requested review from FFY00 FFY00 will be requested when the pull request is marked ready for review FFY00 is a code owner
@warsaw warsaw Awaiting requested review from warsaw warsaw will be requested when the pull request is marked ready for review warsaw is a code owner
@ZeroIntensity ZeroIntensity Awaiting requested review from ZeroIntensity ZeroIntensity will be requested when the pull request is marked ready for review ZeroIntensity is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting merge

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@brettcannon @ncoghlan
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.