briefcase icon indicating copy to clipboard operation
briefcase copied to clipboard

Add support for free threading

Open freakboy3742 opened this issue 3 months ago • 2 comments

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:

  1. The free_threading option in Briefcase
  2. Modifying the support packages to include free threading builds
  3. Modifying the app templates to use libpythont rather than libpython.

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.

freakboy3742 avatar Sep 19 '25 08:09 freakboy3742

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.

mhsmith avatar Sep 19 '25 10:09 mhsmith

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.

freakboy3742 avatar Sep 19 '25 10:09 freakboy3742