summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2021-03-24 15:26:56 (GMT)
committerGitHub <noreply@github.com>2021-03-24 15:26:56 (GMT)
commit9cb31d671646a5ff0901f79d2d61022621447190 (patch)
tree07877b815e17e8def80ed4e70c385b4b3a23b5af /Doc/whatsnew
parent3ba3d513b1e3c63d09cb798b982a9e6c369cea4c (diff)
downloadcpython-9cb31d671646a5ff0901f79d2d61022621447190.zip
cpython-9cb31d671646a5ff0901f79d2d61022621447190.tar.gz
cpython-9cb31d671646a5ff0901f79d2d61022621447190.tar.bz2
bpo-42137: have ModuleType.__repr__ prefer __spec__ over module_repr() (GH-24953)
This is to work towards the removal of the use of module_repr() in Python 3.12 (documented as deprecated since 3.4).
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.10.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index d4335eb..b679180 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -1004,6 +1004,12 @@ Deprecated
:meth:`~importlib.abc.Loader.exec_module` is preferred.
(Contributed by Brett Cannon in :issue:`26131`.)
+* The import system now uses the ``__spec__`` attribute on modules before
+ falling back on :meth:`~importlib.abc.Loader.module_repr` for a module's
+ ``__repr__()`` method. Removal of the use of ``module_repr()`` is scheduled
+ for Python 3.12.
+ (Contributed by Brett Cannon in :issue:`42137`.)
+
* ``sqlite3.OptimizedUnicode`` has been undocumented and obsolete since Python
3.3, when it was made an alias to :class:`str`. It is now deprecated,
scheduled for removal in Python 3.12.