Skip to content

Migrate to free-threaded Python#230

Open
beer-psi wants to merge 2 commits intodevelopfrom
ft
Open

Migrate to free-threaded Python#230
beer-psi wants to merge 2 commits intodevelopfrom
ft

Conversation

@beer-psi
Copy link
Copy Markdown
Owner

@beer-psi beer-psi commented Mar 18, 2026

There's potentially a few data races in the bot that are not thread safe (bot-level caches are the big one; these include prefixes, denylist, aliases and permissions IIRC). These will have to be taken care of.

There are no python:3.14t-alpine images yet (https://redirect.github.com/docker-library/python/issues/1082). That's also a problem.

Some libraries also need to be updated:

  • selectolax (has free threaded wheels, but does not declare freethreaded compatibility)
  • sqlalchemy (2.1 has freethreading)
  • ciso8601 (took the liberty of making a free-threaded wheel since the free-threaded PR has been up for about 3 months at this point)

There's also probably some performance wins from putting gateway handling on another thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant