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
Comments
Questions:
|
|
Little reminder: we're a month away from the beta freeze to remove these, or to bump removal to 3.13. |
My plan is to complete this work at the 2023 PyCon sprints. |
* main: (24 commits) pythongh-98040: Move the Single-Phase Init Tests Out of test_imp (pythongh-102561) pythongh-83861: Fix datetime.astimezone() method (pythonGH-101545) pythongh-102856: Clean some of the PEP 701 tokenizer implementation (python#103634) pythongh-102856: Skip test_mismatched_parens in WASI builds (python#103633) pythongh-102856: Initial implementation of PEP 701 (python#102855) pythongh-103583: Add ref. dependency between multibytecodec modules (python#103589) pythongh-83004: Harden msvcrt further (python#103420) pythonGH-88342: clarify that `asyncio.as_completed` accepts generators yielding tasks (python#103626) pythongh-102778: IDLE - make sys.last_exc available in Shell after traceback (python#103314) pythongh-103582: Remove last references to `argparse.REMAINDER` from docs (python#103586) pythongh-103583: Always pass multibyte codec structs as const (python#103588) pythongh-103617: Fix compiler warning in _iomodule.c (python#103618) pythongh-103596: [Enum] do not shadow mixed-in methods/attributes (pythonGH-103600) pythonGH-100530: Change the error message for non-class class patterns (pythonGH-103576) pythongh-95299: Remove lingering setuptools reference in installer scripts (pythonGH-103613) [Doc] Fix a typo in optparse.rst (python#103504) pythongh-101100: Fix broken reference `__format__` in `string.rst` (python#103531) pythongh-95299: Stop installing setuptools as a part of ensurepip and venv (python#101039) pythonGH-103484: Docs: add linkcheck allowed redirects entries for most cases (python#103569) pythongh-67230: update whatsnew note for csv changes (python#103598) ...
This API was removed in Python 3.12 (python/cpython#98040). Fixes Python 3.12 support in grpcio tests.
Do not use importlib find_module API in bazel/_gevent_test_main.py This API was removed in Python 3.12 (python/cpython#98040).
This API was removed in Python 3.12 (python/cpython#98040). Fixes Python 3.12 support in grpcio tests.
Do not use importlib find_module API in bazel/_gevent_test_main.py This API was removed in Python 3.12 (python/cpython#98040).
Do not use importlib find_module API in bazel/_gevent_test_main.py This API was removed in Python 3.12 (python/cpython#98040).
“Perhaps you need the imp's services for just a little longer?” a voice asks as a piece of parchment is pressed in your hand. The incantation, done in ornate reddish lettering, is invitingly simple: |
Can you please mention it in What's New In Python 3.12? |
No, it's not supported and there are no guarantees about it. |
Related: python/cpython#98040 Closes: #3 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Related: python/cpython#98040 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Fixes broken build on Fedora Rawhide. The deprecated importlib API has been removed from Python 3.12, see python/cpython#98040. Addressing: Traceback (most recent call last): File "/builddir/build/BUILD/scap-security-guide-0.1.69/build-scripts/build_templated_content.py", line 9, in <module> import ssg.templates File "/builddir/build/BUILD/scap-security-guide-0.1.69/ssg/templates.py", line 5, in <module> import imp ModuleNotFoundError: No module named 'imp'
This API was removed in Python 3.12 (python/cpython#98040). Fixes Python 3.12 support in grpcio tests.
Do not use importlib find_module API in bazel/_gevent_test_main.py This API was removed in Python 3.12 (python/cpython#98040).
Fixes broken build on Fedora Rawhide. The deprecated importlib API has been removed from Python 3.12, see python/cpython#98040. Addressing: Traceback (most recent call last): File "/builddir/build/BUILD/scap-security-guide-0.1.69/build-scripts/build_templated_content.py", line 9, in <module> import ssg.templates File "/builddir/build/BUILD/scap-security-guide-0.1.69/ssg/templates.py", line 5, in <module> import imp ModuleNotFoundError: No module named 'imp'
…33506) This API was [removed in Python 3.12](python/cpython#98040). Fixes Python 3.12 support in `grpcio` tests. This is relevant to #33063. See also #33492. ---- I have actually only tested this in a form backported to grpc 1.48.4, and I am not able to test the change to `bazel/_gevent_test_main.py` directly. However, the backported form allows me to build grpc 1.48.4 for Fedora Rawhide with Python 3.12, and I believe the version in this PR to be correct—especially, if CI passes for Python 3.11, I believe this part of the test code will continue to work in Python 3.12.
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
moduleimportlib.abc.Finder
pkgutil.ImpImporter
pkgutil.ImpLoader
Linked PRs
imp
module #98573imp
module #104131The text was updated successfully, but these errors were encountered: