Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[stdlib] Deprecate old functions#14553

Merged
AlexWaygood merged 8 commits intopython:mainpython/typeshed:mainfrom
donbarbos:deprecate-many-attrsdonbarbos/typeshed:deprecate-many-attrsCopy head branch name to clipboard
Aug 10, 2025
Merged

[stdlib] Deprecate old functions#14553
AlexWaygood merged 8 commits intopython:mainpython/typeshed:mainfrom
donbarbos:deprecate-many-attrsdonbarbos/typeshed:deprecate-many-attrsCopy head branch name to clipboard

Conversation

@donbarbos
Copy link
Contributor

@donbarbos donbarbos commented Aug 10, 2025

Next deprecations were found using grep version_info < and only if somewhere in docs or source code it was said that it was deprecated, I would add the @deprecated:

PS: I just want to clarify that I’m not aiming to mark every deprecated function, only the ones that seem most obvious. Also, for functions deprecated since 3.10, I don’t feel that adding sys.version_info check is necessary.

@donbarbos donbarbos changed the title [stdlib] Deprecate many functions [stdlib] Deprecate old functions Aug 10, 2025
@github-actions

This comment has been minimized.

@donbarbos donbarbos marked this pull request as ready for review August 10, 2025 17:49
@github-actions

This comment has been minimized.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Thanks, this is great! I really like that you took care to only add @deprecated for the Python versions where APIs actually caused a deprecation warning to be emitted at runtime. Just some nits about error messages:

stdlib/_frozen_importlib.pyi Outdated Show resolved Hide resolved
stdlib/_frozen_importlib.pyi Outdated Show resolved Hide resolved
stdlib/_frozen_importlib_external.pyi Outdated Show resolved Hide resolved
stdlib/_frozen_importlib_external.pyi Outdated Show resolved Hide resolved
stdlib/_frozen_importlib_external.pyi Outdated Show resolved Hide resolved
stdlib/inspect.pyi Outdated Show resolved Hide resolved
stdlib/pathlib/__init__.pyi Outdated Show resolved Hide resolved
stdlib/pkgutil.pyi Outdated Show resolved Hide resolved
stdlib/urllib/request.pyi Outdated Show resolved Hide resolved
stdlib/urllib/request.pyi Outdated Show resolved Hide resolved
stdlib/importlib/util.pyi Outdated Show resolved Hide resolved
stdlib/importlib/util.pyi Outdated Show resolved Hide resolved
stdlib/importlib/util.pyi Outdated Show resolved Hide resolved
stdlib/asyncio/trsock.pyi Outdated Show resolved Hide resolved
stdlib/asyncio/trsock.pyi Outdated Show resolved Hide resolved
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Thanks!

@donbarbos
Copy link
Contributor Author

Thank you for review

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@AlexWaygood AlexWaygood merged commit fb0940e into python:main Aug 10, 2025
63 checks passed
@donbarbos donbarbos deleted the deprecate-many-attrs branch February 25, 2026 04:05
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.