* Implement PyErr::value_bound
* Use PyErr::value_bound in conversions
* Implement PyErr::from_value_bound
* Remove unnecessary clone
* Return a reference from PyErr::value_bound
* Avoid clone in PyErr::from_value_bound
* Use PyErr::from_value_bound instead of from_value
* Remove unnecessary .as_borrowed() calls
* Remove unused import
* Simplify UnraisableCapture.hook
* Use Bound::from_owned_ptr_or_opt in fn cause
* Update PyErrState::lazy to take Py<PyAny>
This is easier to work with elsewhere than `&PyAny` or
`Bound<'py, PyAny>`.
* Add Bound PyUnicodeDecodeError constructors
* Update PyErr::from_value_bound to take Bound
* Simplify PyErr::from_value
* Simplify PyErr::value
* Remove unnecessary reference
* Simplify Pyerr::cause implementation
* Simplify PyUnicodeDecodeError::new_bound
* add `PyBackedStr` and `PyBackedBytes`
* review: adamreichold feedback
* use `NonNull<[u8]>`
* clippy and newsfragment
* drop binding unused after refactoring
---------
Co-authored-by: Adam Reichold <adam.reichold@t-online.de>
* port `Python::import` to `Bound` API
* tidy up imports in tests/test_datetime_import.rs
---------
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
* Implement PyErr::is_instance_bound
* Update is_instance_bound to take a reference
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
* Remove spurious clone
---------
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
* Implement PyErr::get_type_bound
* Update docs for PyErr::get_type_bound
* Fix doctest for cloning PyErr
* Import the whole prelude in docs example
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
* Remove unnecessary self lifetime
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
* Remove more unnecessary self lifetimes
* Use variables to avoid dangling pointers
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
* Avoid using ffi in fn ptype on Py_3_12
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
* Add missing imports to fn ptype
---------
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
* Update debugging.md
Added clarification. --pretty no longer works, and it breaks even on nightly at least on cargo 1.78.0-nightly (cdf84b69d 2024-02-02) and
rustc 1.78.0-nightly (256b6fb19 2024-02-06).
* Update guide/src/debugging.md
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
---------
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
* Update building_and_distribution.md
Link to README not working.
* Update guide/src/building_and_distribution.md
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
---------
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
Installing nox was mentioned in a later section when building
the user guide but not at this point earlier in the guide where
nox was needed for the first time.