Bump pyo3 from 0.21.2 to 0.22.2
Bumps pyo3 from 0.21.2 to 0.22.2.
Release notes
Sourced from pyo3's releases.
PyO3 0.22.2
This release contains some minor reliability fixes building upon PyO3 0.22.1.
As PyO3 is still working on supporting freethreaded Python (upcoming in 3.13), support has been gated behind an
UNSAFE_PYO3_BUILD_FREE_THREADED=1environment variable to avoid unsuspecting users running into broken builds.Packages built for the
abi3stable ABI will now use FFI functions for refcounting instead of inline reference count modifications on all versions of the stable ABI (previously onlyabi3builds for 3.12 and up would use FFI functions). This helps mitigate interactions of old versions of the stable ABI with future CPython releases which do more complex reference counting (e.g. immortal objects, freethreaded reference counting).The
#[pymodule]declarative module now supports directly receiving options. (E.g.#[pymodule(name = "foo")], which would previously have been written as two attributes#[pymodule] #[pyo3(name = "foo")].)A compile error on Rust 1.78 related to use of
c""literals has been fixed.Thank you to the following contributors for the improvements:
@davidhewitt@FlickerSoul@gi0baro@Icxolu@MatthijsKok@styvanePyO3 0.22.1
This patch release improves some cases related to new functionality in PyO3 0.22.
PartialEq<bool>has been added forBound<'py, PyBool>.The
#[pyo3(submodule)]attribute has been added for declarative modules to stop submodules from generating an external C symbol for importing the submodule directly (which is typically never used). Declarative modules will also now correctly add items annotated with full-path attributes like#[pyo3::prelude::pyfunction].The
#[pyclass(eq)]option will no longer raise aTypeErroron comparison against types not in the signature.A
#[setter]in#[pymethods]with anOption<T>input will no longer raise a deprecation warning.A regression has been fixed in conversions for 128-bit integers on big-endian platforms.
Thank you to the following contributors for the improvements:
@alex@davidhewitt@jatoben@kylebarron@musicinmybrain@ngoldbaum@Owen-CH-LeungPyO3 0.22.0
This release introduces support for Python 3.13. Please note that Python 3.13 is still in beta, and while breaking changes are not expected it is very possible that code compiled against Python 3.13 beta versions will be incompatible with the final 3.13 release later in the year.
The minimum supported Rust version has been increased to Rust 1.63.
PyO3's deferred reference counting used to implement
Clone for Py<T>without the global interpreter lock has been demonstrated to be impossible to implement safely in the general case and has consequently been changed to panic instead of deferring when cloningPy<T>without the GIL being held. Given the nature of panics insideCloneoperations being a potential footgun, this implementation has been moved behind the opt-inpy-clonefeature.
... (truncated)
Changelog
Sourced from pyo3's changelog.
[0.22.2] - 2024-07-17
Packaging
- Require opt-in to freethreaded Python using the
UNSAFE_PYO3_BUILD_FREE_THREADED=1environment variable (it is not yet supported by PyO3). #4327Changed
- Use FFI function calls for reference counting on all abi3 versions. #4324
#[pymodule(...)]now directly accepts all relevant#[pyo3(...)]options. #4330Fixed
- Fix compile failure in declarative
#[pymodule]under presence of#![no_implicit_prelude]. #4328- Fix compile failure due to c-string literals on Rust < 1.79. #4353
[0.22.1] - 2024-07-06
Added
- Add
#[pyo3(submodule)]option for declarative#[pymodule]s. #4301- Implement
PartialEq<bool>forBound<'py, PyBool>. #4305Fixed
- Return
NotImplementedinstead of raisingTypeErrorfrom generated equality method when comparing different types. #4287- Handle full-path
#[pyo3::prelude::pymodule]and similar for#[pyclass]and#[pyfunction]in declarative modules.#4288- Fix 128-bit int regression on big-endian platforms with Python <3.13. #4291
- Stop generating code that will never be covered with declarative modules. #4297
- Fix invalid deprecation warning for trailing optional on
#[setter]function. #4304[0.22.0] - 2024-06-24
Packaging
- Update
heckdependency to 0.5. #3966- Extend range of supported versions of
chrono-tzoptional dependency to include version 0.10. #4061- Update MSRV to 1.63. #4129
- Add optional
num-rationalfeature to add conversions with Python'sfractions.Fraction. #4148- Support Python 3.13. #4184
Added
- Add
PyWeakref,PyWeakrefReferenceandPyWeakrefProxy. #3835- Support
#[pyclass]on enums that have tuple variants. #4072- Add support for scientific notation in
Decimalconversion. #4079- Add
pyo3_disable_reference_poolconditional compilation flag to avoid the overhead of the global reference pool at the cost of known limitations as explained in the performance section of the guide. #4095- Add
#[pyo3(constructor = (...))]to customize the generated constructors for complex enum variants. #4158- Add
PyType::module, which always matches Python__module__. #4196- Add
PyType::fully_qualified_namewhich matches the "fully qualified name" defined in PEP 737. #4196
... (truncated)
Commits
92b0f15release: 0.22.2da9f52eonly emit c-string literals on Rust 1.79 and later (#4352) (#4353)3d7e5a3chore: updateruffconfiguration to resolve deprecation warning (#4346)e2ebb72use FFI calls for refcounting on all abi3 versions (#4324)7e0fc30allow#[pymodule(...)]to accept all relevant#[pyo3(...)]options (#4330)6317570removeBuildFlagmember to avoid breaking change in patch7fed7c3Prevent building in GIL-less environment (#4327)d99fc06docs: fixups to 0.22 migration guide (#4332)613a70bdocs: use versioned links from docs to guide (#4331)b50f1c3ci: check minimal-versions on MSRV feature powerset (#4273)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)