https://github.com/python/cpython/commit/ad53bf5fd7f6765a529e582bdea3b478037370dc commit: ad53bf5fd7f6765a529e582bdea3b478037370dc branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: serhiy-storchaka <[email protected]> date: 2026-01-07T09:21:45+02:00 summary:
[3.14] gh-75572: Fix test_xpickle and disable it by default (GH-143503) (GH-143505) (cherry picked from commit b866a1c73f81606475456dbe8a7620c225fdc718) Co-authored-by: Serhiy Storchaka <[email protected]> files: M Lib/test/test_xpickle.py M Lib/test/xpickle_worker.py diff --git a/Lib/test/test_xpickle.py b/Lib/test/test_xpickle.py index 459944afd20ef7..659d3e38389860 100644 --- a/Lib/test/test_xpickle.py +++ b/Lib/test/test_xpickle.py @@ -17,6 +17,8 @@ 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 diff --git a/Lib/test/xpickle_worker.py b/Lib/test/xpickle_worker.py index 03191372bf7ac8..3fd957f4a0b939 100644 --- a/Lib/test/xpickle_worker.py +++ b/Lib/test/xpickle_worker.py @@ -12,6 +12,7 @@ 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 _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
