aboutsummaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-01-25 23:12:50 +0100
committerGitHub <noreply@github.com>2021-01-25 23:12:50 +0100
commit9852cb38112a4f8d11e26c3423643ea994d5a14f (patch)
treed211a0c20d5da15318ce1cc1fa1ab87f544749e3 /Doc
parentbpo-42383: pdb: do not fail to restart the target if the current directory ch... (diff)
downloadcpython-9852cb38112a4f8d11e26c3423643ea994d5a14f.tar.gz
cpython-9852cb38112a4f8d11e26c3423643ea994d5a14f.tar.bz2
cpython-9852cb38112a4f8d11e26c3423643ea994d5a14f.zip
bpo-42955: Rename module_names to sys.stdlib_module_names (GH-24332)
* Rename _Py_module_names to _Py_stdlib_module_names. * Rename Python/module_names.h to Python/stdlib_module_names.h.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/sys.rst38
-rw-r--r--Doc/whatsnew/3.10.rst2
2 files changed, 20 insertions, 20 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index f187895410c..0219ae8ceb6 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -157,7 +157,7 @@ always available.
Python interpreter. (This information is not available in any other way ---
``modules.keys()`` only lists the imported modules.)
- See also the :attr:`sys.module_names` list.
+ See also the :attr:`sys.stdlib_module_names` list.
.. function:: call_tracing(func, args)
@@ -1062,24 +1062,6 @@ always available.
This is still called as a fallback if a :data:`meta_path` entry doesn't
have a :meth:`~importlib.abc.MetaPathFinder.find_spec` method.
-.. data:: module_names
-
- A frozenset of strings containing the names of standard library modules.
-
- It is the same on all platforms. Modules which are not available on
- some platforms and modules disabled at Python build are also listed.
- All module kinds are listed: pure Python, built-in, frozen and extension
- modules. Test modules are excluded.
-
- For packages, only sub-packages are listed, not sub-modules. For example,
- ``concurrent`` package and ``concurrent.futures`` sub-package are listed,
- but not ``concurrent.futures.base`` sub-module.
-
- See also the :attr:`sys.builtin_module_names` list.
-
- .. versionadded:: 3.10
-
-
.. data:: modules
This is a dictionary that maps module names to modules which have already been
@@ -1584,6 +1566,24 @@ always available.
to a console and Python apps started with :program:`pythonw`.
+.. data:: stdlib_module_names
+
+ A frozenset of strings containing the names of standard library modules.
+
+ It is the same on all platforms. Modules which are not available on
+ some platforms and modules disabled at Python build are also listed.
+ All module kinds are listed: pure Python, built-in, frozen and extension
+ modules. Test modules are excluded.
+
+ For packages, only sub-packages are listed, not sub-modules. For example,
+ ``concurrent`` package and ``concurrent.futures`` sub-package are listed,
+ but not ``concurrent.futures.base`` sub-module.
+
+ See also the :attr:`sys.builtin_module_names` list.
+
+ .. versionadded:: 3.10
+
+
.. data:: thread_info
A :term:`named tuple` holding information about the thread
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index 3026a1ac0e5..30a82816444 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -396,7 +396,7 @@ Add :data:`sys.orig_argv` attribute: the list of the original command line
arguments passed to the Python executable.
(Contributed by Victor Stinner in :issue:`23427`.)
-Add :data:`sys.module_names`, containing the list of the standard library
+Add :data:`sys.stdlib_module_names`, containing the list of the standard library
module names.
(Contributed by Victor Stinner in :issue:`42955`.)