Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
gh-98040: Remove find_loader, find_module and other deprecated APIs#98059
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Still lots of test failures and probably more things to remove, but it's a start! |
@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! |
However! pip 22.2.2 still relies on pkgutil.ImpImporter so these thingscannot be removed until this issue isresolved:pypa/pip#11501
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. |
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.
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
Uh oh!
There was an error while loading.Please reload this page.
Yes, this would be very helpful, thanks. |
Done, thank you! A |
Thank you! |
Removed ``fixtures.NullFinder``.---------Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Removed ``fixtures.NullFinder``.---------Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
…6.0 to version 6.7.0Barry Warsaw (1): gh-98040: Backportpython/cpython#98059Jason R. Coombs (21): Remove unnecessary and incorrect copyright notice.Fixesjaraco/skeleton#78. Replace flake8 with ruff.Fixesjaraco/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. Refpypa/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. Refpython/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
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`.
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.
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`.closes#2847GitOrigin-RevId: b7ebb9f36ac87389298df14f0672ec037da004ef
Uh oh!
There was an error while loading.Please reload this page.