Skip to content

Commit 9bb2e6d

Browse files
authored
Merge branch 'master' into PYTHON-5212-1
2 parents 3521829 + 54846cd commit 9bb2e6d

File tree

6 files changed

+36
-15
lines changed

6 files changed

+36
-15
lines changed

doc/changelog.rst

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@ PyMongo 4.14 brings a number of changes including:
88
- Added :attr:`bson.codec_options.TypeRegistry.codecs` and :attr:`bson.codec_options.TypeRegistry.fallback_encoder` properties
99
to allow users to directly access the type codecs and fallback encoder for a given :class:`bson.codec_options.TypeRegistry`.
1010

11+
Changes in Version 4.13.1 (2025/06/10)
12+
--------------------------------------
13+
14+
Version 4.13.1 is a bug fix release.
15+
16+
- Fixed a bug that could raise ``ServerSelectionTimeoutError`` when using timeouts with ``AsyncMongoClient``.
17+
- Fixed a bug that could raise ``NetworkTimeout`` errors on Windows.
18+
19+
Issues Resolved
20+
...............
21+
22+
See the `PyMongo 4.13.1 release notes in JIRA`_ for the list of resolved issues
23+
in this release.
24+
25+
.. _PyMongo 4.13.1 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=43924
26+
1127
Changes in Version 4.13.0 (2025/05/14)
1228
--------------------------------------
1329

@@ -1700,8 +1716,7 @@ Changes in Version 3.8.0 (2019/04/22)
17001716
-------------------------------------
17011717

17021718
.. warning:: PyMongo no longer supports Python 2.6. RHEL 6 users should install
1703-
Python 2.7 or newer from `Red Hat Software Collections
1704-
<https://developers.redhat.com/products/softwarecollections/overview>`_.
1719+
Python 2.7 or newer from Red Hat Software Collections.
17051720
CentOS 6 users should install Python 2.7 or newer from `SCL
17061721
<https://wiki.centos.org/AdditionalResources/Repositories/SCL>`_
17071722

doc/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
# Options for link checking
8383
# The anchors on the rendered markdown page are created after the fact,
8484
# so those link results in a 404.
85-
# wiki.centos.org has been flakey.
85+
# wiki.centos.org has been flaky.
8686
# sourceforge.net is giving a 403 error, but is still accessible from the browser.
8787
linkcheck_ignore = [
8888
"https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-monitoring.md#requesting-an-immediate-check",
@@ -91,6 +91,9 @@
9191
r"https://sourceforge.net/",
9292
]
9393

94+
# Allow for flaky links.
95+
linkcheck_retries = 3
96+
9497
# -- Options for extensions ----------------------------------------------------
9598
autoclass_content = "init"
9699

test/asynchronous/test_async_contextvars_reset.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,15 @@
2727

2828
class TestAsyncContextVarsReset(AsyncIntegrationTest):
2929
async def test_context_vars_are_reset_in_executor(self):
30-
if sys.version_info < (3, 11):
31-
self.skipTest("Test requires asyncio.Task.get_context (added in Python 3.11)")
30+
if sys.version_info < (3, 12):
31+
self.skipTest("Test requires asyncio.Task.get_context (added in Python 3.12)")
3232

33-
client = self.simple_client()
34-
35-
await client.db.test.insert_one({"x": 1})
36-
for server in client._topology._servers.values():
33+
await self.client.db.test.insert_one({"x": 1})
34+
for server in self.client._topology._servers.values():
3735
for context in [
3836
c
3937
for c in server._monitor._executor._task.get_context()
4038
if c.name in ["TIMEOUT", "RTT", "DEADLINE"]
4139
]:
4240
self.assertIn(context.get(), [None, float("inf"), 0.0])
43-
await client.db.test.delete_many({})
41+
await self.client.db.test.delete_many({})

test/asynchronous/test_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ async def test_implicit_sessions_checkout(self):
196196
lsid_set = set()
197197
listener = OvertCommandListener()
198198
client = await self.async_rs_or_single_client(event_listeners=[listener], maxPoolSize=1)
199-
# Retry up to 10 times because there is a known race that can cause multiple
199+
# Retry up to 10 times because there is a known race condition that can cause multiple
200200
# sessions to be used: connection check in happens before session check in
201201
for _ in range(10):
202202
cursor = client.db.test.find({})

test/test_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def test_implicit_sessions_checkout(self):
196196
lsid_set = set()
197197
listener = OvertCommandListener()
198198
client = self.rs_or_single_client(event_listeners=[listener], maxPoolSize=1)
199-
# Retry up to 10 times because there is a known race that can cause multiple
199+
# Retry up to 10 times because there is a known race condition that can cause multiple
200200
# sessions to be used: connection check in happens before session check in
201201
for _ in range(10):
202202
cursor = client.db.test.find({})

tools/synchro.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,13 +417,18 @@ def unasync_directory(files: list[str], src: str, dest: str, replacements: dict[
417417
def main() -> None:
418418
modified_files = [f"./{f}" for f in sys.argv[1:]]
419419
errored = False
420-
for fname in async_files + gridfs_files:
420+
for fname in async_files + gridfs_files + test_files:
421421
# If the async file was modified, we don't need to check if the sync file was also modified.
422422
if str(fname) in modified_files:
423423
continue
424424
sync_name = str(fname).replace("asynchronous", "synchronous")
425-
if sync_name in modified_files and "OVERRIDE_SYNCHRO_CHECK" not in os.environ:
426-
print(f"Refusing to overwrite {sync_name}")
425+
test_sync_name = str(fname).replace("/asynchronous", "")
426+
if (
427+
sync_name in modified_files
428+
or test_sync_name in modified_files
429+
and "OVERRIDE_SYNCHRO_CHECK" not in os.environ
430+
):
431+
print(f"Refusing to overwrite {test_sync_name}")
427432
errored = True
428433
if errored:
429434
raise ValueError("Aborting synchro due to errors")

0 commit comments

Comments
 (0)