Skip to content
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

Add rust to porting guide and update tracking guide #115

Merged
merged 10 commits into from
Nov 19, 2024
Prev Previous commit
Next Next commit
link to full porting guide instructions for Rust testing guidance
  • Loading branch information
ngoldbaum committed Nov 19, 2024
commit 3d914719549c4953d5b016956b9b1e181b1f94f3
12 changes: 6 additions & 6 deletions docs/porting.md
Original file line number Diff line number Diff line change
@@ -163,12 +163,12 @@ after importing a module that does not support the GIL.
free-threaded Python. You must also update your extension to at least
version 0.23.

You should write multithreaded tests of any code you expose to Python. You
can leverage your existing test suite and
[`pytest-run-parallel`](https://github.com/Quansight-Labs/pytest-run-parallel)
to discover thread safety issues due to use of global state, but you should
also write explicitly multithreaded tests using any data structures provided
by modules defined in Rust extensions.
You should write multithreaded tests of any code you expose to Python. See
the details about testing in our [suggested plan of
attack](porting.md#suggested-plan-of-attack) below as well as the guidance
for [updating test suites](porting.md#fixing-thread-unsafe-tests). You
should fix any thread safety issues you discover while running multithreaded
tests.

As of PyO3 0.23, PyO3 enforces Rust's borrow checking rules at
runtime and may produce runtime panics if you simultaneously mutably borrow