aboutsummaryrefslogtreecommitdiff
path: root/Lib
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 /Lib
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 'Lib')
-rw-r--r--Lib/test/test_capi.py2
-rw-r--r--Lib/test/test_faulthandler.py2
-rw-r--r--Lib/test/test_sys.py4
3 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index 5f5c0d038d9..8e92a50026c 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -581,7 +581,7 @@ class CAPITest(unittest.TestCase):
not_expected = ('_testcapi',)
code = textwrap.dedent('''
import _testcapi, sys
- sys.module_names = frozenset({"_testcapi"})
+ sys.stdlib_module_names = frozenset({"_testcapi"})
_testcapi.fatal_error(b"MESSAGE")
''')
self.check_fatal_error(code, expected)
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py
index 02077a69bb4..648624482e5 100644
--- a/Lib/test/test_faulthandler.py
+++ b/Lib/test/test_faulthandler.py
@@ -336,7 +336,7 @@ class FaultHandlerTests(unittest.TestCase):
import faulthandler
import sys
# Don't filter stdlib module names
- sys.module_names = frozenset()
+ sys.stdlib_module_names = frozenset()
faulthandler.enable()
faulthandler._sigsegv()
"""
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 729b8667fc8..c4e05359480 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -987,8 +987,8 @@ class SysModuleTest(unittest.TestCase):
proc)
def test_module_names(self):
- self.assertIsInstance(sys.module_names, frozenset)
- for name in sys.module_names:
+ self.assertIsInstance(sys.stdlib_module_names, frozenset)
+ for name in sys.stdlib_module_names:
self.assertIsInstance(name, str)