fix: priority_queue async context methods (async_fix for Python 3.14+). Add test_priority_limiter.py tests for async context manager
This commit is contained in:
@@ -116,8 +116,8 @@ class PriorityLimiter:
|
||||
self._lock = asyncio.Lock()
|
||||
self._semaphore = asyncio.Semaphore(limit)
|
||||
|
||||
def __aenter__(self) -> "PriorityLimiter":
|
||||
async def __aenter__(self) -> "PriorityLimiter":
|
||||
return self
|
||||
|
||||
def __aexit__(self, *exc: Any) -> None:
|
||||
async def __aexit__(self, *exc: Any) -> None:
|
||||
pass
|
||||
Reference in New Issue
Block a user