Old pickles break
known regression: old-pickles-fail-to-loadVersion("0")The change is a performance‑focused refactor (new __slots__, cached _key_cache, faster comparison methods) and the only backward‑compatibility note is a comment about internal _Version usage, not about pickling. No test or changelog entry mentions preserving pickle compatibility, so the unpickling failure is an unintended regression.
# Backward compatibility for internals before 26.0. Do not use.# This is a hot function, so not calling self.base_versionFound by: Ultra's planned example, project's test strings, hostile mutation · also caught by: Mutations of the PR's own test strings, Nemotron plan only
ran onlocal Docker · image bw-pair:ee5fda034cdd7462
Regression test verified passes on base, errors on head
def test_1116_p4_base_head_load_0():
"""Breakwater P4: base behaviour pinned (found by differential testing; label: likely-bug)."""
import base64
import pickle
# pickled by the base version (lazy caches warmed first)
old = pickle.loads(base64.b64decode('gASVygAAAAAAAACMEXBhY2thZ2luZy52ZXJzaW9ulIwHVmVyc2lvbpSTlCmBlE59lCiMBF9kZXaUTowGX2Vwb2NolEsAjApfa2V5X2NhY2hllChLACmMFXBhY2thZ2luZy5fc3RydWN0dXJlc5SMDEluZmluaXR5VHlwZZSTlCmBlGgIjBROZWdhdGl2ZUluZmluaXR5VHlwZZSTlCmBlGgLaA50lIwGX2xvY2FslE6MBV9wb3N0lE6MBF9wcmWUTowIX3JlbGVhc2WUSwCFlHWGlGIu'))
assert old is not None # loading must not raise
Reproduce
uv run breakwater probe --repo https://github.com/pypa/packaging --base baa9ea8c7fa7 --head f2bbd4f57864 --target packaging.version:Version --backend docker --input "0"