Old pickles break
Marker("os_name == 'foo'")Adding __slots__ to the Node hierarchy changes the object layout, breaking unpickling of instances created by older pickled Marker objects. The PR is a performance refactor with no tests, docs, or changelog noting the compatibility break.
__slots__ = ()perf: add __slots__ to NodesFound 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:f8c16265598b425b
Regression test verified passes on base, errors on head
def test_1032_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('gASVowAAAAAAAACMEXBhY2thZ2luZy5tYXJrZXJzlIwGTWFya2VylJOUKYGUfZSMCF9tYXJrZXJzlF2UjBFwYWNrYWdpbmcuX3BhcnNlcpSMCFZhcmlhYmxllJOUKYGUfZSMBXZhbHVllIwHb3NfbmFtZZRzYmgHjAJPcJSTlCmBlH2UaAyMAj09lHNiaAeMBVZhbHVllJOUKYGUfZRoDIwDZm9vlHNih5Rhc2Iu'))
assert old is not None # loading must not raise
Reproduce
uv run breakwater probe --repo https://github.com/pypa/packaging --base 842c16cef598 --head c39b6da9ab11 --target packaging.markers:Marker --backend docker --input "os_name == 'foo'"