@@ -48,6 +48,7 @@ pre-commit = [
4848]
4949tests = [
5050 " pytest" ,
51+ " pytest-run-parallel; python_full_version >= '3.13'" ,
5152]
5253typing = [
5354 " mypy" ,
@@ -67,7 +68,10 @@ testpaths = ["tests"]
6768filterwarnings = [
6869 " error" ,
6970]
70-
71+ markers = [
72+ # Needed when pytest-run-parallel is not installed
73+ " thread_unsafe: mark test as not safe to run in multiple threads" ,
74+ ]
7175[tool .coverage .run ]
7276branch = true
7377source = [" markupsafe" , " tests" ]
@@ -124,6 +128,7 @@ tag-only = [
124128
125129[tool .tox ]
126130env_list = [
131+ " py3.14" , " py3.14t" , " parallel" ,
127132 " py3.13" , " py3.13t" , " py3.12" , " py3.11" , " py3.10" ,
128133 " pypy3.11" ,
129134 " style" ,
@@ -144,6 +149,15 @@ commands = [[
144149 {replace = " posargs" , default = [], extend = true },
145150]]
146151
152+ [tool .tox .env .parallel ]
153+ description = " check for free threading issues"
154+ base_python = [" 3.14t" ]
155+ commands = [[
156+ " pytest" , " -v" , " --tb=short" , " --basetemp=env_tmp_dir" ,
157+ " --parallel-threads=8" ,
158+ {replace = " posargs" , default = [], extend = true },
159+ ]]
160+
147161[tool .tox .env .style ]
148162description = " run all pre-commit hooks on all files"
149163dependency_groups = [" pre-commit" ]
@@ -188,3 +202,21 @@ dependency_groups = []
188202no_default_groups = true
189203skip_install = true
190204commands = [[" uv" , " lock" , {replace = " posargs" , default = [" -U" ], extend = true }]]
205+
206+ [tool .cibuildwheel ]
207+ enable = " cpython-freethreading"
208+ build-frontend = " build[uv]"
209+
210+ [[tool .cibuildwheel .overrides ]]
211+ select = " *-musllinux_riscv64"
212+ # uv is not available
213+ build-frontend = " build"
214+
215+ [tool .cibuildwheel .linux ]
216+ archs = [" x86_64" , " aarch64" , " riscv64" ]
217+
218+ [tool .cibuildwheel .macos ]
219+ archs = [" x86_64" , " arm64" ]
220+
221+ [tool .cibuildwheel .windows ]
222+ archs = [" auto" , " ARM64" ]
0 commit comments