gh-98040: Remove find_loader, find_module and other deprecated APIs#98059
gh-98040: Remove find_loader, find_module and other deprecated APIs#98059warsaw merged 39 commits intopython:mainfrom
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 things cannot be removed until this issue is resolved: 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. |
AA-Turner
left a comment
There was a problem hiding this comment.
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
Yes, this would be very helpful, thanks. |
Done, thank you! A |
Thank you! |
Removed ``fixtures.NullFinder``. --------- Co-authored-by: Oleg Iarygin <[email protected]> Co-authored-by: Adam Turner <[email protected]>
Removed ``fixtures.NullFinder``. --------- Co-authored-by: Oleg Iarygin <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…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
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 #2847 GitOrigin-RevId: b7ebb9f36ac87389298df14f0672ec037da004ef
Uh oh!
There was an error while loading. Please reload this page.