Skip to content

Commit f13fe67

Browse files
committed
Fix typing and KMS requests
1 parent d73aab1 commit f13fe67

File tree

6 files changed

+394
-169
lines changed

6 files changed

+394
-169
lines changed

pymongo/asynchronous/encryption.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
NetworkTimeout,
7878
ServerSelectionTimeoutError,
7979
)
80-
from pymongo.network_layer import async_sendall
80+
from pymongo.network_layer import async_socket_sendall
8181
from pymongo.operations import UpdateOne
8282
from pymongo.pool_options import PoolOptions
8383
from pymongo.pool_shared import _get_timeout_details, _raise_connection_failure
@@ -194,7 +194,7 @@ async def kms_request(self, kms_context: MongoCryptKmsContext) -> None:
194194
try:
195195
conn = await _connect_kms(address, opts)
196196
try:
197-
await async_sendall(conn, message)
197+
await async_socket_sendall(conn, message)
198198
while kms_context.bytes_needed > 0:
199199
# CSOT: update timeout.
200200
conn.settimeout(max(_csot.clamp_remaining(_KMS_CONNECT_TIMEOUT), 0))

pymongo/asynchronous/monitor.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@
3636
from pymongo.srv_resolver import _SrvResolver
3737

3838
if TYPE_CHECKING:
39-
from pymongo.asynchronous.pool import AsyncConnection, Pool, _CancellationContext
39+
from pymongo.asynchronous.pool import ( # type: ignore[attr-defined]
40+
AsyncConnection,
41+
Pool,
42+
_CancellationContext,
43+
)
4044
from pymongo.asynchronous.settings import TopologySettings
4145
from pymongo.asynchronous.topology import Topology
4246

0 commit comments

Comments
 (0)