@@ -109,21 +109,6 @@ def create_standard_nonlinux_variants() -> list[BuildVariant]:
109109 return variants
110110
111111
112- def create_free_threaded_variants () -> list [BuildVariant ]:
113- variants = []
114- for host_name in ("rhel8" , "macos" , "macos-arm64" , "win64" ):
115- python = "3.14t"
116- tasks = [".free-threading" ]
117- tags = []
118- if host_name == "rhel8" :
119- tags .append ("pr" )
120- host = HOSTS [host_name ]
121- display_name = get_variant_name ("Free-threaded" , host , python = python )
122- variant = create_variant (tasks , display_name , tags = tags , python = python , host = host )
123- variants .append (variant )
124- return variants
125-
126-
127112def create_encryption_variants () -> list [BuildVariant ]:
128113 variants = []
129114 tags = ["encryption_tag" ]
@@ -217,8 +202,11 @@ def create_enterprise_auth_variants():
217202 for host in ["rhel8" , "macos" , "win64" ]:
218203 expansions = dict (TEST_NAME = "enterprise_auth" , AUTH = "auth" )
219204 display_name = get_variant_name ("Auth Enterprise" , host )
220- tasks = [".test-non-standard .auth" ]
221- if host != "rhel8" :
205+ tasks = [".test-non-standard .auth !.free-threaded" ]
206+ # https://jira.mongodb.org/browse/PYTHON-5586
207+ if host == "macos" :
208+ tasks = [".test-non-standard !.pypy .auth !.free-threaded" ]
209+ if host == "win64" :
222210 tasks = [".test-non-standard !.pypy .auth" ]
223211 variant = create_variant (tasks , display_name , host = host , expansions = expansions )
224212 variants .append (variant )
@@ -302,7 +290,7 @@ def create_green_framework_variants():
302290 variants = []
303291 host = DEFAULT_HOST
304292 for framework in ["gevent" ]:
305- tasks = [".test-standard .sync" ]
293+ tasks = [".test-standard .sync !.free-threaded " ]
306294 expansions = dict (GREEN_FRAMEWORK = framework )
307295 display_name = get_variant_name (f"Green { framework .capitalize ()} " , host )
308296 variant = create_variant (tasks , display_name , host = host , expansions = expansions )
@@ -540,7 +528,9 @@ def create_server_version_tasks():
540528 seen .add (combo )
541529 tags .append ("pr" )
542530 expansions = dict (AUTH = auth , SSL = ssl , TOPOLOGY = topology )
543- if python not in PYPYS :
531+ if "t" in python :
532+ tags .append ("free-threaded" )
533+ if python not in PYPYS and "t" not in python :
544534 expansions ["COVERAGE" ] = "1"
545535 name = get_task_name (
546536 "test-server-version" ,
@@ -596,6 +586,8 @@ def create_test_non_standard_tasks():
596586 f"{ topology } -{ auth } -{ ssl } " ,
597587 auth ,
598588 ]
589+ if "t" in python :
590+ tags .append ("free-threaded" )
599591 if python in PYPYS :
600592 tags .append ("pypy" )
601593 if pr :
@@ -646,6 +638,8 @@ def create_standard_tasks():
646638 f"{ topology } -{ auth } -{ ssl } " ,
647639 sync ,
648640 ]
641+ if "t" in python :
642+ tags .append ("free-threaded" )
649643 if python in PYPYS :
650644 tags .append ("pypy" )
651645 if pr :
@@ -716,6 +710,8 @@ def create_aws_tasks():
716710 server_func = FunctionCall (func = "run server" , vars = server_vars )
717711 assume_func = FunctionCall (func = "assume ec2 role" )
718712 tags = [* base_tags , f"auth-aws-{ test_type } " ]
713+ if "t" in python :
714+ tags .append ("free-threaded" )
719715 name = get_task_name (f"{ base_name } -{ test_type } " , python = python )
720716 test_vars = dict (TEST_NAME = "auth_aws" , SUB_TEST_NAME = test_type , PYTHON_VERSION = python )
721717 test_func = FunctionCall (func = "run tests" , vars = test_vars )
@@ -731,6 +727,8 @@ def create_aws_tasks():
731727 AWS_ROLE_SESSION_NAME = "test" ,
732728 PYTHON_VERSION = python ,
733729 )
730+ if "t" in python :
731+ tags .append ("free-threaded" )
734732 test_func = FunctionCall (func = "run tests" , vars = test_vars )
735733 funcs = [server_func , assume_func , test_func ]
736734 tasks .append (EvgTask (name = name , tags = tags , commands = funcs ))
@@ -757,6 +755,8 @@ def create_mod_wsgi_tasks():
757755 for (test , topology ), python in zip_cycle (
758756 product (["standalone" , "embedded-mode" ], ["standalone" , "replica_set" ]), CPYTHONS
759757 ):
758+ if "t" in python :
759+ continue
760760 if test == "standalone" :
761761 task_name = "mod-wsgi-"
762762 else :
@@ -930,15 +930,6 @@ def create_ocsp_tasks():
930930 return tasks
931931
932932
933- def create_free_threading_tasks ():
934- vars = dict (VERSION = "8.0" , TOPOLOGY = "replica_set" )
935- server_func = FunctionCall (func = "run server" , vars = vars )
936- test_func = FunctionCall (func = "run tests" )
937- task_name = "test-free-threading"
938- tags = ["free-threading" ]
939- return [EvgTask (name = task_name , tags = tags , commands = [server_func , test_func ])]
940-
941-
942933##############
943934# Functions
944935##############
0 commit comments