Bump pyo3 from 0.16.5 to 0.18.1
Bumps pyo3 from 0.16.5 to 0.18.1.
Release notes
Sourced from pyo3's releases.
PyO3 0.18.1
This release fixes several bugs identified since PyO3 0.18.0, including a segfault and a Windows-specific issue with the
PyIteratortype, which would incorrectly accept any Python class regardless of whether it defined__next__or not.Some new APIs have been added such as
PyErr::write_unraisable(),PyAny::is_ellipsis()andPyDict::update.Thank you to the following users for the improvements:
@adamreichold@alexpyattaev@davidhewitt@jjerphan@jmhodges@mejrs@messense@mitsuhiko@neachdainn@qbx2@samuelcolvinPyO3 0.18.0
This release contains a number of new features for PyO3's macros which should make maintaining PyO3 projects easier.
#[pyfunction]and#[pymethods]have a new#[pyo3(signature = (...))]option which allows specifying the Python signature. This replaces the#[args]option already present for#[pymethods]; the new option is better-validated and offers a syntax much more intuitive to users familiar with writing pure-Python functions.
#[pyclass]has newget_allandset_alloptions for cases where all fields of a type should be readable or writable from Python.The
#[pyo3(text_signature = "...")]option is now autogenerated for all functions created with#[pyfunction]and#[pymethods]. It can still be applied manually when it is necessary to override the generated form.As well as the macro API improvements, some other notable changes include:
PySet::newandPyFrozenSet::newnow accept Rust iterators rather than requiring a slice.- Rust types have been added for all Python's built-in
Warningtypes.- Non-zero integer types in
std::numnow have a conversion to/from Pythonint.- The deprecated
#[pyproto]attribute is now removed.There have been numerous other smaller improvements, changes and fixes. For full details see the CHANGELOG.
Please consult the migration guide for help upgrading.
Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following users' commits are included in this release:
@a1phyr@adamreichold@AdilZouitine@alex@birkenfeld@CLOVIS-AI@ctb@dalcde@datapythonista@davidhewitt
... (truncated)
Changelog
Sourced from pyo3's changelog.
[0.18.1] - 2023-02-07
Added
- Add
PyErr::write_unraisable(). #2889- Add
Python::Ellipsis()andPyAny::is_ellipsis()methods. #2911- Add
PyDict::update()andPyDict::update_if_missing()methods. #2912Changed
- FFI definition
PyIter_Checkon CPython 3.7 is now implemented ashasattr(type(obj), "__next__"), which works correctly on all platforms and adds support forabi3. #2914- Warn about unknown config keys in
PYO3_CONFIG_FILEinstead of denying. #2926Fixed
- Send errors returned by
__releasebuffer__tosys.unraisablehookrather than causingSystemError. #2886- Fix downcast to
PyIteratorsucceeding for Python classes which did not implement__next__. #2914- Fix segfault in
__traverse__when visitingNonefields ofOption<T: AsPyPointer>. #2921- Fix
#[pymethods(crate = "...")]option being ignored. #2923- Link against
pythonXY_d.dllfor debug Python builds on Windows. #2937[0.18.0] - 2023-01-17
Packaging
- Relax
indexmapoptional depecency to allow>= 1.6, < 2. [#2849](PyO3/pyo3#2849- Relax
hashbrownoptional dependency to allow>= 0.9, < 0.14. #2875- Update
memoffsetdependency to 0.8. #2875Added
- Add
GILOnceCell::get_or_try_initfor fallibleGILOnceCellinitialization. #2398- Add experimental feature
experimental-inspectwithtype_input()andtype_output()helpers to get the Python type of any Python-compatible object. #2490 #2882- The
#[pyclass]macro can now takeget_allandset_allto create getters and setters for every field. #2692- Add
#[pyo3(signature = (...))]option for#[pyfunction]and#[pymethods]. #2702pyo3-build-config: rebuild whenPYO3_ENVIRONMENT_SIGNATUREenvironment variable value changes. #2727- Add conversions between non-zero int types in
std::numand Pythonint. #2730- Add
Py::downcast()as a companion toPyAny::downcast(), as well asdowncast_unchecked()for both types. #2734- Add types for all built-in
Warningclasses as well asPyErr::warn_explicit. #2742- Add
abi3-py311feature. #2776- Add FFI definition
_PyErr_ChainExceptions()for CPython. #2788- Add FFI definitions
PyVectorcall_NARGSandPY_VECTORCALL_ARGUMENTS_OFFSETfor PyPy 3.8 and up. #2811- Add
PyList::get_item_uncheckedfor PyPy. #2827Changed
... (truncated)
Commits
37d377erelease: 0.18.19e5c845Merge #29342db351bMerge #2937d67a8dclink against pythonXY_d.dll for debug Python on Windows1e4dc54Merge #2936bc1a33fbump maturin version in getting_started.md4d80475Merge #29299306d56docs: Precise the abscense ofpy: Pythonfor the #[pyo3(signature)]c709f30guide: add documentation for trailing option arguments806eed5Merge #2914- 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 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)