Skip to content

Add support for free-threading/No-GIL #1545

@daveisfera

Description

@daveisfera

Summary

GIL is enabled when using a free-threading build of 3.14

<frozen importlib._bootstrap>:491: RuntimeWarning: The global interpreter lock (GIL) has been enabled to load module 'newrelic.packages.wrapt._wrappers', which has not declared that it can run safely without the GIL. To override this behavior and keep the GIL disabled (at your own risk), run with PYTHON_GIL=0 or -Xgil=0.

Desired Behavior

GIL would remain disabled

Possible Solution

Not sure if changes need to be made to the code, but in the minimum the newrelic module needs to declare that it's safe without the GIL so it won't be automatically disabled.

Additional context

We're looking to move to run with free-threading to improve performance in our parallel workers and this is preventing it.

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new or enhanced features.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions