From: Ben Darnell Date: Fri, 20 Mar 2026 01:55:56 +0000 (-0400) Subject: ci: Test under python 3.15 dev builds X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=d4bfeef74cb757c839e6d78d27cf766f232b3ac9;p=thirdparty%2Ftornado.git ci: Test under python 3.15 dev builds Clean up after ThreadedResolver tests to avoid failures related to calling os.fork in a multithreaded process. --- diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e6d7ac3e..fb4beaf8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,10 +82,12 @@ jobs: tox_env: py312-full - python: '3.13' tox_env: py313-full - - python: '3.14.0-dev - 3.14' + - python: '3.14' tox_env: py314 - python: '3.14t-dev' tox_env: py314 + - python: '3.15-dev' + tox_env: py315 - python: '3.10.8' tox_env: py310-full - python: '3.11.0' diff --git a/tornado/test/concurrent_test.py b/tornado/test/concurrent_test.py index 7f30344e..72b7a234 100644 --- a/tornado/test/concurrent_test.py +++ b/tornado/test/concurrent_test.py @@ -183,7 +183,7 @@ class RunOnExecutorTest(AsyncTestCase): def test_call_with_no_args(self): class Object: def __init__(self): - self.executor = futures.thread.ThreadPoolExecutor(1) + self.executor = futures.ThreadPoolExecutor(1) @run_on_executor() def f(self): @@ -197,7 +197,7 @@ class RunOnExecutorTest(AsyncTestCase): def test_call_with_executor(self): class Object: def __init__(self): - self.__executor = futures.thread.ThreadPoolExecutor(1) + self.__executor = futures.ThreadPoolExecutor(1) @run_on_executor(executor="_Object__executor") def f(self): @@ -211,7 +211,7 @@ class RunOnExecutorTest(AsyncTestCase): def test_async_await(self): class Object: def __init__(self): - self.executor = futures.thread.ThreadPoolExecutor(1) + self.executor = futures.ThreadPoolExecutor(1) @run_on_executor() def f(self): diff --git a/tornado/test/netutil_test.py b/tornado/test/netutil_test.py index 78231d37..93f58ab5 100644 --- a/tornado/test/netutil_test.py +++ b/tornado/test/netutil_test.py @@ -114,6 +114,10 @@ class ThreadedResolverTest(_ResolverTestMixin): def tearDown(self): self.resolver.close() + # ThreadedResolver uses a global thread pool, so we have to shut it down + if ThreadedResolver._threadpool is not None: + ThreadedResolver._threadpool.shutdown(wait=True) + ThreadedResolver._threadpool = None super().tearDown()