Skip to content

Commit e775c65

Browse files
committed
Fix default is_sdam setting
1 parent d851d85 commit e775c65

File tree

5 files changed

+3
-5
lines changed

5 files changed

+3
-5
lines changed

pymongo/asynchronous/pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ def __init__(
714714
self,
715715
address: _Address,
716716
options: PoolOptions,
717-
is_sdam: bool = True,
717+
is_sdam: bool = False,
718718
client_id: Optional[ObjectId] = None,
719719
):
720720
"""

pymongo/network_layer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def receive_data(conn: Connection, length: int, deadline: Optional[float]) -> me
359359
raise _OperationCancelled("operation cancelled") from None
360360
if (
361361
_PYPY
362-
or not conn.is_sdam()
362+
or not conn.is_sdam
363363
and deadline is not None
364364
and deadline - time.monotonic() < 0
365365
):

pymongo/synchronous/pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ def __init__(
712712
self,
713713
address: _Address,
714714
options: PoolOptions,
715-
is_sdam: bool = True,
715+
is_sdam: bool = False,
716716
client_id: Optional[ObjectId] = None,
717717
):
718718
"""

test/asynchronous/test_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2011,7 +2011,6 @@ async def test_srv_max_hosts_kwarg(self):
20112011
)
20122012
@unittest.skipIf(sys.platform == "win32", "Windows does not support SIGSTOP")
20132013
@async_client_context.require_sync
2014-
@mock.patch.dict("os.environ", {"AWS_LAMBDA_RUNTIME_API": "1"})
20152014
def test_sigstop_sigcont(self):
20162015
test_dir = os.path.dirname(os.path.realpath(__file__))
20172016
script = os.path.join(test_dir, "sigstop_sigcont.py")

test/test_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1968,7 +1968,6 @@ def test_srv_max_hosts_kwarg(self):
19681968
)
19691969
@unittest.skipIf(sys.platform == "win32", "Windows does not support SIGSTOP")
19701970
@client_context.require_sync
1971-
@mock.patch.dict("os.environ", {"AWS_LAMBDA_RUNTIME_API": "1"})
19721971
def test_sigstop_sigcont(self):
19731972
test_dir = os.path.dirname(os.path.realpath(__file__))
19741973
script = os.path.join(test_dir, "sigstop_sigcont.py")

0 commit comments

Comments
 (0)