Skip to content

Commit 1858879

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents 3676c37 + dfd5573 commit 1858879

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

doc/changelog.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1700,8 +1700,7 @@ Changes in Version 3.8.0 (2019/04/22)
17001700
-------------------------------------
17011701

17021702
.. 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>`_.
1703+
Python 2.7 or newer from Red Hat Software Collections.
17051704
CentOS 6 users should install Python 2.7 or newer from `SCL
17061705
<https://wiki.centos.org/AdditionalResources/Repositories/SCL>`_
17071706

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({})

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)