This release addresses some incorrect FFI definitions in PyO3 0.14.0 which caused crashes when targeting PyPy. In addition, IntoPy<PyObject> has been implemented for &PathBuf and &OsString for additional convenience when working with the new conversions.
This release contains a significant number of improvements and optimizations since the 0.13 releases. Conversion support for more Rust standard library types has been added: [T; N], Path, PathBuf, OsStr, and OsString. In addition, the #[pyo3(...)] attribute options already used in #[pyclass] and #[derive(FromPyObject)] have been expanded to all macros to cover more options such as #[pyo3(name = "...")].
This release also includes some notable performance optimizations to PyO3's Python function generation, and users should observe reductions in overhead when calling PyO3-wrapped functions from Python. The documentation has also benefited from extensive work from several contributors.
Finally, there are a number of breaking changes to this release:
To reduce the default dependency set, a new feature multiple-pymethods has been added. If this feature is not enabled, each #[pyclass] may only have a single #[pymethods] block. If this feature is enabled then the previous behavior (and dependency on inventory) is restored.
The pyo3::ffi module has received many updates to keep in sync with CPython's definitions.
A number of APIs and particular usages of PyO3 macros have been marked deprecated where better alternatives now exist.
A number of previously-deprecated APIs have been removed.
For full details of all changes, see the CHANGELOG. For help with upgrading, see the migration guide.
Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following users' commits are included in this release:
Add wrap_pyfunction! macro to pyo3::prelude. #1695
Changed
Allow only one #[pymethods] block per #[pyclass] by default, to remove the dependency on inventory. Add a multiple-pymethods feature to opt-in the original behavior and dependency on inventory. #1457
Change PyTimeAccess::get_fold to return a bool instead of a u8. #1397
Deprecate FFI definition PyCFunction_Call for Python 3.9 and up. #1425
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 rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will 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 version` will 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 dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps pyo3 from 0.13.2 to 0.14.1.
Release notes
Sourced from pyo3's releases.
Changelog
Sourced from pyo3's changelog.
... (truncated)
Commits
3f8c4ad
release: 0.14.1fde4211
Merge pull request #1707 from nw0/doc4ed0383
Merge pull request #1713 from PyO3/pypy_macrosf723548
PyPy: the PyList_GET/SET macros are defined as functions, the PyTuple_ ones d...fa7588a
Apply suggestions that make doc take the plural form9cdb6a0
Merge pull request #1712 from messense/pathbuf-into-pyeaf5dca
ImplementIntoPy\<PyObject>
for&PathBuf
and&OsString
4b88dd1
Merge pull request #1698 from PyO3/release-0.14adf6bdb
release: 0.14.05715683
Merge pull request #1711 from mejrs/macroDependabot 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 rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will 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 version` will 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 dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)