Skip to content

Commit db5c9c6

Browse files
author
Matthew Barnett
committed
Git issue 565: Support the free-threaded build of CPython 3.13
1 parent 49e3881 commit db5c9c6

File tree

6 files changed

+19
-3
lines changed

6 files changed

+19
-3
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
env:
1111
PYTHON_VER: '3.11' # Python to run test/cibuildwheel
12-
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*
12+
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-* cp313t-* cp314-* cp314t-*
1313
CIBW_TEST_COMMAND: python -m unittest regex.test_regex
1414

1515
jobs:

changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Version: 2025.9.18
2+
3+
Git issue 565: Support the free-threaded build of CPython 3.13
4+
15
Version: 2025.9.1
26

37
Git PR 585: Fix AttributeError: 'AnyAll' object has no attribute '_key'

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "regex"
7-
version = "2025.9.1"
7+
version = "2025.9.18"
88
description = "Alternative regular expression module, to replace re."
99
readme = "README.rst"
1010
authors = [

regex_3/_regex.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26405,6 +26405,10 @@ PyMODINIT_FUNC PyInit__regex(void) {
2640526405
if (!m)
2640626406
return NULL;
2640726407

26408+
#if defined(Py_GIL_DISABLED)
26409+
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
26410+
#endif
26411+
2640826412
d = PyModule_GetDict(m);
2640926413

2641026414
x = PyLong_FromLong(RE_MAGIC);

regex_3/regex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@
241241
"VERSION1", "X", "VERBOSE", "W", "WORD", "error", "Regex", "__version__",
242242
"__doc__", "RegexFlag"]
243243

244-
__version__ = "2.5.161"
244+
__version__ = "2.5.162"
245245

246246
# --------------------------------------------------------------------
247247
# Public interface.

setup.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22
# -*- coding: utf-8 -*-
33
from setuptools import setup, Extension
44
from os.path import join
5+
import sysconfig
6+
7+
macros = []
8+
free_threaded = sysconfig.get_config_var("Py_GIL_DISABLED")
9+
10+
if free_threaded:
11+
macros.append(("Py_GIL_DISABLED", "1"))
512

613
setup(
714
ext_modules=[Extension('regex._regex', [join('regex_3', '_regex.c'),
815
join('regex_3', '_regex_unicode.c')])],
16+
define_macros=macros,
917
)

0 commit comments

Comments
 (0)