Skip to content

Commit

Permalink
fully remove the rest of the gil-refs (#4378)
Browse files Browse the repository at this point in the history
* fully remove the rest of the gil-refs

* add newsfragment
  • Loading branch information
Icxolu authored Jul 26, 2024
1 parent cf55960 commit 1ca484d
Show file tree
Hide file tree
Showing 35 changed files with 16 additions and 3,080 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ generate-import-lib = ["pyo3-ffi/generate-import-lib"]
# Changes `Python::with_gil` to automatically initialize the Python interpreter if needed.
auto-initialize = []

# Allows use of the deprecated "GIL Refs" APIs.
gil-refs = ["pyo3-macros/gil-refs"]

# Enables `Clone`ing references to Python objects `Py<T>` which panics if the GIL is not held.
py-clone = []

Expand Down
1 change: 0 additions & 1 deletion guide/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
- [Parallelism](parallelism.md)
- [Debugging](debugging.md)
- [Features reference](features.md)
- [Memory management](memory.md)
- [Performance](performance.md)
- [Advanced topics](advanced.md)
- [Building and distribution](building-and-distribution.md)
Expand Down
5 changes: 0 additions & 5 deletions guide/src/class.md
Original file line number Diff line number Diff line change
Expand Up @@ -1367,11 +1367,6 @@ struct MyClass {

impl pyo3::types::DerefToPyAny for MyClass {}

# #[allow(deprecated)]
# #[cfg(feature = "gil-refs")]
unsafe impl pyo3::type_object::HasPyGilRef for MyClass {
type AsRefTarget = pyo3::PyCell<Self>;
}
unsafe impl pyo3::type_object::PyTypeInfo for MyClass {
const NAME: &'static str = "MyClass";
const MODULE: ::std::option::Option<&'static str> = ::std::option::Option::None;
Expand Down
309 changes: 0 additions & 309 deletions guide/src/memory.md

This file was deleted.

2 changes: 1 addition & 1 deletion guide/src/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ A key thing to note here is because extracting to these types now ties them to t

Before:

```rust
```rust,ignore
# #[cfg(feature = "gil-refs")] {
# use pyo3::prelude::*;
# use pyo3::types::{PyList, PyType};
Expand Down
Loading

0 comments on commit 1ca484d

Please sign in to comment.