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-98040: Remove find_loader, find_module and other deprecated APIs #98059

Merged
merged 39 commits into from
May 3, 2023

Conversation

warsaw
Copy link
Member

@warsaw warsaw commented Oct 7, 2022

@warsaw
Copy link
Member Author

warsaw commented Oct 7, 2022

Still lots of test failures and probably more things to remove, but it's a start!

@warsaw warsaw marked this pull request as ready for review October 7, 2022 23:14
@warsaw
Copy link
Member Author

warsaw commented Oct 7, 2022

@brettcannon @ericsnowcurrently Well, this branch is already getting pretty big. Pull a thread, unravel a sweater. There's still some things to do (see the ticket), but it's not too late to provide feedback. I was pretty aggressive in removing things that seemed to be obsolete or testing obsolete APIs, so hopefully I wasn't too eager to remove things. Feedback welcome!

@warsaw warsaw requested a review from vsajip as a code owner October 9, 2022 22:54
@brettcannon
Copy link
Member

Should this PR be a draft until the tests are passing?

@warsaw warsaw marked this pull request as draft October 15, 2022 19:28
@warsaw
Copy link
Member Author

warsaw commented Oct 15, 2022

Should this PR be a draft until the tests are passing?

Yes, done. The blocker is being worked on upstream so I think pip 23.0 will likely unblock this PR. In the meantime, I'll keep the branch clean as is.

* test.test_importlib.fixtures.NullFinder
* ...BadLoaderFinder.find_module
* ...test_api.InvalidatingNullFinder.find_module
* ...test.test_zipimport test of z.find_module
Copy link
Member

@AA-Turner AA-Turner left a comment

Choose a reason for hiding this comment

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

There's quite a few places in the docs where we need to update cross references as of this PR (mainly pre-fixing with an !) -- though as they're on lines too far from the changes I can't do inline suggestions.

Would you be happy for me to push to this branch with said docs cross-referencing changes?

A

Doc/library/importlib.rst Show resolved Hide resolved
@warsaw
Copy link
Member Author

warsaw commented May 1, 2023

Would you be happy for me to push to this branch with said docs cross-referencing changes?

Yes, this would be very helpful, thanks.

@warsaw warsaw self-assigned this May 1, 2023
@AA-Turner
Copy link
Member

Yes, this would be very helpful, thanks.

Done, thank you!

A

@warsaw
Copy link
Member Author

warsaw commented May 2, 2023

Done, thank you!

Thank you!

@warsaw warsaw requested a review from Yhg1s May 2, 2023 20:33
@warsaw warsaw merged commit 3269978 into python:main May 3, 2023
@warsaw warsaw deleted the find_loader branch May 3, 2023 11:55
jaraco pushed a commit to python/importlib_metadata that referenced this pull request Jun 7, 2023
Removed ``fixtures.NullFinder``.

---------

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
jaraco pushed a commit to python/importlib_metadata that referenced this pull request Jun 8, 2023
Removed ``fixtures.NullFinder``.

---------

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
clrpackages pushed a commit to clearlinux-pkgs/pypi-importlib_metadata that referenced this pull request Jun 20, 2023
…6.0 to version 6.7.0

Barry Warsaw (1):
      gh-98040: Backport python/cpython#98059

Jason R. Coombs (21):
      Remove unnecessary and incorrect copyright notice. Fixes jaraco/skeleton#78.
      Replace flake8 with ruff. Fixes jaraco/skeleton#79 and sheds debt.
      👹 Feed the hobgoblins (delint).
      Make substitution fields more prominent and distinct from true 'skeleton' references. (#71)
      Suppress EncodingWarning in build.env. Ref pypa/build#615.
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Inline the NullFinder behavior.
      Add docstring to test_integration to give some context.
      Remove Python 2 compatibility in _compat.NullFinder.
      Move test_interleaved_discovery from test_integration to test_main.
      Remove test_search_dist_dirs as it was never used. Ref python/importlib_metadata#111.
      Extract _topmost and _get_toplevel_name functions.
      Extract _topmost and _get_toplevel_name functions.
      Capture that _get_toplevel_name can return None.
      Streamline the test to check one expectation (the standard dist-info expectation is handled by other tests above.
      Inline the symlink setup.
      Consolidate PackageDistributions tests.
      Update _path to jaraco.path 3.6 with symlink support.
      Utilize the new Symlink in preparing the test case.
      Update changelog.
      Remove '__init__.py', not needed.

Johan Herland (2):
      Add test to demonstrate issue with symlinked packages
      Attempt to fix issue with symlinked packages
fumoboy007 added a commit to fumoboy007/intellij-community that referenced this pull request Sep 16, 2024
The `MyFinder` subclass of [`MetaPathFinder`](https://docs.python.org/3.11/library/importlib.html#importlib.abc.MetaPathFinder) currently only implements the deprecated `find_module` method. That deprecated method was [removed](python/cpython#98059) in Python 3.12. This change adds an implementation for its replacement method called `find_spec`.
fumoboy007 added a commit to fumoboy007/intellij-community that referenced this pull request Sep 16, 2024
The included `six.py` is from version 1.9.0. This version is not compatible with Python 3.12, which [removed](python/cpython#98059) the deprecated `MetaPathFinder.find_module` method. This change updates `six.py` to version [1.16.0](https://github.com/benjaminp/six/blob/65486e4383f9f411da95937451205d3c7b61b9e1/six.py), which uses the replacement `MetaPathFinder.find_spec` method.
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.

7 participants