summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2021-10-20 21:05:29 (GMT)
committerGitHub <noreply@github.com>2021-10-20 21:05:29 (GMT)
commit876fc7fcec9a79a11546b7588d3683a5ccb4d31c (patch)
tree9195e6474ea19461bbc5d9705f05bd2cf8603209 /Misc
parent6270d3eeaf17b50abc4f8f4d97790d66179638e4 (diff)
downloadcpython-876fc7fcec9a79a11546b7588d3683a5ccb4d31c.zip
cpython-876fc7fcec9a79a11546b7588d3683a5ccb4d31c.tar.gz
cpython-876fc7fcec9a79a11546b7588d3683a5ccb4d31c.tar.bz2
bpo-35673: Add a public alias for namespace package __loader__ attribute (#29049)
Rename namespace package __loader__ class to be public. Make the old name, i.e. _NamespaceLoader, an alias for the public name, for backward compatibility.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2021-10-18-18-12-47.bpo-35673.KOkHWe.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2021-10-18-18-12-47.bpo-35673.KOkHWe.rst b/Misc/NEWS.d/next/Library/2021-10-18-18-12-47.bpo-35673.KOkHWe.rst
new file mode 100644
index 0000000..e7d6a5f
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2021-10-18-18-12-47.bpo-35673.KOkHWe.rst
@@ -0,0 +1,4 @@
+Improve the introspectability of the ``__loader__`` attribute for namespace
+packages. :class:`importlib.machinery.NamespaceLoader` is now public, and
+implements the :class:`importlib.abc.InspectLoader` interface. ``_NamespaceLoader``
+is kept for backward compatibility.