Skip to content

Commit

Permalink
Update pyo3 non-major (#289)
Browse files Browse the repository at this point in the history
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [pyo3](https://github.com/pyo3/pyo3) | dependencies | minor |
`0.19.1` -> `0.20.0` |
| [pyo3-asyncio](https://github.com/awestlake87/pyo3-asyncio) |
dependencies | minor | `0.19.0` -> `0.20.0` |
| [pyo3-build-config](https://github.com/pyo3/pyo3) |
build-dependencies | minor | `0.19.1` -> `0.20.0` |
| [pyo3-log](https://github.com/vorner/pyo3-log) | dependencies |
minor | `0.8.3` -> `0.9.0` |

---

### Release Notes

<details>
<summary>pyo3/pyo3 (pyo3)</summary>

###
[`v0.20.0`](https://github.com/pyo3/pyo3/blob/HEAD/CHANGELOG.md#0200---2023-10-11)

[Compare
Source](https://github.com/pyo3/pyo3/compare/v0.19.2...v0.20.0)

##### Packaging

- Dual-license PyO3 under either the Apache 2.0 OR the MIT license. This
makes the project GPLv2 compatible.
[#&#8203;3108](https://github.com/PyO3/pyo3/pull/3108)
- Update MSRV to Rust 1.56.
[#&#8203;3208](https://github.com/PyO3/pyo3/pull/3208)
- Bump `indoc` dependency to 2.0 and `unindent` dependency to 0.2.
[#&#8203;3237](https://github.com/PyO3/pyo3/pull/3237)
- Bump `syn` dependency to 2.0.
[#&#8203;3239](https://github.com/PyO3/pyo3/pull/3239)
- Drop support for debug builds of Python 3.7.
[#&#8203;3387](https://github.com/PyO3/pyo3/pull/3387)
- Bump `chrono` optional dependency to require 0.4.25 or newer.
[#&#8203;3427](https://github.com/PyO3/pyo3/pull/3427)
- Support Python 3.12.
[#&#8203;3488](https://github.com/PyO3/pyo3/pull/3488)

##### Added

- Support `__lt__`, `__le__`, `__eq__`, `__ne__`, `__gt__` and `__ge__`
in `#[pymethods]`.
[#&#8203;3203](https://github.com/PyO3/pyo3/pull/3203)
- Add FFI definition `Py_GETENV`.
[#&#8203;3336](https://github.com/PyO3/pyo3/pull/3336)
- Add `as_ptr` and `into_ptr` inherent methods for `Py`, `PyAny`,
`PyRef`, and `PyRefMut`.
[#&#8203;3359](https://github.com/PyO3/pyo3/pull/3359)
- Implement `DoubleEndedIterator` for `PyTupleIterator` and
`PyListIterator`.
[#&#8203;3366](https://github.com/PyO3/pyo3/pull/3366)
- Add `#[pyclass(rename_all = "...")]` option: this allows renaming all
getters and setters of a struct, or all variants of an enum. Available
renaming rules are: `"camelCase"`, `"kebab-case"`, `"lowercase"`,
`"PascalCase"`, `"SCREAMING-KEBAB-CASE"`, `"SCREAMING_SNAKE_CASE"`,
`"snake_case"`, `"UPPERCASE"`.
[#&#8203;3384](https://github.com/PyO3/pyo3/pull/3384)
- Add FFI definitions `PyObject_GC_IsTracked` and
`PyObject_GC_IsFinalized` on Python 3.9 and up (PyPy 3.10 and up).
[#&#8203;3403](https://github.com/PyO3/pyo3/pull/3403)
- Add types for `None`, `Ellipsis`, and `NotImplemented`.
[#&#8203;3408](https://github.com/PyO3/pyo3/pull/3408)
- Add FFI definitions for the `Py_mod_multiple_interpreters` constant
and its possible values.
[#&#8203;3494](https://github.com/PyO3/pyo3/pull/3494)
- Add FFI definitions for `PyInterpreterConfig` struct, its constants
and `Py_NewInterpreterFromConfig`.
[#&#8203;3502](https://github.com/PyO3/pyo3/pull/3502)

##### Changed

- Change `PySet::discard` to return `PyResult<bool>` (previously
returned nothing).
[#&#8203;3281](https://github.com/PyO3/pyo3/pull/3281)
- Optimize implmentation of `IntoPy` for Rust tuples to Python tuples.
[#&#8203;3321](https://github.com/PyO3/pyo3/pull/3321)
- Change `PyDict::get_item` to no longer suppress arbitrary exceptions
(the return type is now `PyResult<Option<&PyAny>>` instead of
`Option<&PyAny>`), and deprecate `PyDict::get_item_with_error`.
[#&#8203;3330](https://github.com/PyO3/pyo3/pull/3330)
- Deprecate FFI definitions which are deprecated in Python 3.12.
[#&#8203;3336](https://github.com/PyO3/pyo3/pull/3336)
- `AsPyPointer` is now an `unsafe trait`.
[#&#8203;3358](https://github.com/PyO3/pyo3/pull/3358)
- Accept all `os.PathLike` values in implementation of `FromPyObject`
for `PathBuf`. [#&#8203;3374](https://github.com/PyO3/pyo3/pull/3374)
- Add `__builtins__` to globals in `py.run()` and `py.eval()` if they're
missing. [#&#8203;3378](https://github.com/PyO3/pyo3/pull/3378)
- Optimize implementation of `FromPyObject` for `BigInt` and `BigUint`.
[#&#8203;3379](https://github.com/PyO3/pyo3/pull/3379)
- `PyIterator::from_object` and `PyByteArray::from` now take a single
argument of type `&PyAny` (previously took two arguments `Python` and
`AsPyPointer`). [#&#8203;3389](https://github.com/PyO3/pyo3/pull/3389)
- Replace `AsPyPointer` with `AsRef<PyAny>` as a bound in the blanket
implementation of `From<&T> for PyObject`.
[#&#8203;3391](https://github.com/PyO3/pyo3/pull/3391)
- Replace blanket `impl IntoPy<PyObject> for &T where T: AsPyPointer`
with implementations of `impl IntoPy<PyObject>` for `&PyAny`, `&T where
T: AsRef<PyAny>`, and `&Py<T>`.
[#&#8203;3393](https://github.com/PyO3/pyo3/pull/3393)
- Preserve `std::io::Error` kind in implementation of
`From<std::io::IntoInnerError>` for `PyErr`
[#&#8203;3396](https://github.com/PyO3/pyo3/pull/3396)
- Try to select a relevant `ErrorKind` in implementation of
`From<PyErr>` for `OSError` subclass.
[#&#8203;3397](https://github.com/PyO3/pyo3/pull/3397)
- Retrieve the original `PyErr` in implementation of
`From<std::io::Error>` for `PyErr` if the `std::io::Error` has been
built using a Python exception (previously would create a new exception
wrapping the `std::io::Error`).
[#&#8203;3402](https://github.com/PyO3/pyo3/pull/3402)
- `#[pymodule]` will now return the same module object on repeated
import by the same Python interpreter, on Python 3.9 and up.
[#&#8203;3446](https://github.com/PyO3/pyo3/pull/3446)
- Truncate leap-seconds and warn when converting `chrono` types to
Python `datetime` types (`datetime` cannot represent leap-seconds).
[#&#8203;3458](https://github.com/PyO3/pyo3/pull/3458)
- `Err` returned from `#[pyfunction]` will now have a non-None
`__context__` if called from inside a `catch` block.
[#&#8203;3455](https://github.com/PyO3/pyo3/pull/3455)
- Deprecate undocumented `#[__new__]` form of `#[new]` attribute.
[#&#8203;3505](https://github.com/PyO3/pyo3/pull/3505)

##### Removed

- Remove all functionality deprecated in PyO3 0.18, including `#[args]`
attribute for `#[pymethods]`.
[#&#8203;3232](https://github.com/PyO3/pyo3/pull/3232)
- Remove `IntoPyPointer` trait in favour of `into_ptr` inherent methods.
[#&#8203;3385](https://github.com/PyO3/pyo3/pull/3385)

##### Fixed

- Handle exceptions properly in `PySet::discard`.
[#&#8203;3281](https://github.com/PyO3/pyo3/pull/3281)
- The `PyTupleIterator` type returned by `PyTuple::iter` is now public
and hence can be named by downstream crates.
[#&#8203;3366](https://github.com/PyO3/pyo3/pull/3366)
- Linking of `PyOS_FSPath` on PyPy.
[#&#8203;3374](https://github.com/PyO3/pyo3/pull/3374)
- Fix memory leak in `PyTypeBuilder::build`.
[#&#8203;3401](https://github.com/PyO3/pyo3/pull/3401)
- Disable removed FFI definitions `_Py_GetAllocatedBlocks`,
`_PyObject_GC_Malloc`, and `_PyObject_GC_Calloc` on Python 3.11 and up.
[#&#8203;3403](https://github.com/PyO3/pyo3/pull/3403)
- Fix `ResourceWarning` and crashes related to GC when running with
debug builds of CPython.
[#&#8203;3404](https://github.com/PyO3/pyo3/pull/3404)
- Some-wrapping of `Option<T>` default arguments will no longer re-wrap
`Some(T)` or expressions evaluating to `None`.
[#&#8203;3461](https://github.com/PyO3/pyo3/pull/3461)
- Fix `IterNextOutput::Return` not returning a value on PyPy.
[#&#8203;3471](https://github.com/PyO3/pyo3/pull/3471)
- Emit compile errors instead of ignoring macro invocations inside
`#[pymethods]` blocks.
[#&#8203;3491](https://github.com/PyO3/pyo3/pull/3491)
- Emit error on invalid arguments to `#[new]`, `#[classmethod]`,
`#[staticmethod]`, and `#[classattr]`.
[#&#8203;3484](https://github.com/PyO3/pyo3/pull/3484)
- Disable `PyMarshal_WriteObjectToString` from
`PyMarshal_ReadObjectFromString` with the `abi3` feature.
[#&#8203;3490](https://github.com/PyO3/pyo3/pull/3490)
- Fix FFI definitions for `_PyFrameEvalFunction` on Python 3.11 and up
(it now receives a `_PyInterpreterFrame` opaque struct).
[#&#8203;3500](https://github.com/PyO3/pyo3/pull/3500)

###
[`v0.19.2`](https://github.com/pyo3/pyo3/blob/HEAD/CHANGELOG.md#0192---2023-08-01)

[Compare
Source](https://github.com/pyo3/pyo3/compare/v0.19.1...v0.19.2)

##### Added

- Add FFI definitions `PyState_AddModule`, `PyState_RemoveModule` and
`PyState_FindModule` for PyPy 3.9 and up.
[#&#8203;3295](https://github.com/PyO3/pyo3/pull/3295)
- Add FFI definitions `_PyObject_CallFunction_SizeT` and
`_PyObject_CallMethod_SizeT`.
[#&#8203;3297](https://github.com/PyO3/pyo3/pull/3297)
- Add a "performance" section to the guide collecting
performance-related tricks and problems.
[#&#8203;3304](https://github.com/PyO3/pyo3/pull/3304)
- Add `PyErr::Display` for all Python versions, and FFI symbol
`PyErr_DisplayException` for Python 3.12.
[#&#8203;3334](https://github.com/PyO3/pyo3/pull/3334)
- Add FFI definition `PyType_GetDict()` for Python 3.12.
[#&#8203;3339](https://github.com/PyO3/pyo3/pull/3339)
- Add `PyAny::downcast_exact`.
[#&#8203;3346](https://github.com/PyO3/pyo3/pull/3346)
- Add `PySlice::full()` to construct a full slice (`::`).
[#&#8203;3353](https://github.com/PyO3/pyo3/pull/3353)

##### Changed

- Update `PyErr` for 3.12 betas to avoid deprecated ffi methods.
[#&#8203;3306](https://github.com/PyO3/pyo3/pull/3306)
- Update FFI definitions of `object.h` for Python 3.12.0b4.
[#&#8203;3335](https://github.com/PyO3/pyo3/pull/3335)
- Update `pyo3::ffi` struct definitions to be compatible with 3.12.0b4.
[#&#8203;3342](https://github.com/PyO3/pyo3/pull/3342)
- Optimize conversion of `float` to `f64` (and `PyFloat::value`) on
non-abi3 builds.
[#&#8203;3345](https://github.com/PyO3/pyo3/pull/3345)

##### Fixed

- Fix timezone conversion bug for FixedOffset datetimes that were being
incorrectly converted to and from UTC.
[#&#8203;3269](https://github.com/PyO3/pyo3/pull/3269)
- Fix `SystemError` raised in `PyUnicodeDecodeError_Create` on PyPy
3.10. [#&#8203;3297](https://github.com/PyO3/pyo3/pull/3297)
- Correct FFI definition `Py_EnterRecursiveCall` to return `c_int` (was
incorrectly returning `()`).
[#&#8203;3300](https://github.com/PyO3/pyo3/pull/3300)
- Fix case where `PyErr::matches` and `PyErr::is_instance` returned
results inconsistent with `PyErr::get_type`.
[#&#8203;3313](https://github.com/PyO3/pyo3/pull/3313)
- Fix loss of panic message in `PanicException` when unwinding after the
exception was "normalized".
[#&#8203;3326](https://github.com/PyO3/pyo3/pull/3326)
- Fix `PyErr::from_value` and `PyErr::into_value` losing traceback on
conversion. [#&#8203;3328](https://github.com/PyO3/pyo3/pull/3328)
- Fix reference counting of immortal objects on Python 3.12.0b4.
[#&#8203;3335](https://github.com/PyO3/pyo3/pull/3335)

</details>

<details>
<summary>vorner/pyo3-log (pyo3-log)</summary>

###
[`v0.9.0`](https://github.com/vorner/pyo3-log/blob/HEAD/CHANGELOG.md#090)

[Compare
Source](https://github.com/vorner/pyo3-log/compare/v0.8.4...v0.9.0)

- Bump lowest allowed version of pyo3 to 0.15 ‒ this prevents linking
multiple
    pyo3 versions together.

###
[`v0.8.4`](https://github.com/vorner/pyo3-log/blob/HEAD/CHANGELOG.md#084)

[Compare
Source](https://github.com/vorner/pyo3-log/compare/v0.8.3...v0.8.4)

-   Allow pyo3 0.20.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekend" (UTC), Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/bitwarden/sdk).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44LjEiLCJ1cGRhdGVkSW5WZXIiOiIzNy40Ni4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
renovate[bot] authored Nov 20, 2023
1 parent 8788f18 commit 4c68256
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 26 deletions.
45 changes: 23 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions crates/bitwarden-py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ name = "bitwarden_py"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.19.1", features = ["extension-module"] }
pyo3-log = "0.8.3"
pyo3 = { version = "0.20.0", features = ["extension-module"] }
pyo3-log = "0.9.0"

bitwarden-json = { path = "../bitwarden-json", features = ["secrets"] }

[build-dependencies]
pyo3-build-config = { version = "0.19.1" }
pyo3-build-config = { version = "0.20.0" }

[target.'cfg(not(target_arch="wasm32"))'.dependencies]
tokio = { version = "1.28.2", features = ["rt-multi-thread", "macros"] }
pyo3-asyncio = { version = "0.19.0", features = [
pyo3-asyncio = { version = "0.20.0", features = [
"attributes",
"tokio-runtime",
] }

0 comments on commit 4c68256

Please sign in to comment.