diff options
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-x | Tools/scripts/combinerefs.py | 4 | ||||
-rwxr-xr-x | Tools/scripts/diff.py | 2 | ||||
-rwxr-xr-x | Tools/scripts/idle3 | 2 | ||||
-rwxr-xr-x | Tools/scripts/nm2def.py | 4 | ||||
-rwxr-xr-x | Tools/scripts/pyvenv | 6 |
5 files changed, 12 insertions, 6 deletions
diff --git a/Tools/scripts/combinerefs.py b/Tools/scripts/combinerefs.py index e10e49a..7ca9526 100755 --- a/Tools/scripts/combinerefs.py +++ b/Tools/scripts/combinerefs.py @@ -6,7 +6,7 @@ combinerefs path A helper for analyzing PYTHONDUMPREFS output. When the PYTHONDUMPREFS envar is set in a debug build, at Python shutdown -time Py_Finalize() prints the list of all live objects twice: first it +time Py_FinalizeEx() prints the list of all live objects twice: first it prints the repr() of each object while the interpreter is still fully intact. After cleaning up everything it can, it prints all remaining live objects again, but the second time just prints their addresses, refcounts, and type @@ -41,7 +41,7 @@ CAUTION: If object is a container type, it may not actually contain all the objects shown in the repr: the repr was captured from the first output block, and some of the containees may have been released since then. For example, it's common for the line showing the dict of interned strings to display -strings that no longer exist at the end of Py_Finalize; this can be recognized +strings that no longer exist at the end of Py_FinalizeEx; this can be recognized (albeit painfully) because such containees don't have a line of their own. The objects are listed in allocation order, with most-recently allocated diff --git a/Tools/scripts/diff.py b/Tools/scripts/diff.py index 9720a43..96199b8 100755 --- a/Tools/scripts/diff.py +++ b/Tools/scripts/diff.py @@ -8,7 +8,7 @@ """ -import sys, os, time, difflib, argparse +import sys, os, difflib, argparse from datetime import datetime, timezone def file_mtime(path): diff --git a/Tools/scripts/idle3 b/Tools/scripts/idle3 index 8ee92c2..d7332bc 100755 --- a/Tools/scripts/idle3 +++ b/Tools/scripts/idle3 @@ -1,5 +1,5 @@ #! /usr/bin/env python3 -from idlelib.PyShell import main +from idlelib.pyshell import main if __name__ == '__main__': main() diff --git a/Tools/scripts/nm2def.py b/Tools/scripts/nm2def.py index 8f07559..83bbcd7 100755 --- a/Tools/scripts/nm2def.py +++ b/Tools/scripts/nm2def.py @@ -36,8 +36,8 @@ option to produce this format (since it is the original v7 Unix format). """ import os, sys -PYTHONLIB = 'libpython'+sys.version[:3]+'.a' -PC_PYTHONLIB = 'Python'+sys.version[0]+sys.version[2]+'.dll' +PYTHONLIB = 'libpython%d.%d.a' % sys.version_info[:2] +PC_PYTHONLIB = 'Python%d%d.dll' % sys.version_info[:2] NM = 'nm -p -g %s' # For Linux, use "nm -g %s" def symbols(lib=PYTHONLIB,types=('T','C','D')): diff --git a/Tools/scripts/pyvenv b/Tools/scripts/pyvenv index 978d691..1fb42c6 100755 --- a/Tools/scripts/pyvenv +++ b/Tools/scripts/pyvenv @@ -1,6 +1,12 @@ #!/usr/bin/env python3 if __name__ == '__main__': import sys + import pathlib + + executable = pathlib.Path(sys.executable or 'python3').name + print('WARNING: the pyenv script is deprecated in favour of ' + f'`{executable} -m venv`', file=sys.stderr) + rc = 1 try: import venv |