Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confused deprecation in importlib.resources.abc #107352

Closed
serhiy-storchaka opened this issue Jul 27, 2023 · 3 comments
Closed

Confused deprecation in importlib.resources.abc #107352

serhiy-storchaka opened this issue Jul 27, 2023 · 3 comments
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes docs Documentation in the Doc dir topic-importlib

Comments

@serhiy-storchaka
Copy link
Member

In https://docs.python.org/3.12/library/importlib.resources.abc.html:

The documentation for importlib.resources.abc.Traversable says: "Deprecated since version 3.12, will be removed in version 3.14: Use importlib.resources.abc.Traversable instead."

The documentation for importlib.resources.abc.TraversableResources says: "Deprecated since version 3.12, will be removed in version 3.14: Use importlib.resources.abc.TraversableResources instead."

Why does it recommend to use the same deprecated class?

@serhiy-storchaka serhiy-storchaka added docs Documentation in the Doc dir topic-importlib 3.12 bugs and security fixes 3.13 bugs and security fixes labels Jul 27, 2023
@hugovk
Copy link
Member

hugovk commented Jul 27, 2023

Ah, this is a bug, the classes in importlib.abc have been deprecated, use the ones in importlib.resources.abc instead:

image

https://docs.python.org/3.12/whatsnew/3.12.html#pending-removal-in-python-3-14


The deprecations would need moving to:

https://docs.python.org/3.12/library/importlib.html#module-importlib.abc

However, the classes aren't actually documented there.

It doesn't seem worth fully documenting them, shall we add brief entries? The class title, and the deprecation note?

@AlexWaygood
Copy link
Member

Duplicate of #105189

@AlexWaygood AlexWaygood marked this as a duplicate of #105189 Jul 27, 2023
@AlexWaygood AlexWaygood closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2023
@serhiy-storchaka
Copy link
Member Author

It doesn't seem worth fully documenting them, shall we add brief entries? The class title, and the deprecation note?

Yes, I think it would be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes docs Documentation in the Doc dir topic-importlib
Projects
None yet
Development

No branches or pull requests

3 participants