From 0167fffe487ec668934ed7b38e291a0a26a67479 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Sat, 23 Nov 2024 04:22:12 -0400 Subject: [PATCH] fix: subclass cant access name mangled method (#434) --- a_sync/primitives/locks/prio_semaphore.pyx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/a_sync/primitives/locks/prio_semaphore.pyx b/a_sync/primitives/locks/prio_semaphore.pyx index bddb92a7..37800888 100644 --- a/a_sync/primitives/locks/prio_semaphore.pyx +++ b/a_sync/primitives/locks/prio_semaphore.pyx @@ -349,10 +349,10 @@ cdef class _AbstractPrioritySemaphoreContextManager(Semaphore): async def __acquire(self) -> Literal[True]: cdef object loop, fut while self._parent._Semaphore__value <= 0: - if self.__waiters is None: - self.__waiters = deque() + if self._AbstractPrioritySemaphoreContextManager__waiters is None: + self._AbstractPrioritySemaphoreContextManager__waiters = deque() fut = (self.__loop or self._c_get_loop()).create_future() - self.__waiters.append(fut) + self._AbstractPrioritySemaphoreContextManager__waiters.append(fut) self._parent._potential_lost_waiters.append(fut) try: await fut @@ -394,7 +394,7 @@ cdef class _PrioritySemaphoreContextManager(_AbstractPrioritySemaphoreContextMan def __cinit__(self): self._priority_name = "priority" # Semaphore.__cinit__(self) - self.__AbstractPrioritySemaphoreContextManager__waiters = deque() + self._AbstractPrioritySemaphoreContextManager__waiters = deque() self._decorated: Set[str] = set() def __lt__(self, _PrioritySemaphoreContextManager other) -> bool: