Old pickles break
known regression: marker-pickleMarker("\"b\" > \"a\"")The PR adds `__slots__ = (('_markers',))` to `Marker` as a performance change (see PR title and added line). This change breaks backward compatibility for pickled `Marker` objects: an instance pickled by the old class (without `__slots__`) cannot be unpickled by the new class, raising `AttributeError`. The PR has no tests, docs, or changelog entry addressing pickling, so the regression is unintended.
perf: add __slots__ to Marker__slots__ = ( '_markers', )Found 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:e33c8d8e1355cf11
Regression test verified passes on base, errors on head
def test_1147_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('gASVlgAAAAAAAACMEXBhY2thZ2luZy5tYXJrZXJzlIwGTWFya2VylJOUKYGUfZSMCF9tYXJrZXJzlF2UjBFwYWNrYWdpbmcuX3BhcnNlcpSMBVZhbHVllJOUKYGUTn2UjAV2YWx1ZZSMAWKUc4aUYmgHjAJPcJSTlCmBlE59lGgMjAE+lHOGlGJoCSmBlE59lGgMjAFhlHOGlGKHlGFzYi4='))
assert old is not None # loading must not raise
Reproduce
uv run breakwater probe --repo https://github.com/pypa/packaging --base 04a7600a21fe --head 76cc62982548 --target packaging.markers:Marker --backend docker --input "\"b\" > \"a\""