Skip to content

[stdlib] Deprecate old functions - #14553

Merged
AlexWaygood merged 8 commits into
python:mainfrom
donbarbos:deprecate-many-attrs
Aug 10, 2025
Merged

AlexWaygood merged 8 commits into
python:mainfrom
donbarbos:deprecate-many-attrs

Conversation

@donbarbos

@donbarbos donbarbos commented Aug 10, 2025 •

Copy link
Copy Markdown
Contributor

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 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.

@AlexWaygood AlexWaygood 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.

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:

Comment thread stdlib/_frozen_importlib.pyi Resolved
Comment thread stdlib/_frozen_importlib.pyi Resolved
Comment thread stdlib/_frozen_importlib_external.pyi Resolved
Comment thread stdlib/_frozen_importlib_external.pyi Resolved
Comment thread stdlib/_frozen_importlib_external.pyi Resolved
Comment thread stdlib/inspect.pyi Resolved
Comment thread stdlib/pathlib/__init__.pyi Resolved
Comment thread stdlib/pkgutil.pyi Resolved
Comment thread stdlib/urllib/request.pyi Resolved
Comment thread stdlib/urllib/request.pyi Resolved
Comment thread stdlib/importlib/util.pyi Resolved
Comment thread stdlib/importlib/util.pyi Resolved
Comment thread stdlib/importlib/util.pyi Resolved
Comment thread stdlib/asyncio/trsock.pyi Resolved
Comment thread stdlib/asyncio/trsock.pyi Resolved

@AlexWaygood AlexWaygood 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.

Thanks!

@donbarbos

Copy link
Copy Markdown
Contributor Author

Thank you for review

@github-actions

Copy link
Copy Markdown
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
@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

2 participants