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:
NSCT Agent
2026-09-05 13:36:49 +00:00
parent 6e2e7386ad
commit f9b761ced7
2 changed files with 95 additions and 2 deletions

View File

@@ -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