diff options
author | Barry Warsaw <barry@python.org> | 2022-08-05 00:24:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-05 00:24:26 (GMT) |
commit | e1182bc3776ea7cfdd3f82d5ba4fdfee40ae57ee (patch) | |
tree | a83cbfa65f28dd2de5cefdabecd7daa925152f28 /Doc/reference/import.rst | |
parent | 44f1f63ad5cf00b6f50cef0cc1a62c42632138be (diff) | |
download | cpython-e1182bc3776ea7cfdd3f82d5ba4fdfee40ae57ee.zip cpython-e1182bc3776ea7cfdd3f82d5ba4fdfee40ae57ee.tar.gz cpython-e1182bc3776ea7cfdd3f82d5ba4fdfee40ae57ee.tar.bz2 |
gh-94619: Remove long deprecated methods module_repr() and load_module() (#94624)
* gh-94619: Remove long deprecated methods module_repr() and load_module()
Closes #94619
* Update Misc/NEWS.d/next/Library/2022-07-06-14-57-33.gh-issue-94619.PRqKVX.rst
Fix typo
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Brett Cannon <brett@python.org>
Diffstat (limited to 'Doc/reference/import.rst')
-rw-r--r-- | Doc/reference/import.rst | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/Doc/reference/import.rst b/Doc/reference/import.rst index 1e6b08f..507f2b3 100644 --- a/Doc/reference/import.rst +++ b/Doc/reference/import.rst @@ -676,22 +676,10 @@ Here are the exact rules used: * Otherwise, just use the module's ``__name__`` in the repr. -.. versionchanged:: 3.4 - Use of :meth:`loader.module_repr() <importlib.abc.Loader.module_repr>` - has been deprecated and the module spec is now used by the import - machinery to generate a module repr. - - For backward compatibility with Python 3.3, the module repr will be - generated by calling the loader's - :meth:`~importlib.abc.Loader.module_repr` method, if defined, before - trying either approach described above. However, the method is deprecated. - -.. versionchanged:: 3.10 - - Calling :meth:`~importlib.abc.Loader.module_repr` now occurs after trying to - use a module's ``__spec__`` attribute but before falling back on - ``__file__``. Use of :meth:`~importlib.abc.Loader.module_repr` is slated to - stop in Python 3.12. +.. versionchanged:: 3.12 + Use of :meth:`module_repr`, having been deprecated since Python 3.4, was + removed in Python 3.12 and is no longer called during the resolution of a + module's repr. .. _pyc-invalidation: |