diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ef53db1..cb1bf018 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ chronological order. Releases follow [semantic versioning](https://semver.org/) releases are available on [PyPI](https://pypi.org/project/pytask) and [Anaconda.org](https://anaconda.org/conda-forge/pytask). +## Unreleased + +- {pull}`725` fixes the pickle node hash test by accounting for Python 3.14's + default pickle protocol. + ## 0.5.7 - 2025-11-22 - {pull}`721` clarifies the documentation on repeated tasks in notebooks. diff --git a/tests/test_nodes.py b/tests/test_nodes.py index 63ed12bd..cab6a37d 100644 --- a/tests/test_nodes.py +++ b/tests/test_nodes.py @@ -1,6 +1,7 @@ from __future__ import annotations import pickle +import sys from pathlib import Path import cloudpickle @@ -94,7 +95,15 @@ def test_hash_of_path_node(tmp_path, value, exists, expected): ("value", "exists", "expected"), [ ("0", False, None), - ("0", True, "2e81f502b7a28f824c4f1451c946b952eebe65a8521925ef8f6135ef6f422e8e"), + # Python 3.14+ uses pickle protocol 5 by default, which produces different + # hashes + ( + "0", + True, + "1973e23848344dc43a988a9b478663803cfffe1243480253f9a3cf004b14aa7c" + if sys.version_info >= (3, 14) + else "2e81f502b7a28f824c4f1451c946b952eebe65a8521925ef8f6135ef6f422e8e", + ), ], ) def test_hash_of_pickle_node(tmp_path, value, exists, expected):