diff --git a/doc/changelog.rst b/doc/changelog.rst index c44cfb41a..d729f9afe 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -1700,8 +1700,7 @@ Changes in Version 3.8.0 (2019/04/22) ------------------------------------- .. warning:: PyMongo no longer supports Python 2.6. RHEL 6 users should install - Python 2.7 or newer from `Red Hat Software Collections - `_. + Python 2.7 or newer from Red Hat Software Collections. CentOS 6 users should install Python 2.7 or newer from `SCL `_ diff --git a/doc/conf.py b/doc/conf.py index 387b93934..a9711d259 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -82,7 +82,7 @@ pygments_style = "sphinx" # Options for link checking # The anchors on the rendered markdown page are created after the fact, # so those link results in a 404. -# wiki.centos.org has been flakey. +# wiki.centos.org has been flaky. # sourceforge.net is giving a 403 error, but is still accessible from the browser. linkcheck_ignore = [ "https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-monitoring.md#requesting-an-immediate-check", @@ -91,6 +91,9 @@ linkcheck_ignore = [ r"https://sourceforge.net/", ] +# Allow for flaky links. +linkcheck_retries = 3 + # -- Options for extensions ---------------------------------------------------- autoclass_content = "init" diff --git a/test/asynchronous/test_async_contextvars_reset.py b/test/asynchronous/test_async_contextvars_reset.py index 9b0e2dc4d..c6e825bbd 100644 --- a/test/asynchronous/test_async_contextvars_reset.py +++ b/test/asynchronous/test_async_contextvars_reset.py @@ -27,17 +27,15 @@ from test.asynchronous import AsyncIntegrationTest class TestAsyncContextVarsReset(AsyncIntegrationTest): async def test_context_vars_are_reset_in_executor(self): - if sys.version_info < (3, 11): - self.skipTest("Test requires asyncio.Task.get_context (added in Python 3.11)") + if sys.version_info < (3, 12): + self.skipTest("Test requires asyncio.Task.get_context (added in Python 3.12)") - client = self.simple_client() - - await client.db.test.insert_one({"x": 1}) - for server in client._topology._servers.values(): + await self.client.db.test.insert_one({"x": 1}) + for server in self.client._topology._servers.values(): for context in [ c for c in server._monitor._executor._task.get_context() if c.name in ["TIMEOUT", "RTT", "DEADLINE"] ]: self.assertIn(context.get(), [None, float("inf"), 0.0]) - await client.db.test.delete_many({}) + await self.client.db.test.delete_many({}) diff --git a/tools/synchro.py b/tools/synchro.py index 906bfd00d..aaf7c6836 100644 --- a/tools/synchro.py +++ b/tools/synchro.py @@ -417,13 +417,18 @@ def unasync_directory(files: list[str], src: str, dest: str, replacements: dict[ def main() -> None: modified_files = [f"./{f}" for f in sys.argv[1:]] errored = False - for fname in async_files + gridfs_files: + for fname in async_files + gridfs_files + test_files: # If the async file was modified, we don't need to check if the sync file was also modified. if str(fname) in modified_files: continue sync_name = str(fname).replace("asynchronous", "synchronous") - if sync_name in modified_files and "OVERRIDE_SYNCHRO_CHECK" not in os.environ: - print(f"Refusing to overwrite {sync_name}") + test_sync_name = str(fname).replace("/asynchronous", "") + if ( + sync_name in modified_files + or test_sync_name in modified_files + and "OVERRIDE_SYNCHRO_CHECK" not in os.environ + ): + print(f"Refusing to overwrite {test_sync_name}") errored = True if errored: raise ValueError("Aborting synchro due to errors")