Skip to content

Commit 72bf703

Browse files
committed
setup.py: Add explicit warning on lack of support for 3.13 freethreading
jetski found that python/cpython#144513 is necessary, since we access a lot of objects (indirectly holding CS) while under STW. We don't test 3.13t anyways, so just warn it.
1 parent d590675 commit 72bf703

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎setup.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os.path
22
import re
33
import sys
4+
import sysconfig
45
from setuptools import setup, Extension
56
from distutils.command.install import INSTALL_SCHEMES
67

@@ -51,6 +52,10 @@ def doit():
5152
print('''\
5253
setup.py: Warning: This guppy package only supports CPython.
5354
Compilation failure expected, but continuting anyways...''', file=sys.stderr)
55+
if sys.version_info < (3, 14) and sysconfig.get_config_var('Py_GIL_DISABLED'):
56+
print('''\
57+
setup.py: Warning: This guppy package only supports freethreading in Python 3.14+.
58+
Continuting anyways...''', file=sys.stderr)
5459

5560
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as f:
5661
long_description = f.read()
@@ -78,7 +83,7 @@ def doit():
7883
"guppy.sets",
7984
],
8085
ext_modules=[setsc, heapyc],
81-
python_requires='>=3.10',
86+
python_requires='>=3.11',
8287
classifiers=[
8388
"Programming Language :: Python :: 3",
8489
"Programming Language :: Python :: Implementation :: CPython",

0 commit comments

Comments
 (0)