Skip to content

Commit fd39d60

Browse files
committed
ban freethreading
1 parent d25d03c commit fd39d60

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

chia/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import importlib.metadata
4+
import sys
45

56
__version__: str
67
try:
@@ -15,3 +16,6 @@
1516
pass
1617
else:
1718
raise Exception("asserts are not working and _must_ be enabled, do not run with an optimized build of python")
19+
20+
if not getattr(sys, "_is_gil_enabled", lambda: True)():
21+
raise Exception("freethreading is not supported, do not run with a freethreaded build of python")

0 commit comments

Comments
 (0)