summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-01-25 22:12:50 (GMT)
committerGitHub <noreply@github.com>2021-01-25 22:12:50 (GMT)
commit9852cb38112a4f8d11e26c3423643ea994d5a14f (patch)
treed211a0c20d5da15318ce1cc1fa1ab87f544749e3 /Tools
parent501d4a51e32c7bbba255598adc307660b5af891a (diff)
downloadcpython-9852cb38112a4f8d11e26c3423643ea994d5a14f.zip
cpython-9852cb38112a4f8d11e26c3423643ea994d5a14f.tar.gz
cpython-9852cb38112a4f8d11e26c3423643ea994d5a14f.tar.bz2
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 'Tools')
-rw-r--r--Tools/scripts/generate_stdlib_module_names.py (renamed from Tools/scripts/generate_module_names.py)9
1 files changed, 5 insertions, 4 deletions
diff --git a/Tools/scripts/generate_module_names.py b/Tools/scripts/generate_stdlib_module_names.py
index 9d363aa..0264769 100644
--- a/Tools/scripts/generate_module_names.py
+++ b/Tools/scripts/generate_stdlib_module_names.py
@@ -1,5 +1,5 @@
# This script lists the names of standard library modules
-# to update Python/module_names.h
+# to update Python/stdlib_mod_names.h
import os.path
import re
import subprocess
@@ -126,10 +126,11 @@ def list_modules():
def write_modules(fp, names):
- print("// Auto-generated by Tools/scripts/generate_module_names.py.", file=fp)
- print("// List used to create sys.module_names.", file=fp)
+ print("// Auto-generated by Tools/scripts/generate_stdlib_module_names.py.",
+ file=fp)
+ print("// List used to create sys.stdlib_module_names.", file=fp)
print(file=fp)
- print("static const char* _Py_module_names[] = {", file=fp)
+ print("static const char* _Py_stdlib_module_names[] = {", file=fp)
for name in sorted(names):
print(f'"{name}",', file=fp)
print("};", file=fp)