* Add feature controlling the global reference pool to enable avoiding its overhead.
* Document reference-pool feature in the performance guide.
* Invert semantics of feature to disable reference pool so the new behaviour becomes opt-in
* Remove delayed reference count increments as we cannot prevent reference count errors as long as these are available
* Adjust tests to be compatible with disable-reference-pool feature
* Adjust tests to be compatible with py-clone feature
* Adjust the GIL benchmark to the updated reference pool semantics.
* Further extend and clarify the documentation of the py-clone and disable-reference-pool features
* Replace disable-reference-pool feature by pyo3_disable_reference_pool conditional compilation flag
Such a flag is harder to use and thereby also harder to abuse. This seems
appropriate as this is purely a performance-oriented change which show only be
enabled by leaf crates and brings with it additional highly implicit sources of
process aborts.
* Add pyo3_leak_on_drop_without_reference_pool to turn aborts into leaks when the global reference pool is disabled and the GIL is not held
* add `FromPyObjectBound` adjustment for `&str` without GIL Refs
* review: alex, Icxolu feedback
* add newsfragment
* add newsfragment for `FromPyObject` trait change
* make some examples compatible with abi3 < 3.10
* seal `FromPyObjectBound`
* fixup chrono_tz conversion
* deprecate `PyCell::new` in favor of `Py::new` or `Bound::new`
* update deprecation warning
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
---------
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
* Use the new bound API instead of .as_ref(py)
* Move import into a nested scope
* Use to_cow instead of to_str for compatibility
`to_str` is not available before Python 3.10 on the limited api.
* Relax &self lifetimes
* Use Bound<'py, PyAny> in test Mapping signatures
* Use .as_bytes(py)
* Simplify ThrowCallback::throw signature
* Avoid .as_any call with Py api instead of Bound