Skip to content

GH-65961: Stop setting __package__ on modules - #142055

Closed
brettcannon wants to merge 5 commits into
python:mainfrom
brettcannon:__package__-optional
Closed

brettcannon wants to merge 5 commits into
python:mainfrom
brettcannon:__package__-optional

Conversation

@brettcannon

@brettcannon brettcannon commented Nov 28, 2025 •

Copy link
Copy Markdown
Member
@brettcannon

Copy link
Copy Markdown
Member Author

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

@brettcannon

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 .

@ncoghlan ncoghlan left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread Doc/reference/datamodel.rst Resolved
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
@brettcannon

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants