GH-65961: Stop setting `__package__` on modules by brettcannon · Pull Request #142055 · python/cpython · GitHub

github.com

Tin mới

brettcannon:__package__-optional

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

update the import machinery to only use __spec__ #65961

GH-65961: Stop setting `__package__` on modules

Merge branch 'main' into __package__-optional

GH-65961: Stop setting or using __package__ on modules #142046

Fix ref in NEWS entry

Merge branch '__package__-optional' of github.com:brettcannon/cpython…

View reviewed changes

Learn more about hiding disruptive comments

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

Update Doc/reference/datamodel.rst

https://github.com/pypa/pip/blob/36987b0c31b97ffb9fb7949ded628e9a6b10c016/src/pip/__main__.py#L13

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