1
1
mirror of https://github.com/mrabarnett/mrab-regex.git synced 2025-10-05 20:02:39 +02:00

Git issue 565: Support the free-threaded build of CPython 3.13

This commit is contained in:
Matthew Barnett
2025-09-18 23:30:05 +01:00
parent 49e3881e9f
commit db5c9c636e
6 changed files with 19 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ on:
env:
PYTHON_VER: '3.11' # Python to run test/cibuildwheel
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-* cp313t-* cp314-* cp314t-*
CIBW_TEST_COMMAND: python -m unittest regex.test_regex
jobs:

View File

@@ -1,3 +1,7 @@
Version: 2025.9.18
Git issue 565: Support the free-threaded build of CPython 3.13
Version: 2025.9.1
Git PR 585: Fix AttributeError: 'AnyAll' object has no attribute '_key'

View File

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "regex"
version = "2025.9.1"
version = "2025.9.18"
description = "Alternative regular expression module, to replace re."
readme = "README.rst"
authors = [

View File

@@ -26405,6 +26405,10 @@ PyMODINIT_FUNC PyInit__regex(void) {
if (!m)
return NULL;
#if defined(Py_GIL_DISABLED)
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
#endif
d = PyModule_GetDict(m);
x = PyLong_FromLong(RE_MAGIC);

View File

@@ -241,7 +241,7 @@ __all__ = ["cache_all", "compile", "DEFAULT_VERSION", "escape", "findall",
"VERSION1", "X", "VERBOSE", "W", "WORD", "error", "Regex", "__version__",
"__doc__", "RegexFlag"]
__version__ = "2.5.161"
__version__ = "2.5.162"
# --------------------------------------------------------------------
# Public interface.

View File

@@ -2,8 +2,16 @@
# -*- coding: utf-8 -*-
from setuptools import setup, Extension
from os.path import join
import sysconfig
macros = []
free_threaded = sysconfig.get_config_var("Py_GIL_DISABLED")
if free_threaded:
macros.append(("Py_GIL_DISABLED", "1"))
setup(
ext_modules=[Extension('regex._regex', [join('regex_3', '_regex.c'),
join('regex_3', '_regex_unicode.c')])],
define_macros=macros,
)