Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pyo3 requirement from 0.18.1 to 0.19.0 #242

Merged
merged 1 commit into from
Jun 1, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 1, 2023

Updates the requirements on pyo3 to permit the latest version.

Release notes

Sourced from pyo3's releases.

PyO3 0.19.0

This release completes the implementation of automatically generated __text_signature__ for #[pymethods] and #[pyfunctions] by extending support for #[new] functions as well as rendering the value of simple default values such as integers, bools, and None in the generated signature.

Support for rust_decimal conversions to Python's decimal.Decimal has been added.

Usage of #[pyclass(frozen)] types becomes more powerful with the addition of Py::get to access contents of frozen classes without needing the Python GIL.

Some important fixes and removals have landed:

  • __traverse__ implementations may no longer access Python APIs or acquire the Python GIL. Attempting to use Python::with_gil will panic.
  • #[pyclass(unsendable)] types will now warn and skip Drop implementations when dropped on a thread other than the one the type was created on.
  • The deprecated Python::acquire_gil has been 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:

@​adamreichold @​AdilZouitine @​adriangb @​alex @​AntoineRR @​BlueGlassBlock @​cardoe @​cfour2 @​davidhewitt @​decathorpe @​Enyium @​est31 @​iajoiner @​ijl @​jond01 @​kngwyu @​lifthrasiir @​lycantropos @​mattip @​mejrs @​messense @​OliverBalfour @​samuelcolvin @​sollyucko @​stuhood @​suyanhanx @​Walnut356 @​why-not-try-calmer @​willstott101 @​wjones127 @​xcharleslin

Changelog

Sourced from pyo3's changelog.

[0.19.0] - 2023-05-31

Packaging

  • Correct dependency on syn to version 1.0.85 instead of the incorrect version 1.0.56. #3152

Added

  • Accept text_signature option (and automatically generate signature) for #[new] in #[pymethods]. #2980
  • Add support for converting to and from Python's decimal.Decimal and rust_decimal::Decimal. #3016
  • Add #[pyo3(from_item_all)] when deriving FromPyObject to specify get_item as getter for all fields. #3120
  • Add pyo3::exceptions::PyBaseExceptionGroup for Python 3.11, and corresponding FFI definition PyExc_BaseExceptionGroup. #3141
  • Accept #[new] with #[classmethod] to create a constructor which receives a (subtype's) class/PyType as its first argument. #3157
  • Add PyClass::get and Py::get for GIL-indepedent access to classes with #[pyclass(frozen)]. #3158
  • Add PyAny::is_exact_instance and PyAny::is_exact_instance_of. #3161

Changed

  • PyAny::is_instance_of::<T>(obj) is now equivalent to T::is_type_of(obj), and now returns bool instead of PyResult<bool>. #2881
  • Deprecate text_signature option on #[pyclass] structs. #2980
  • No longer wrap anyhow::Error/eyre::Report containing a basic PyErr without a chain in a PyRuntimeError. #3004
    • Change #[getter] and #[setter] to use a common call "trampoline" to slightly reduce generated code size and compile times. #3029
  • Improve default values for str, numbers and bool in automatically-generated text_signature. #3050
  • Improve default value for None in automatically-generated text_signature. #3066
  • Rename PySequence::list and PySequence::tuple to PySequence::to_list and PySequence::to_tuple. (The old names continue to exist as deprecated forms.) #3111
  • Extend the lifetime of the GIL token returned by PyRef::py and PyRefMut::py to match the underlying borrow. #3131
  • Safe access to the GIL, for example via Python::with_gil, is now locked inside of implementations of the __traverse__ slot. #3168

Removed

  • Remove all functionality deprecated in PyO3 0.17, most prominently Python::acquire_gil is replaced by Python::with_gil. #2981

Fixed

  • Correct FFI definitions PyGetSetDef, PyMemberDef, PyStructSequence_Field and PyStructSequence_Desc to have *const c_char members for name and doc (not *mut c_char). #3036
  • Fix panic on fmt::Display, instead return "<unprintable object>" string and report error via sys.unraisablehook() #3062
  • Fix a compile error of "temporary value dropped while borrowed" when #[pyfunction]s take references into #[pyclass]es #3142
  • Fix crashes caused by PyO3 applying deferred reference count updates when entering a __traverse__ implementation. #3168
  • Forbid running the Drop implementations of unsendable classes on other threads. #3176
  • Fix a compile error when #[pymethods] items come from somewhere else (for example, as a macro argument) and a custom receiver like Py<Self> is used. #3178

[0.18.3] - 2023-04-13

Added

  • Add GILProtected<T> to mediate concurrent access to a value using Python's global interpreter lock (GIL). #2975
  • Support PyASCIIObject / PyUnicode and associated methods on big-endian architectures. #3015
  • Add FFI definition _PyDict_Contains_KnownHash() for CPython 3.10 and up. #3088

... (truncated)

Commits

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)

Updates the requirements on [pyo3](https://github.com/pyo3/pyo3) to permit the latest version.
- [Release notes](https://github.com/pyo3/pyo3/releases)
- [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md)
- [Commits](PyO3/pyo3@v0.18.1...v0.19.0)

---
updated-dependencies:
- dependency-name: pyo3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jun 1, 2023
@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (edc506b) 80.62% compared to head (3d7f5d0) 80.62%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #242   +/-   ##
=======================================
  Coverage   80.62%   80.62%           
=======================================
  Files          16       16           
  Lines        3737     3737           
=======================================
  Hits         3013     3013           
  Misses        724      724           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ChristopherRabotin ChristopherRabotin merged commit 2b17f58 into master Jun 1, 2023
@dependabot dependabot bot deleted the dependabot/cargo/pyo3-0.19.0 branch June 1, 2023 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant