-
Notifications
You must be signed in to change notification settings - Fork 854
Declare free-threaded support for PyModule #4588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
b120d45
WIP: declare free-threaded support in pymodule macro
ngoldbaum 5218108
ignore ruff lint about unused import
ngoldbaum 1a52a05
eliminate gil re-enabling in pytests
ngoldbaum cabf707
fix clippy nit
ngoldbaum fed9ebd
fix return type of PyUnstable_Module_SetGIL binding
ngoldbaum 67c54b8
add a way to declare free-threaded support without macros
ngoldbaum d36b088
fix ruff
ngoldbaum 7145100
fix changed ui test answer
ngoldbaum faf3aa0
fix build issues on old python versions
ngoldbaum 698250b
fix runtime warnings in examples
ngoldbaum 7ec3c15
ensure that the GIL does not get re-enabled in the pytests
ngoldbaum 78db4a4
add changelog entry
ngoldbaum 447231f
fix ruff
ngoldbaum 5940fb8
fix compiler error on older pythons
ngoldbaum ebdcf27
fix clippy
ngoldbaum a51ca89
really fix clippy and expose supports_free_threaded on all builds
ngoldbaum 4a6005c
fix clippy and msrv
ngoldbaum 72c3032
fix examples on gil-disabled python
ngoldbaum 33fb8cb
fix free-threaded clippy
ngoldbaum 04a48d8
fix unused import in example
ngoldbaum d2d3cb4
Add pyo3-build-config as a build dependency to examples that need it
ngoldbaum 9f0688d
add docs
ngoldbaum 003aa36
add rust tests so coverage picks up the new code
ngoldbaum 1def33b
fix some formatting issues
ngoldbaum d3ca9a2
Apply cleanups
ngoldbaum c272082
fix cargo fmt --check
ngoldbaum 244a32c
revert changes to non-FFI examples
ngoldbaum 1868e21
apply David's suggestion for the guide
ngoldbaum 7495e8e
link to raw FFI examples in the guide
ngoldbaum 3fa6f52
fix config guards in moduleobject.rs
ngoldbaum c34853b
rename supports_free_threaded to gil_used
ngoldbaum 042e2bf
remove ensure_gil_enabled from pyo3-ffi/build.rs
ngoldbaum db912bf
update docs for PyModule::gil_used
ngoldbaum 371ce0c
remove UNSAFE_PYO3_BUILD_FREE_THREADED from the CI config
ngoldbaum e38676c
fix merge conflict screwup
ngoldbaum f9dae80
fix nox -s test-py
ngoldbaum bd5473c
fix guide links
ngoldbaum 45ba422
remove redundant pytest test
ngoldbaum f40dbc9
fix issue with wrap_pymodule not respecting user choice for GIL support
ngoldbaum 1c42dbe
replace map.unwrap_or with map_or
ngoldbaum ff891f6
fix refcounting error in ffi example
ngoldbaum File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* It is now possible to declare that a module supports the free-threaded build | ||
by either calling `PyModule::gil_used` or passing | ||
`gil_used = false` as a parameter to the `pymodule` proc macro. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main() { | ||
pyo3_build_config::use_pyo3_cfgs(); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main() { | ||
pyo3_build_config::use_pyo3_cfgs(); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.