Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
- cp311-cp311
- cp312-cp312
- cp313-cp313
- cp314-cp314
- cp314-cp314t
permissions:
id-token: write # This is required for requesting the JWT
steps:
Expand All @@ -81,6 +83,8 @@ jobs:
- cp311-cp311
- cp312-cp312
- cp313-cp313
- cp314-cp314
- cp314-cp314t
permissions:
id-token: write # This is required for requesting the JWT
steps:
Expand Down Expand Up @@ -108,6 +112,8 @@ jobs:
- cp311-cp311
- cp312-cp312
- cp313-cp313
- cp314-cp314
- cp314-cp314t
permissions:
id-token: write # This is required for requesting the JWT
steps:
Expand All @@ -133,6 +139,8 @@ jobs:
- cp311-cp311
- cp312-cp312
- cp313-cp313
- cp314-cp314
- cp314-cp314t
permissions:
id-token: write # This is required for requesting the JWT
steps:
Expand Down
14 changes: 12 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
# sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET').
MACOS_DEPLOYMENT_TARGET_MIN = "10.15"

# True if this is a free-threaded Python build.
FREE_THREADED_BUILD = sysconfig.get_config_var("Py_GIL_DISABLED")

# This is the minimum version of the Windows SDK needed for schannel.h with SCH_CREDENTIALS and
# TLS_PARAMETERS. These are required to build Windows Binaries with TLS 1.3 support.
WINDOWS_SDK_VERSION_TLS1_3_SUPPORT = "10.0.17763.0"
Expand Down Expand Up @@ -428,7 +431,10 @@ class bdist_wheel_abi3(bdist_wheel):
def get_tag(self):
python, abi, plat = super().get_tag()
# on CPython, our wheels are abi3 and compatible back to 3.11
if python.startswith("cp") and sys.version_info >= (3, 13):
# but free-threaded builds don't use limited API, so skip abi3 tag
if FREE_THREADED_BUILD:
return python, abi, plat
elif python.startswith("cp") and sys.version_info >= (3, 13):
# 3.13 deprecates PyWeakref_GetObject(), adds alternative
return "cp313", "abi3", plat
elif python.startswith("cp") and sys.version_info >= (3, 11):
Expand Down Expand Up @@ -532,7 +538,11 @@ def awscrt_ext():
extra_link_args += ['-Wl,--fatal-warnings']

# prefer building with stable ABI, so a wheel can work with multiple major versions
if sys.version_info >= (3, 13):
if FREE_THREADED_BUILD and sys.version_info[:2] == (3, 14):
# 3.14 free threaded (aka no gil) does not support limited api.
# disable it for now. 3.15 promises to support limited api + free threading combo
py_limited_api = False
elif sys.version_info >= (3, 13):
# 3.13 deprecates PyWeakref_GetObject(), adds alternative
define_macros.append(('Py_LIMITED_API', '0x030D0000'))
py_limited_api = True
Expand Down
4 changes: 4 additions & 0 deletions source/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,10 @@ PyMODINIT_FUNC PyInit__awscrt(void) {
return NULL;
}

#ifdef Py_GIL_DISABLED
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
#endif

s_init_allocator();

/* Don't report this memory when dumping possible leaks. */
Expand Down