Skip to content

Switching between free-threaded and standard ABI does not invalidate build cache #4882

Description

@ngoldbaum

Bug Description

See this bcrypt PR, which fixed a caching issue seen on github actions that led to a segfault. IMO this caching issue should have just led to a rebuild rather than a silently broken build.

Steps to Reproduce

I've only been able to trigger this on bcrypt's CI, but now that I understand what's happening I suspect that if you build PyO3 (or a project that depends on PyO3) with a gil-enabled interpreter and then try to rebuild the project with a free-threaded interpreter but keeping the build cache, you will get a successful build but the python extension will be broken.

Your operating system and version

MacOS

Your Python version (python --version)

3.13.1

Your Rust version (rustc --version)

1.84.0

Your PyO3 version

0.23.4

How did you install python? Did you use a virtualenv?

github actions setup-python action

Additional Info

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions