Old pickles break
known regression: marker-pickleMarker("\"b\" > \"a\"")Adding __slots__ changes the pickling format; objects pickled by the base version (which had a __dict__) cannot be unpickled by the head version (which expects slot storage), causing an AttributeError. The PR introduces the slots without any compatibility handling, and the change is described only as a performance tweak.
__slots__ = ( '_markers', )perf: add __slots__ to MarkerFound by: project's test strings, hostile mutation · also caught by: Mutations of the PR's own test strings
ran onToken Factory Sandboxes · image 583e9e77-230e-4727-b18e-e799efeb03f4
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 contree --input "\"b\" > \"a\""