Skip to content

Fully support free threaded Python #568

@rogerbinns

Description

@rogerbinns

The GIL is currently relied upon. It will likely go away eventually.

https://py-free-threading.github.io/
https://docs.python.org/3.14/howto/free-threading-extensions.html

  • Update unicode to say GIL not needed
  • The utf8/offset mappers likely need critical sections
  • Update apsw module to say GIL not needed
  • Update usage of the APIs in the above doc so that borrowed reference APIs are replaced with strong reference ones, or use new macros that do critical sections
  • There can't be any returns or gotos inside blocks with critical section boundaries
  • Almost certainly the best thing to do is write a tool to process the source that does all this checking
  • Add compat versions of those APIs for older Pythons
  • Mutex the statement cache
  • Check all global, Connection, Cursor etc PyObject variables that are mutable
  • Check all function bodies that have mutable input parameters

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions