FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-149609: Raise deprecation warnings for `abc.{abstractclassmethod,abstractstaticmethod,abstractproperty}` by sobolevn · Pull Request #149636 · python/cpython · GitHub

Repository navigation

gh-149609: Raise deprecation warnings for abc.{abstractclassmethod,abstractstaticmethod,abstractproperty} - #149636

Merged
sobolevn merged 8 commits into
python:mainfrom
sobolevn:issue-149609
May 31, 2026
Merged

sobolevn merged 8 commits into
python:mainfrom
sobolevn:issue-149609

Conversation

sobolevn commented May 10, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

read-the-docs-community Bot commented May 10, 2026 •
edited
Loading

Copy link
Copy Markdown

hugovk commented May 10, 2026

Copy link
Copy Markdown
Member

Any reason to rush removal after the min two years instead of the recommended five?

hugovk commented May 10, 2026

Copy link
Copy Markdown
Member

Please also list in the relevant pending-removal-in-3.x.rst in https://github.com/python/cpython/tree/main/Doc/deprecations

picnixz commented May 10, 2026

Copy link
Copy Markdown
Member

Any reason to rush removal after the min two years instead of the recommended five?

I think it's because they've been deprecated since 3.3. But as I said, IDEs still pick them up in the suggestion list but they would show them as deprecated sometimes (it's more an IDE issue here).

I'm in favor of having a 5 years deprecation because those could be still used and I think we should let people know that they don't need this pattern anymore.

Comment thread Doc/whatsnew/3.16.rst

sobolevn commented May 10, 2026 •
edited
Loading

Copy link
Copy Markdown
Member Author

Any reason to rush removal after the min two years instead of the recommended five?

I think that this is not a rush :)
They were deprecated for a decade now, many tools already mark them this way. Inluding IDEs, type checkers and linters.
There are known bugs that we can help prevent by not using the deprecated version.
Plus, it is easy to switch to a pure stdlib alternative.

If others strongly believe that 5 years is a must, then I can make the change :(

hugovk commented May 11, 2026

Copy link
Copy Markdown
Member

Searching the top 15k PyPI projects (from February) found 632 matching lines in 150 projects for @(abc\.)?abstract(classmethod|staticmethod|property).

GitHub finds 26.9k files.

I also recommend opening issues for Ruff and pyupgrade to rewrite these deprecations (we should do this more often!).

Copy link
Copy Markdown
Member Author

I opened a new issue for ruff: astral-sh/ruff#25105
And rescheduled the removal to 3.21: a lot of packages rely on it :(

hugovk left a comment

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks!

Copy link
Copy Markdown
Member Author

I will keep this open for some time to gain more potential comments :)

Copy link
Copy Markdown

Who can merge?

picnixz commented May 28, 2026

Copy link
Copy Markdown
Member

Maintainers (soblevn, hugovk or myself in this discussion) can merge when it's time.

Copy link
Copy Markdown

OK

Copy link
Copy Markdown
Member Author

Speaking of merging :)
I am setting an automerge for this, thanks everyone!

sobolevn enabled auto-merge (squash) May 31, 2026 06:59
sobolevn merged commit 90c1d86 into python:main May 31, 2026
52 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL