]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
ci: Test under python 3.15 dev builds 3598/head
authorBen Darnell <ben@bendarnell.com>
Fri, 20 Mar 2026 01:55:56 +0000 (21:55 -0400)
committerBen Darnell <ben@bendarnell.com>
Fri, 20 Mar 2026 02:50:23 +0000 (22:50 -0400)
Clean up after ThreadedResolver tests to avoid failures related to
calling os.fork in a multithreaded process.

.github/workflows/test.yml
tornado/test/concurrent_test.py
tornado/test/netutil_test.py

index e6d7ac3e40f7b0da6fdefbba43ae5cf57c8ed1e2..fb4beaf8fc0ec0d5149a451547947437e89b4935 100644 (file)
@@ -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'
index 7f30344e55f9d888bd68c60bcd6449ef3f36c24f..72b7a234b3d154c1b0aea01174ea54384cc19539 100644 (file)
@@ -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):
index 78231d3704359e57fafb4acf8d40b83ee84e084b..93f58ab548b828f767fbcd5ea6cc0c2cb07fca84 100644 (file)
@@ -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()