diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/inspect.py | 2 | ||||
-rwxr-xr-x | Lib/keyword.py | 2 | ||||
-rw-r--r-- | Lib/locale.py | 3 | ||||
-rwxr-xr-x | Lib/symbol.py | 2 | ||||
-rwxr-xr-x | Lib/test/regrtest.py | 18 | ||||
-rwxr-xr-x | Lib/token.py | 2 |
6 files changed, 23 insertions, 6 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py index 9898b114aa..c0b67a3f00 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -482,7 +482,7 @@ def getmodule(object, _filename=None): return sys.modules.get(modulesbyfile[file]) # Update the filename to module name cache and check yet again # Copy sys.modules in order to cope with changes while iterating - for modname, module in sys.modules.items(): + for modname, module in list(sys.modules.items()): if ismodule(module) and hasattr(module, '__file__'): f = module.__file__ if f == _filesbymodname.get(modname, None): diff --git a/Lib/keyword.py b/Lib/keyword.py index a3788a6b0b..dad39cc377 100755 --- a/Lib/keyword.py +++ b/Lib/keyword.py @@ -7,7 +7,7 @@ This file is automatically generated; please don't muck it up! To update the symbols in this file, 'cd' to the top directory of the python source tree after building the interpreter and run: - python Lib/keyword.py + ./python Lib/keyword.py """ __all__ = ["iskeyword", "kwlist"] diff --git a/Lib/locale.py b/Lib/locale.py index d9dbce65a8..d2a885d519 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -1598,8 +1598,7 @@ locale_alias = { # to include every locale up to Windows Vista. # # NOTE: this mapping is incomplete. If your language is missing, please -# submit a bug report to Python bug manager, which you can find via: -# http://www.python.org/dev/ +# submit a bug report to the Python bug tracker at http://bugs.python.org/ # Make sure you include the missing language identifier and the suggested # locale code. # diff --git a/Lib/symbol.py b/Lib/symbol.py index e3fff3422c..679e5c8cc7 100755 --- a/Lib/symbol.py +++ b/Lib/symbol.py @@ -7,7 +7,7 @@ # To update the symbols in this file, 'cd' to the top directory of # the python source tree after building the interpreter and run: # -# python Lib/symbol.py +# ./python Lib/symbol.py #--start constants-- single_input = 256 diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index cfae1f00e8..af114168a9 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -177,6 +177,7 @@ import packaging.database import platform import random import re +import shutil import signal import sys import sysconfig @@ -1042,6 +1043,23 @@ class saved_test_environment: asyncore.close_all(ignore_all=True) asyncore.socket_map.update(saved_map) + def get_shutil_archive_formats(self): + # we could call get_archives_formats() but that only returns the + # registry keys; we want to check the values too (the functions that + # are registered) + return shutil._ARCHIVE_FORMATS, shutil._ARCHIVE_FORMATS.copy() + def restore_shutil_archive_formats(self, saved): + shutil._ARCHIVE_FORMATS = saved[0] + shutil._ARCHIVE_FORMATS.clear() + shutil._ARCHIVE_FORMATS.update(saved[1]) + + def get_shutil_unpack_formats(self): + return shutil._UNPACK_FORMATS, shutil._UNPACK_FORMATS.copy() + def restore_shutil_unpack_formats(self, saved): + shutil._UNPACK_FORMATS = saved[0] + shutil._UNPACK_FORMATS.clear() + shutil._UNPACK_FORMATS.update(saved[1]) + def get_logging__handlers(self): # _handlers is a WeakValueDictionary return id(logging._handlers), logging._handlers, logging._handlers.copy() diff --git a/Lib/token.py b/Lib/token.py index 7e2bfcfaf2..7ddd35eed2 100755 --- a/Lib/token.py +++ b/Lib/token.py @@ -7,7 +7,7 @@ __all__ = ['tok_name', 'ISTERMINAL', 'ISNONTERMINAL', 'ISEOF'] # To update the symbols in this file, 'cd' to the top directory of # the python source tree after building the interpreter and run: # -# python Lib/token.py +# ./python Lib/token.py #--start constants-- ENDMARKER = 0 |