Skip to content

Commit a08f326

Browse files
committed
PYTHON-5745 Guard ObjectId import with TYPE_CHECKING in pool_shared.py
1 parent d62b69f commit a08f326

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pymongo/pool_shared.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
Union,
3131
)
3232

33-
from bson.objectid import ObjectId
3433
from pymongo import _csot
3534
from pymongo.asynchronous.helpers import _getaddrinfo
3635
from pymongo.errors import ( # type:ignore[attr-defined]
@@ -46,6 +45,7 @@
4645

4746
SSLErrors = (PYSSLError, SSLError)
4847
if TYPE_CHECKING:
48+
from bson.objectid import ObjectId
4949
from pymongo.pyopenssl_context import _sslConn
5050
from pymongo.typings import _Address
5151

0 commit comments

Comments
 (0)