]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-75572: Fix test_xpickle and disable it by default (GH-143503) (GH-143505)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 7 Jan 2026 07:21:45 +0000 (08:21 +0100)
committerGitHub <noreply@github.com>
Wed, 7 Jan 2026 07:21:45 +0000 (09:21 +0200)
(cherry picked from commit b866a1c73f81606475456dbe8a7620c225fdc718)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_xpickle.py
Lib/test/xpickle_worker.py

index 459944afd20ef7b8bba2806b8161ebe97072428a..659d3e38389860366a0883a2e2f0dfd04a7bf71b 100644 (file)
@@ -17,6 +17,8 @@ try:
 except ModuleNotFoundError:
     has_c_implementation = False
 
+support.requires('xpickle')
+
 is_windows = sys.platform.startswith('win')
 
 # Map python version to a tuple containing the name of a corresponding valid
index 03191372bf7ac8f89abd967f2e2c276d0102855d..3fd957f4a0b939b3b15de3214f45166c77eca501 100644 (file)
@@ -12,6 +12,7 @@ test_mod_path = os.path.abspath(os.path.join(os.path.dirname(__file__),
 if sys.version_info >= (3, 5):
     import importlib.util
     spec = importlib.util.spec_from_file_location('test.picklecommon', test_mod_path)
+    sys.modules['test'] = type(sys)('test')
     test_module = importlib.util.module_from_spec(spec)
     spec.loader.exec_module(test_module)
     sys.modules['test.picklecommon'] = test_module