python-pillow / Pillow

Python Imaging Library (Fork)
https://python-pillow.org
Other
11.89k stars 2.2k forks source link

Python 3.13 free-threading compatibility #8199

Open lysnikolaou opened 3 days ago

lysnikolaou commented 3 days ago

Hey all! 👋

This aims to be a tracking issue for all work necessary to support the free-threaded build of Python 3.13. A very high-level list of steps is (more details to follow as I investigate more issues):

hugovk commented 3 days ago

Thanks for opening this issue!

As some background, the acceptance of PEP 703 lays out the three phases for disabling the GIL. Python 3.13 is the first in the experimental phase I, where a free-threaded build is available as an option in the Windows and macOS installers, and can be built for Linux (and the other platforms) using an extra flag.

So now is a good time to start testing on free-threaded builds, and getting the code ready. It will be good to produce wheels at some point, to help others test and integrate. These will be experimental and not for production.

I've made a start on the first two steps, I'll open a PR for the CI first.

Some handy references:

hugovk commented 3 days ago

Please see PR https://github.com/python-pillow/Pillow/pull/8200 to set up CI for free-threading.