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

gh-93963: Officially deprecate abcs and warn about their usage. #93965

Merged
merged 5 commits into from
Jul 3, 2022

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Jun 17, 2022

@jaraco jaraco added the needs backport to 3.11 only security fixes label Jun 17, 2022
@jaraco jaraco force-pushed the gh-93963/deprecate-importlib-resources-abcs branch from 2064d07 to 7890672 Compare June 17, 2022 20:14
@jaraco jaraco force-pushed the gh-93963/deprecate-importlib-resources-abcs branch from 7890672 to 5e7fb9c Compare June 17, 2022 20:23
Lib/importlib/abc.py Outdated Show resolved Hide resolved
Co-authored-by: Thomas Grainger <[email protected]>
Copy link
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.

Please could you note the deprecations in https://docs.python.org/3.12/library/importlib.html with deprecated-removed?

and list under https://docs.python.org/3.12/whatsnew/3.12.html#pending-removal-in-python-3-13 ?

Lib/importlib/abc.py Outdated Show resolved Hide resolved
@hugovk
Copy link
Member

hugovk commented Jun 17, 2022

According to PEP 387, if these are being deprecated in 3.12, is 3.14 the earliest they can be removed?

Copy link
Member

@warsaw warsaw left a comment

Choose a reason for hiding this comment

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

Added some questions.

Lib/importlib/abc.py Show resolved Hide resolved
Lib/importlib/abc.py Outdated Show resolved Hide resolved
Lib/importlib/abc.py Show resolved Hide resolved
@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@encukou
Copy link
Member

encukou commented Jun 27, 2022

Honestly, I don't think all this is necessary. What would be the harm if they stay importable from both places?

@warsaw
Copy link
Member

warsaw commented Jun 27, 2022

Honestly, I don't think all this is necessary. What would be the harm if they stay importable from both places?

From a backward compatibility question, none. But we should be crisp in the documentation about where the proper place to import them from is, and add deprecations for the old places.

@jaraco
Copy link
Member Author

jaraco commented Jul 2, 2022

According to PEP 387, if these are being deprecated in 3.12, is 3.14 the earliest they can be removed?

Yes, although I contend it would be preferable to deprecate these in 3.11 for removal in 3.13, given that is the prior intention.

@hugovk
Copy link
Member

hugovk commented Jul 3, 2022

Okay! I thought the 3.11 beta period was too late for new deprecations, but let's check with @pablogsal to see if this can be backported to 3.11.

@pablogsal
Copy link
Member

Okay! I thought the 3.11 beta period was too late for new deprecations, but let's check with @pablogsal to see if this can be backported to 3.11.

Indeed, unfortunately is too late to add new deprecations to 3.11, specially given how unstable 3.11 is already. Sadly this needs to be done starting in 3.12 :(

@jaraco jaraco removed the needs backport to 3.11 only security fixes label Jul 3, 2022
Lib/importlib/abc.py Outdated Show resolved Hide resolved
@jaraco
Copy link
Member Author

jaraco commented Jul 3, 2022

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@warsaw: please review the changes made to this pull request.

@miss-islington miss-islington merged commit 71848c9 into main Jul 3, 2022
@miss-islington miss-islington deleted the gh-93963/deprecate-importlib-resources-abcs branch July 3, 2022 19:17
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.

Officially deprecate and remove abcs in importlib.abc moved to importlib.resources.
8 participants