Skip to content

Commit 4626c82

Browse files
committed
Address review
1 parent 51ffa4a commit 4626c82

File tree

2 files changed

+396
-396
lines changed

2 files changed

+396
-396
lines changed

pymongo/lock.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import sys
2222
import threading
2323
import weakref
24-
from asyncio import TimeoutError, wait_for
24+
from asyncio import wait_for
2525
from typing import Any, Optional, TypeVar
2626

2727
import pymongo._asyncio_lock
@@ -33,7 +33,8 @@
3333

3434
_T = TypeVar("_T")
3535

36-
# Needed to support 3.13 asyncio fixes in older versions of Python
36+
# Needed to support 3.13 asyncio fixes (https://github.com/python/cpython/issues/112202)
37+
# in older versions of Python
3738
if sys.version_info >= (3, 13):
3839
Lock = asyncio.Lock
3940
Condition = asyncio.Condition
@@ -83,7 +84,7 @@ def _release_locks() -> None:
8384
async def _async_cond_wait(condition: Condition, timeout: Optional[float]) -> bool:
8485
try:
8586
return await wait_for(condition.wait(), timeout)
86-
except TimeoutError:
87+
except asyncio.TimeoutError:
8788
return False
8889

8990

0 commit comments

Comments
 (0)