Skip to content

Conversation

elprans
Copy link
Member

@elprans elprans commented Oct 13, 2025

The bulk of the changes here is a rewrite of recordobj.c to use modern
CPython API to properly isolate the module (PEP 489, PEP 573, PEP 630).
This, along with Cython flags, enables support for safely importing
asyncpg in subinterpreters. The Record freelist is now
thread-specific, so asyncpg should be thread-safe at the C level.
Support for subinterpreters and freethreading is EXPERIMENTAL.

@ddanier
Copy link

ddanier commented Oct 14, 2025

As of no pre-built package being available for asyncpg on Python 3.14 you cannot install the package on "slim" docker images, cause gcc is not installed there. This is an issue as you tend to use those "slim" variants when you care about security. Of course it is possible to get this working by either compiling this package yourself on a non-"slim" image and then use a multistage build or switching to the non-"slim" version, but that either does increase complexity or reduce security significantly.

What I want to say: I really would like this to get finished and merged soon. Thanks for all the effort! ;-)

@elprans elprans changed the title Add Python 3.14 support, drop EOL 3.8 Add Python 3.14 support, experimental subinterpreter/freethreading support Oct 16, 2025
@elprans elprans requested review from 1st1 and fantix October 16, 2025 18:51
@elprans elprans force-pushed the py314 branch 2 times, most recently from e742ff7 to 7037527 Compare October 16, 2025 18:53
@elprans elprans requested a review from msullivan October 16, 2025 18:54
@elprans elprans force-pushed the py314 branch 2 times, most recently from de5489e to 483125b Compare October 17, 2025 03:36
…pport

The bulk of the changes here is a rewrite of `recordobj.c` to use modern
CPython API to properly isolate the module (PEP 489, PEP 573, PEP 630).
This, along with Cython flags, enables support for safely importing
`asyncpg` in subinterpreters.  The `Record` freelist is now
thread-specific, so asyncpg should be thread-safe *at the C level*.
Support for subinterpreters and freethreading is EXPERIMENTAL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants