python-attrs
attrs
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Optimizations
Branches
Benchmarks
Runs
Performance History
Latest Results
style: Redeclare spelling to satisfy codespell
yunaremaia:fix/preserve-own-slots
7 hours ago
style: sort __slots__ tuple to satisfy ruff RUF022
yunaremaia:fix/preserve-own-slots
7 hours ago
fix: keep __dict__/__weakref__ markers when re-slotting own slots The own-slots pass rebuilt ``__slots__`` from the names it re-slotted, which silently dropped the ``__dict__`` marker. A class declaring ``__slots__ = ("__dict__", ...)`` lost ``__dict__`` entirely after ``@attrs.define``, so every dynamic attribute assignment raised ``AttributeError``: class Base: __slots__ = () @attrs.define class A(Base): __slots__ = ("__dict__", "private") public: str = "foo" a = A() a.other = 1 # AttributeError: 'A' object has no attribute 'other' Re-declare the resolved markers after the loop so the rebuilt class keeps them. Also re-read ``__slots__`` once into ``declared_slots``, which removes a redundant ``name not in slot_names`` guard that coverage proved unreachable (a name in ``slot_names`` is always an attrs field name and is therefore skipped earlier). Adds coverage for the markers, for field names that double as declared slots, and for declared slots that are also present on a base.
yunaremaia:fix/preserve-own-slots
9 hours ago
fix: preserve user-declared slots on slotted classes (fixes #1637) Re-creating a slotted class dropped non-field __slots__ while keeping their stale member descriptors, so using them raised TypeError. Drop the stale descriptors and re-slot those names. TDD: new regression test in tests/test_slots.py.
yunaremaia:fix/preserve-own-slots
18 hours ago
Merge main at c8bb9bfaa284 into ln-cx/attrs-pipe-annotation-311
Boulea7:ln-cx/attrs-pipe-annotation-311
2 days ago
test: document declared slot coverage
Samuel-Hills:fix-preserve-declared-slots-1637
5 days ago
test: satisfy lint for string slots case
Samuel-Hills:fix-preserve-declared-slots-1637
5 days ago
test: cover declared slot variants
Samuel-Hills:fix-preserve-declared-slots-1637
5 days ago
Latest Branches
CodSpeed Performance Gauge
0%
Preserve user-declared slots on slotted classes (fixes #1637)
#1650
7 hours ago
d8fe97b
yunaremaia:fix/preserve-own-slots
CodSpeed Performance Gauge
0%
Preserve wrapped converter return annotations in pipe
#1631
2 days ago
ad63eae
Boulea7:ln-cx/attrs-pipe-annotation-311
CodSpeed Performance Gauge
0%
fix: preserve explicitly declared slots
#1648
5 days ago
d96c51f
Samuel-Hills:fix-preserve-declared-slots-1637
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs