yarl icon indicating copy to clipboard operation
yarl copied to clipboard

📦 Start building wheels with free-threading

Open webknjaz opened this issue 1 year ago • 5 comments

What do these changes do?

Fancy 3.13t stuff.

Are there changes in behavior for the user?

Being able to install from wheels under free-threaded Python builds.

Related issue number

N/A

Checklist

  • [x] I think the code is well written
  • [ ] Unit tests for the changes exist
  • [ ] Documentation reflects the changes

webknjaz avatar Sep 05 '24 13:09 webknjaz

Looks like this needs an unreleased Cython version from Git.

webknjaz avatar Sep 05 '24 13:09 webknjaz

I think we need to wait for Cython 3.1+ to do this

https://docs.cython.org/en/latest/src/userguide/freethreading.html

bdraco avatar Sep 07 '24 21:09 bdraco

Looks like 3.1 is getting closer https://github.com/cython/cython/milestone/65

bdraco avatar Oct 08 '24 08:10 bdraco

Projects like numpy use a development version of cython to build wheels because the cython release might be far away.

isuruf avatar Oct 16 '24 15:10 isuruf

This is fine, we're not in a hurry. It's always been like this.

webknjaz avatar Oct 16 '24 17:10 webknjaz

The target cannot be solved by upgrading Cython version only.

IIRC the quoter uses pre-allocated memory buffer for small strings: https://github.com/aio-libs/yarl/blob/master/yarl/_quoting_c.pyx#L28

Now it's access is protected by GIL, gil-less solution requires some sort of explicit synchronization.

asvetlov avatar Oct 30 '24 09:10 asvetlov

Closing as it's been implemented in #1456 already.

webknjaz avatar Jun 16 '25 08:06 webknjaz