Add support for free threading
What is the problem or limitation you are having?
With the release of Python 3.14, free threading will become a non-experimental feature of Python. Briefcase should support generating apps that use free threading.
Describe the solution you'd like
An app should be able to set free_threading = true; the resulting app would use the t ABI variants in support packages and wheels.
Describe alternatives you've considered
Do nothing, and wait until free threading is either the default or abandoned as an approach.
Additional context
There are a lot of moving pieces that need to be implemented:
- The
free_threadingoption in Briefcase - Modifying the support packages to include free threading builds
- Modifying the app templates to use
libpythontrather thanlibpython.
Once the base free threading option is available, support can be added on a per-platform basis - so it should be possible to (for example) implement support for Windows, but raise an error on macOS.
Do nothing, and wait until free threading is either the default or abandoned as an approach.
I think this is the best approach. This would be a lot of work for something which doesn't make any difference to most apps, and is likely to become the default within a couple of years anyway.
The counterpoint to that position is that one of the things that will make it easier for the CPython core team to make a decision about whether to switch (or not) is evidence from the community that free-threading is (or isn't) a net gain. To that end, having Briefcase in a position to provide data to support that analysis seems worthwhile.
I'd argue this is especially important on mobile, as there will be a paucity of evidence supporting the use of free threading on mobile.