diff --git a/trio/_core/_parking_lot.py b/trio/_core/_parking_lot.py index 8b114b5230..a75c81c81d 100644 --- a/trio/_core/_parking_lot.py +++ b/trio/_core/_parking_lot.py @@ -85,7 +85,7 @@ class _ParkingLotStatistics: tasks_waiting = attr.ib() -@attr.s(eq=False, hash=False) +@attr.s(eq=False, hash=False, slots=True) class ParkingLot(metaclass=Final): """A fair wait queue with cancellation and requeueing. diff --git a/trio/_sync.py b/trio/_sync.py index bed339ef6b..68f3e82b05 100644 --- a/trio/_sync.py +++ b/trio/_sync.py @@ -10,7 +10,7 @@ from ._util import Final -@attr.s(repr=False, eq=False, hash=False) +@attr.s(repr=False, eq=False, hash=False, slots=True) class Event(metaclass=Final): """A waitable boolean value useful for inter-task synchronization, inspired by :class:`threading.Event`.