]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-98040: Remove find_loader, find_module and other deprecated APIs (#98059)
authorBarry Warsaw <barry@python.org>
Wed, 3 May 2023 11:55:22 +0000 (04:55 -0700)
committerGitHub <noreply@github.com>
Wed, 3 May 2023 11:55:22 +0000 (04:55 -0700)
commit326997829d02458246dfd5b6d03297e2418bde52
tree05b94e8dbb81f6b7a8d9054bd773c3cf24e0797e
parentbcea36f8db9ad4fd542b38997e065987e829cb9f
gh-98040: Remove find_loader, find_module and other deprecated APIs (#98059)

* Remove deprecated classes from pkgutil
* Remove some other PEP 302 obsolescence
* Use find_spec instead of load_module
* Remove more tests of PEP 302 obsolete APIs
* Remove another bunch of tests using obsolete load_modules()
* Remove deleted names from __all__
* Remove obsolete footnote
* imp is removed
* Remove `imp` from generated stdlib names
* What's new and blurb
* Update zipimport documentation for the removed methods
* Fix some Windows tests
* Remove any test (or part of a test) that references `find_module()`.
* Use assertIsNone() / assertIsNotNone() consistently.
* Update Doc/reference/import.rst
* We don't need pkgutil._get_spec() any more either
*  test.test_importlib.fixtures.NullFinder
* ...BadLoaderFinder.find_module
* ...test_api.InvalidatingNullFinder.find_module
* ...test.test_zipimport test of z.find_module
* Suppress cross-references to find_loader and find_module
* Suppress cross-references to Finder
* Suppress cross-references to pkgutil.ImpImporter and pkgutil.ImpLoader

---------

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
39 files changed:
Doc/library/importlib.rst
Doc/library/pkgutil.rst
Doc/library/sys.rst
Doc/library/zipimport.rst
Doc/reference/import.rst
Doc/whatsnew/2.3.rst
Doc/whatsnew/3.10.rst
Doc/whatsnew/3.11.rst
Doc/whatsnew/3.12.rst
Doc/whatsnew/3.3.rst
Doc/whatsnew/3.4.rst
Doc/whatsnew/3.7.rst
Lib/importlib/__init__.py
Lib/importlib/_bootstrap.py
Lib/importlib/_bootstrap_external.py
Lib/importlib/abc.py
Lib/pkgutil.py
Lib/pydoc.py
Lib/test/test_importlib/builtin/test_finder.py
Lib/test/test_importlib/extension/test_path_hook.py
Lib/test/test_importlib/fixtures.py
Lib/test/test_importlib/frozen/test_finder.py
Lib/test/test_importlib/frozen/test_loader.py
Lib/test/test_importlib/import_/test___loader__.py
Lib/test/test_importlib/import_/test___package__.py
Lib/test/test_importlib/import_/test_api.py
Lib/test/test_importlib/import_/test_caching.py
Lib/test/test_importlib/import_/test_meta_path.py
Lib/test/test_importlib/import_/test_path.py
Lib/test/test_importlib/source/test_case_sensitivity.py
Lib/test/test_importlib/source/test_finder.py
Lib/test/test_importlib/source/test_path_hook.py
Lib/test/test_importlib/test_abc.py
Lib/test/test_importlib/test_api.py
Lib/test/test_importlib/test_windows.py
Lib/test/test_importlib/util.py
Lib/test/test_pkgutil.py
Lib/test/test_zipimport.py
Misc/NEWS.d/next/Library/2022-10-09-14-47-42.gh-issue-98040.IN3qab.rst [new file with mode: 0644]