Skip to content

Allow building in free-threaded python#2286

Draft
ricardoV94 wants to merge 1 commit into
pymc-devs:mainfrom
ricardoV94:free_threaded
Draft

Allow building in free-threaded python#2286
ricardoV94 wants to merge 1 commit into
pymc-devs:mainfrom
ricardoV94:free_threaded

Conversation

@ricardoV94

@ricardoV94 ricardoV94 commented Jul 10, 2026

Copy link
Copy Markdown
Member

Now that C-backend is not the default, there's no good reason to prevent free-threaded builds.

Our C extensions are not thread-safe, if imported all that would happen is that python would just re-enable the gil with a warning.

Care must be taken to split the memory and shared variables of a compiled function fn.copy(share_memory=False, swap={}) before threading, but that's not really new. See pymc-devs/pymc#8355 for an example

@ricardoV94 ricardoV94 marked this pull request as draft July 10, 2026 13:38
@ricardoV94 ricardoV94 force-pushed the free_threaded branch 4 times, most recently from fbb512a to 48ae917 Compare July 10, 2026 15:18
@ricardoV94 ricardoV94 force-pushed the free_threaded branch 4 times, most recently from 68b2ada to 00788dc Compare July 10, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant