Skip to content

gh-150032: Tidy up 3.15 pending removals#149594

Merged
hugovk merged 11 commits into
python:mainfrom
StanFromIreland:deprecations
Jun 3, 2026
Merged

gh-150032: Tidy up 3.15 pending removals#149594
hugovk merged 11 commits into
python:mainfrom
StanFromIreland:deprecations

Conversation

@StanFromIreland
Copy link
Copy Markdown
Member

@StanFromIreland StanFromIreland commented May 9, 2026

This moves all the things we planned to remove in 3.15 but didn't to the appropriate pending removal in 3.16 file.

Additionally, move a misplaced entry from the 3.16 C-API removals file to the 3.16 main file removals.

@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented May 9, 2026

Copy link
Copy Markdown
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Thanks for updating this, and the 3.15->3.16 bumps should also be backported.

Comment thread Doc/deprecations/index.rst Outdated
Comment thread Doc/deprecations/c-api-pending-removal-in-3.16.rst
Copy link
Copy Markdown
Contributor

@willingc willingc left a comment

Choose a reason for hiding this comment

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

Comment thread Doc/deprecations/pending-removal-in-3.16.rst Outdated
Co-authored-by: Savannah Ostrowski <savannah@python.org>
Comment thread Doc/deprecations/pending-removal-in-3.16.rst Outdated
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@warsaw
Copy link
Copy Markdown
Member

warsaw commented May 10, 2026

We could still do it in 3.15 with @hugovk approval.

Comment thread Doc/deprecations/pending-removal-in-3.16.rst Outdated
Co-authored-by: Brett Cannon <brett@python.org>
@hugovk
Copy link
Copy Markdown
Member

hugovk commented May 12, 2026

We could still do it in 3.15 with @hugovk approval.

In recent release cycles, we've had feedback that it was too early to remove some things during pre/early alpha and added them back, so I'm a bit cautious about doing during beta.

But if someone wants to do so, please first check things like the top PyPI packages/GitHub/grep.app to get an idea if they're still too widely used, and maybe we can do it before b2.

Comment thread Doc/deprecations/c-api-pending-removal-in-3.15.rst
Comment thread Doc/deprecations/pending-removal-in-3.15.rst
Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM

@StanFromIreland StanFromIreland changed the title Tidy up 3.15 pending removals gh-150032: Tidy up 3.15 pending removals May 18, 2026
@StanFromIreland
Copy link
Copy Markdown
Member Author

This now has an issue: #150032

Copy link
Copy Markdown
Member

@savannahostrowski savannahostrowski left a comment

Choose a reason for hiding this comment

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

One question but otherwise, LGTM

Comment on lines +11 to +14
* Setting :attr:`~module.__package__` on a module while
failing to set :attr:`__spec__.parent <importlib.machinery.ModuleSpec.parent>`
is deprecated. In Python 3.16, :attr:`!__package__` will cease to be
taken into consideration by the import system or standard library. (:gh:`97879`)
Copy link
Copy Markdown
Member

@savannahostrowski savannahostrowski May 23, 2026

Choose a reason for hiding this comment

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

Suggested change
* Setting :attr:`~module.__package__` on a module while
failing to set :attr:`__spec__.parent <importlib.machinery.ModuleSpec.parent>`
is deprecated. In Python 3.16, :attr:`!__package__` will cease to be
taken into consideration by the import system or standard library. (:gh:`97879`)
* Setting :attr:`~module.__package__` on a module while
failing to set :attr:`__spec__.parent <importlib.machinery.ModuleSpec.parent>`
is deprecated. In Python 3.16, :attr:`!__package__` will cease to be set or
taken into consideration by the import system or standard library. (:gh:`97879`)

I'm not sure that the drop of "set or" was intentional here? It seems that the language changed from the 3.15 pending.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It was Brett's change: d4926e0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But why 🙂 ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm mainly curious because the __loader__ bullet directly above still uses "set or taken into consideration" language. To an end user the two phrasings probably don't really mean different things, either way the guidance is "stop relying on it", so the divergence between the two bullets reads as accidental.

Copy link
Copy Markdown
Member

@brettcannon brettcannon May 29, 2026

Choose a reason for hiding this comment

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

Because we tried to remove ever reading __package__ and pip broke. So we don't set in anymore in 3.15, but we are not at a place where we can stop reading it if gets set. As for __loader__, it's a different stage of going away.

@StanFromIreland
Copy link
Copy Markdown
Member Author

I'll leave this one for the RMs to merge.

@hugovk hugovk merged commit 7a468a1 into python:main Jun 3, 2026
32 checks passed
@hugovk
Copy link
Copy Markdown
Member

hugovk commented Jun 3, 2026

Thanks!

@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jun 3, 2026
@StanFromIreland StanFromIreland deleted the deprecations branch June 3, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants