| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
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! ;-) |
Sorry, something went wrong.
| @@ -0,0 +1,1281 @@ | |||
| /* Big parts of this file are copied (with modifications) from | |||
There was a problem hiding this comment.
Any reason for this file to be moved? No diff now, all code is like new which makes review harder
Sorry, something went wrong.
There was a problem hiding this comment.
There were some odd Cython issues initially, but I'll see if I can move it back.
Sorry, something went wrong.
There was a problem hiding this comment.
Done, @1st1, please take another look.
Sorry, something went wrong.
There was a problem hiding this comment.
Can we move recordobj.c back where it was?
Sorry, something went wrong.
I couldn't find a way to do it. Cython does not expose a way to plug into its generated module state, so record must be a standalone module, not a concatenation. Why is this important? |
Sorry, something went wrong.
Just for me to review the thing, it's a big file. Were there any changes in it? |
Sorry, something went wrong.
…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.
| v_is_tuple = 1; | ||
| } | ||
| else if (ApgRecord_CheckExact(v)) { | ||
| else if (v_type == state->ApgRecord_Type) { |
There was a problem hiding this comment.
I'd keep the ApgRecord_CheckExact macros, just make it accept state as first arg.
Sorry, something went wrong.
| cmp = vlen >= wlen; | ||
| break; | ||
| default: | ||
| return NULL; /* cannot happen */ |
There was a problem hiding this comment.
Py_UNREACHABLE();
Sorry, something went wrong.
There was a problem hiding this comment.
looks ok but please run tests in refleak hunt mode
Sorry, something went wrong.
|
When is this expected to be released? |
Sorry, something went wrong.
Enable Python 3.14 with experimental subinterpreter/freethreading support. Improvements ============ * Add Python 3.14 support, experimental subinterpreter/freethreading support (#1279) (by @elprans in 9e42642) * Avoid performing type introspection on known types (#1243) (by @elprans in 5c9986c) * Make `prepare()` not use named statements by default when cache is disabled (#1245) (by @elprans in 5b14653) * Implement connection service file functionality (#1223) (by @AndrewJackson2020 in 1d63bb1) Fixes ===== * Fix multi port connection string issue (#1222) (by @AndrewJackson2020 in 01c0db7) * Avoid leaking connections if _can_use_connection fails (#1269) (by @yuliy-openai in e94302d) Other ===== * Drop support for EOL Python 3.8 (#1281) (by @elprans in 6c2c490)
asyncpg v0.31.0 Enable Python 3.14 with experimental subinterpreter/freethreading support. Improvements ============ * Add Python 3.14 support, experimental subinterpreter/freethreading support (MagicStack#1279) (by @elprans in 9e42642) * Avoid performing type introspection on known types (MagicStack#1243) (by @elprans in 5c9986c) * Make `prepare()` not use named statements by default when cache is disabled (MagicStack#1245) (by @elprans in 5b14653) * Implement connection service file functionality (MagicStack#1223) (by @AndrewJackson2020 in 1d63bb1) Fixes ===== * Fix multi port connection string issue (MagicStack#1222) (by @AndrewJackson2020 in 01c0db7) * Avoid leaking connections if _can_use_connection fails (MagicStack#1269) (by @yuliy-openai in e94302d) Other ===== * Drop support for EOL Python 3.8 (MagicStack#1281) (by @elprans in 6c2c490) # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEES/rQWfT9RAppNY3YXEaHeAYth78FAmkk6UMACgkQXEaHeAYt # h7+LBw//fX/3/nHrEUctYR7A/WQqg2oj3nvk10b3OQjzHUGyHq0DhkSC7/H9P0FI # vl0j2n+BfKcKxOw4OgbxDq5fff/a4ScsejVwsKqQEEDH9tiXAL2cIId1yvNWC9hJ # 8WxmkJzbFHdrl1D3/pxUv15UoaMSZD1DtPXaYEupRyEKXVOfQ/ush5GU5M3vA19R # aWrAFtbMd3MMfaBYEO1TQtZNCV3n3Dv8fmIwv8qPbqJt2lsk4HOE8F3Be/RGiaPZ # dI9eGnZ+qmlYC/mZYKNywaBlm4v/hHhuGwSh8WdkY6h4lFkBl8HipuPpoNeWO/fd # k5wl1Q2HA8i2qEokz7EzYPRYjOPZwXphxscRXJQbdlCNyfJ+lPTu3uAQ08RTnoGU # +JROauwgtQknnZEGtRWNerRcbZE1D+SgkLhGkEk6+tcIJ0G2XoCsn7A/u9LMmZuN # 7lcFnLEdDnUSaLx7SZgcbOKP1Acg1W2Vk375JxXrymGqq5FPss8cdg+KOFMNuljT # v/RtKvAP3yXpR448uPQ6M4BNVJ5my3UwdPrHwpGNkSxaqKBGGtryBG4LLw43yPCg # FPFO9P//z+59RsmAvilaOhT/pLhqRvOJTkaUt5bt6Fw+5SzCfNfciNkl4rBC+9EQ # LC/NQmO9cFYlpnO7s3uF0M+JTLV1u0CJp5G5USiQiEU+tVlaH6E= # =bEvL # -----END PGP SIGNATURE----- # gpg: Signature made Tue 25 Nov 2025 12:24:51 AM CET # gpg: using RSA key 4BFAD059F4FD440A69358DD85C468778062D87BF # gpg: Can't check signature: No public key
asyncpg v0.31.0 Enable Python 3.14 with experimental subinterpreter/freethreading support. Improvements ============ * Add Python 3.14 support, experimental subinterpreter/freethreading support (MagicStack#1279) (by @elprans in 9e42642) * Avoid performing type introspection on known types (MagicStack#1243) (by @elprans in 5c9986c) * Make `prepare()` not use named statements by default when cache is disabled (MagicStack#1245) (by @elprans in 5b14653) * Implement connection service file functionality (MagicStack#1223) (by @AndrewJackson2020 in 1d63bb1) Fixes ===== * Fix multi port connection string issue (MagicStack#1222) (by @AndrewJackson2020 in 01c0db7) * Avoid leaking connections if _can_use_connection fails (MagicStack#1269) (by @yuliy-openai in e94302d) Other ===== * Drop support for EOL Python 3.8 (MagicStack#1281) (by @elprans in 6c2c490) # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEES/rQWfT9RAppNY3YXEaHeAYth78FAmkk6UMACgkQXEaHeAYt # h7+LBw//fX/3/nHrEUctYR7A/WQqg2oj3nvk10b3OQjzHUGyHq0DhkSC7/H9P0FI # vl0j2n+BfKcKxOw4OgbxDq5fff/a4ScsejVwsKqQEEDH9tiXAL2cIId1yvNWC9hJ # 8WxmkJzbFHdrl1D3/pxUv15UoaMSZD1DtPXaYEupRyEKXVOfQ/ush5GU5M3vA19R # aWrAFtbMd3MMfaBYEO1TQtZNCV3n3Dv8fmIwv8qPbqJt2lsk4HOE8F3Be/RGiaPZ # dI9eGnZ+qmlYC/mZYKNywaBlm4v/hHhuGwSh8WdkY6h4lFkBl8HipuPpoNeWO/fd # k5wl1Q2HA8i2qEokz7EzYPRYjOPZwXphxscRXJQbdlCNyfJ+lPTu3uAQ08RTnoGU # +JROauwgtQknnZEGtRWNerRcbZE1D+SgkLhGkEk6+tcIJ0G2XoCsn7A/u9LMmZuN # 7lcFnLEdDnUSaLx7SZgcbOKP1Acg1W2Vk375JxXrymGqq5FPss8cdg+KOFMNuljT # v/RtKvAP3yXpR448uPQ6M4BNVJ5my3UwdPrHwpGNkSxaqKBGGtryBG4LLw43yPCg # FPFO9P//z+59RsmAvilaOhT/pLhqRvOJTkaUt5bt6Fw+5SzCfNfciNkl4rBC+9EQ # LC/NQmO9cFYlpnO7s3uF0M+JTLV1u0CJp5G5USiQiEU+tVlaH6E= # =bEvL # -----END PGP SIGNATURE----- # gpg: Signature made Tue 25 Nov 2025 12:24:51 AM CET # gpg: using RSA key 4BFAD059F4FD440A69358DD85C468778062D87BF # gpg: Can't check signature: No public key
| Back | FazBrowse Home | New Git URL |
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.