GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-93963: Officially deprecate abcs and warn about their usage. by jaraco · Pull Request #93965 · python/cpython

Conversation

@jaraco

@jaraco jaraco commented Jun 17, 2022 •
edited by miss-islington
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Fixes #93963

  • Issue: Officially deprecate and remove abcs in importlib.abc moved to importlib.resources. #93963

Automerge-Triggered-By: GH:jaraco

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jaraco jaraco added the needs backport to 3.11 only security fixes label Jun 17, 2022
@bedevere-bot bedevere-bot added the awaiting core review 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
gh-93963: Officially deprecate abcs and warn about their usage.
5e7fb9c
@jaraco
jaraco force-pushed the gh-93963/deprecate-importlib-resources-abcs branch from 7890672 to 5e7fb9c Compare June 17, 2022 20:23
graingert
graingert reviewed Jun 17, 2022
View reviewed changes
Comment thread Lib/importlib/abc.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@jaraco @graingert
Adopt better wording
63c3c76
Co-authored-by: Thomas Grainger <[email protected]>
hugovk
hugovk requested changes Jun 17, 2022
View reviewed changes

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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 ?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/importlib/abc.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented Jun 17, 2022

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

warsaw
warsaw requested changes Jun 17, 2022
View reviewed changes

@warsaw warsaw left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Added some questions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/importlib/abc.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/importlib/abc.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/importlib/abc.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting core review label Jun 17, 2022
@bedevere-bot

bedevere-bot commented Jun 17, 2022

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added the awaiting changes label Jun 17, 2022
@encukou

encukou commented Jun 27, 2022

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@warsaw

warsaw commented Jun 27, 2022

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jaraco jaraco mentioned this pull request Jul 2, 2022
Add support for future-version workflows python/core-workflow#468
Closed
@jaraco

jaraco commented Jul 2, 2022

Copy link
Copy Markdown
Member Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented Jul 3, 2022

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pablogsal

pablogsal commented Jul 3, 2022

Copy link
Copy Markdown
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 and ambv reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jaraco jaraco removed the needs backport to 3.11 only security fixes label Jul 3, 2022
@jaraco
Use 'warnings._deprecated'. Fixes #93963 until Python π.
8525926
graingert
graingert reviewed Jul 3, 2022
View reviewed changes
Comment thread Lib/importlib/abc.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

jaraco and others added 2 commits July 3, 2022 10:34
@jaraco
Remove generalization of a 'canonical' module and just repeat one's self
529e6ea
@jaraco @graingert
Identify the attribute name, not just the module in which it appears 🤦
908c96a
Co-authored-by: Thomas Grainger <[email protected]>
@jaraco

jaraco commented Jul 3, 2022

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting change review and removed awaiting changes labels Jul 3, 2022
@bedevere-bot

bedevere-bot commented Jul 3, 2022

Copy link
Copy Markdown

Thanks for making the requested changes!

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot
bedevere-bot requested a review from warsaw July 3, 2022 14:39
@jaraco jaraco mentioned this pull request Jul 3, 2022
Officially deprecate and remove abcs in importlib.abc moved to importlib.resources. #93963
Closed
4 of 5 tasks
@jaraco jaraco mentioned this pull request Jul 3, 2022
Bedevere rejects change that targets another PR python/bedevere#381
Closed
@jaraco jaraco added the 🤖 automerge label Jul 3, 2022
warsaw
warsaw approved these changes Jul 3, 2022
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting change review labels Jul 3, 2022
@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
@bedevere-bot bedevere-bot removed the awaiting merge label Jul 3, 2022
@hugovk hugovk mentioned this pull request Jul 4, 2022
gh-93963: Document importlib.abc deprecations #94546
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@graingert graingert graingert left review comments
@hugovk hugovk hugovk requested changes
@warsaw warsaw warsaw approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

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

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@jaraco @hugovk @bedevere-bot @encukou @warsaw @pablogsal @graingert @miss-islington
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.