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

Remove more deprecated importlib APIs from Python 3.12 #98040

Open
warsaw opened this issue Oct 7, 2022 · 2 comments
Open

Remove more deprecated importlib APIs from Python 3.12 #98040

warsaw opened this issue Oct 7, 2022 · 2 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@warsaw
Copy link
Member

warsaw commented Oct 7, 2022

Issue #97850 is the meta issue tracking removals of long deprecated functions from importlib. This ticket tracks just the removals of the following previously deprecated APIs:

  • find_loader()
  • find_module()
  • imp module
  • importlib.abc.Finder
  • pkgutil.ImpImporter
  • pkgutil.ImpLoader
@warsaw warsaw added the type-bug An unexpected behavior, bug, or error label Oct 7, 2022
@warsaw
Copy link
Member Author

warsaw commented Oct 7, 2022

Questions:

  • importlib.abs.PathEntryFinder has this comment: "We don't define find_spec() here since that would break hasattr checks we do to support backward compatibility." Do we need to define find_spec() in this ABC?

@warsaw warsaw changed the title Remove find_module() and find_loader() from Python 3.12 Remove find_module(), find_loader(), and NullImporter from Python 3.12 Oct 7, 2022
@warsaw warsaw changed the title Remove find_module(), find_loader(), and NullImporter from Python 3.12 Remove more deprecated importlib APIs from Python 3.12 Oct 7, 2022
@warsaw
Copy link
Member Author

warsaw commented Oct 9, 2022

pkgutil.ImpImporter cannot be removed since pip 22.2.2 still uses it. This is also going to keep pkgutil.ImpLoader and the imp module around. I'm going to pause work on this branch until there's a pip upstream resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant