-
Notifications
You must be signed in to change notification settings - Fork 783
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
docs: Add and fix links in free-threading guide. #4673
Conversation
I could probably use |
Yes please, I think it would be better to use the links to the exact PyO3 version using Other than that, this is a welcome improvement, thanks 🙏 |
Moved all the |
@@ -1064,7 +1064,7 @@ Python::with_gil(|py| { | |||
}); | |||
``` | |||
|
|||
Furthermore, `Python::acquire_gil` provides ownership of a `GILGuard` which can be freely stored and passed around. This is usually not helpful as it may keep the lock held for a long time thereby blocking progress in other parts of the program. Due to the generative lifetime attached to the GIL token supplied by `Python::with_gil`, the problem is avoided as the GIL token can only be passed down the call chain. Often, this issue can also be avoided entirely as any GIL-bound reference `&'py PyAny` implies access to a GIL token `Python<'py>` via the [`PyAny::py`](https://docs.rs/pyo3/latest/pyo3/types/struct.PyAny.html#method.py) method. | |||
Furthermore, `Python::acquire_gil` provides ownership of a `GILGuard` which can be freely stored and passed around. This is usually not helpful as it may keep the lock held for a long time thereby blocking progress in other parts of the program. Due to the generative lifetime attached to the GIL token supplied by `Python::with_gil`, the problem is avoided as the GIL token can only be passed down the call chain. Often, this issue can also be avoided entirely as any GIL-bound reference `&'py PyAny` implies access to a GIL token `Python<'py>` via the [`PyAny::py`](https://docs.rs/pyo3/0.22.5/pyo3/types/struct.PyAny.html#method.py) method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one is a method that will be removed in 0.23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super, please merge after reverting just one piece :)
guide/pyclass-parameters.md
Outdated
@@ -39,7 +39,7 @@ struct MyClass {} | |||
struct MyClass {} | |||
``` | |||
|
|||
[params-1]: https://docs.rs/pyo3/latest/pyo3/types/struct.PyAny.html | |||
[params-1]: {{#PYO3_DOCS_URL}}/pyo3/types/struct.PyAny.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is actually reused inside lib.rs
so can't have this placeholder :(
[params-1]: {{#PYO3_DOCS_URL}}/pyo3/types/struct.PyAny.html | |
[params-1]: https://docs.rs/pyo3/latest/pyo3/types/struct.PyAny.html |
This is mostly adding links. There are a few small text edits and fixes as well.