Skip to content

Commit 79dff40

Browse files
authored
Merge branch 'master' into PYTHON-5038
2 parents 2399405 + f8bd891 commit 79dff40

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pymongo/network_layer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
async def async_sendall(sock: Union[socket.socket, _sslConn], buf: bytes) -> None:
7373
timeout = sock.gettimeout()
7474
sock.settimeout(0.0)
75-
loop = asyncio.get_event_loop()
75+
loop = asyncio.get_running_loop()
7676
try:
7777
if _HAVE_SSL and isinstance(sock, (SSLSocket, _sslConn)):
7878
await asyncio.wait_for(_async_sendall_ssl(sock, buf, loop), timeout=timeout)
@@ -259,7 +259,7 @@ async def async_receive_data(
259259
timeout = sock_timeout
260260

261261
sock.settimeout(0.0)
262-
loop = asyncio.get_event_loop()
262+
loop = asyncio.get_running_loop()
263263
cancellation_task = create_task(_poll_cancellation(conn))
264264
try:
265265
if _HAVE_SSL and isinstance(sock, (SSLSocket, _sslConn)):
@@ -290,7 +290,7 @@ async def async_receive_data_socket(
290290
timeout = sock_timeout
291291

292292
sock.settimeout(0.0)
293-
loop = asyncio.get_event_loop()
293+
loop = asyncio.get_running_loop()
294294
try:
295295
if _HAVE_SSL and isinstance(sock, (SSLSocket, _sslConn)):
296296
return await asyncio.wait_for(

pymongo/pyopenssl_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def __set_check_ocsp_endpoint(self, value: bool) -> None:
273273

274274
check_ocsp_endpoint = property(__get_check_ocsp_endpoint, __set_check_ocsp_endpoint)
275275

276-
def __get_options(self) -> None:
276+
def __get_options(self) -> int:
277277
# Calling set_options adds the option to the existing bitmask and
278278
# returns the new bitmask.
279279
# https://www.pyopenssl.org/en/stable/api/ssl.html#OpenSSL.SSL.Context.set_options

0 commit comments

Comments
 (0)