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 non-major #63

Merged
merged 6 commits into from
Jul 18, 2023
Merged

Update pyo3 non-major #63

merged 6 commits into from
Jul 18, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 6, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
pyo3 dependencies minor 0.17.3 -> 0.18.3
pyo3-asyncio dependencies minor 0.17.0 -> 0.18.0
pyo3-build-config build-dependencies minor 0.17.3 -> 0.18.3
pyo3-log dependencies minor 0.7.0 -> 0.8.3

Release Notes

pyo3/pyo3 (pyo3)

v0.19.1

Compare Source

Packaging
  • Extend range of supported versions of hashbrown optional dependency to include version 0.14 #​3258
  • Extend range of supported versions of indexmap optional dependency to include version 2. #​3277
  • Support PyPy 3.10. #​3289
Added
  • Add pyo3::types::PyFrozenSetBuilder to allow building a PyFrozenSet item by item. #​3156
  • Add support for converting to and from Python's ipaddress.IPv4Address/ipaddress.IPv6Address and std::net::IpAddr. #​3197
  • Add support for num-bigint feature in combination with abi3. #​3198
  • Add PyErr_GetRaisedException(), PyErr_SetRaisedException() to FFI definitions for Python 3.12 and later. #​3248
  • Add Python::with_pool which is a safer but more limited alternative to Python::new_pool. #​3263
  • Add PyDict::get_item_with_error on PyPy. #​3270
  • Allow #[new] methods may to return Py<Self> in order to return existing instances. #​3287
Fixed
  • Fix conversion of classes implementing __complex__ to Complex when using abi3 or PyPy. #​3185
  • Stop suppressing unrelated exceptions in PyAny::hasattr. #​3271
  • Fix memory leak when creating PySet or PyFrozenSet or returning types converted into these internally, e.g. HashSet or BTreeSet. #​3286

v0.19.0

Compare Source

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

v0.18.3

Compare Source

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
Fixed
  • Fix compile error for #[pymethods] and #[pyfunction] called "output". #​3022
  • Fix compile error in generated code for magic methods implemented as a #[staticmethod]. #​3055
  • Fix is_instance for PyDateTime (would incorrectly check for a PyDate). #​3071
  • Fix upstream deprecation of PyUnicode_InternImmortal since Python 3.10. #​3071

v0.18.2

Compare Source

Packaging
  • Disable default features of chrono to avoid depending on time v0.1.x. #​2939
Added
  • Implement IntoPy<PyObject>, ToPyObject and FromPyObject for Cow<[u8]> to efficiently handle both bytes and bytearray objects. #​2899
  • Implement IntoPy<PyObject>, ToPyObject and FromPyObject for Cell<T>. #​3014
  • Add PyList::to_tuple(), as a convenient and efficient conversion from lists to tuples. #​3042
  • Add PyTuple::to_list(), as a convenient and efficient conversion from tuples to lists. #​3044
Changed
  • Optimize PySequence conversion for list and tuple inputs. #​2944
  • Improve exception raised when creating #[pyclass] type object fails during module import. #​2947
  • Optimize PyMapping conversion for dict inputs. #​2954
  • Allow create_exception! to take a dotted.module to place the exception in a submodule. #​2979
Fixed
  • Fix a reference counting race condition affecting PyObjects cloned in allow_threads blocks. #​2952
  • Fix clippy::redundant_closure lint on default arguments in #[pyo3(signature = (...))] annotations. #​2990
  • Fix non_snake_case lint on generated code in #[pyfunction] macro. #​2993
  • Fix some FFI definitions for the upcoming PyPy 3.10 release. #​3031

v0.18.1

Compare Source

Added
  • Add PyErr::write_unraisable(). #​2889
  • Add Python::Ellipsis() and PyAny::is_ellipsis() methods. #​2911
  • Add PyDict::update() and PyDict::update_if_missing() methods. #​2912
Changed
  • FFI definition PyIter_Check on CPython 3.7 is now implemented as hasattr(type(obj), "__next__"), which works correctly on all platforms and adds support for abi3. #​2914
  • Warn about unknown config keys in PYO3_CONFIG_FILE instead of denying. #​2926
Fixed
  • Send errors returned by __releasebuffer__ to sys.unraisablehook rather than causing SystemError. #​2886
  • Fix downcast to PyIterator succeeding for Python classes which did not implement __next__. #​2914
  • Fix segfault in __traverse__ when visiting None fields of Option<T: AsPyPointer>. #​2921
  • Fix #[pymethods(crate = "...")] option being ignored. #​2923
  • Link against pythonXY_d.dll for debug Python builds on Windows. #​2937

v0.18.0

Compare Source

Packaging
Added
  • Add GILOnceCell::get_or_try_init for fallible GILOnceCell initialization. #​2398
  • Add experimental feature experimental-inspect with type_input() and type_output() helpers to get the Python type of any Python-compatible object. #​2490 #​2882
  • The #[pyclass] macro can now take get_all and set_all to create getters and setters for every field. #​2692
  • Add #[pyo3(signature = (...))] option for #[pyfunction] and #[pymethods]. #​2702
  • pyo3-build-config: rebuild when PYO3_ENVIRONMENT_SIGNATURE environment variable value changes. #​2727
  • Add conversions between non-zero int types in std::num and Python int. #​2730
  • Add Py::downcast() as a companion to PyAny::downcast(), as well as downcast_unchecked() for both types. #​2734
  • Add types for all built-in Warning classes as well as PyErr::warn_explicit. #​2742
  • Add abi3-py311 feature. #​2776
  • Add FFI definition _PyErr_ChainExceptions() for CPython. #​2788
  • Add FFI definitions PyVectorcall_NARGS and PY_VECTORCALL_ARGUMENTS_OFFSET for PyPy 3.8 and up. #​2811
  • Add PyList::get_item_unchecked for PyPy. #​2827
Changed
  • PyO3's macros now emit a much nicer error message if function return values don't implement the required trait(s). #​2664
  • Use a TypeError, rather than a ValueError, when refusing to treat a str as a Vec. #​2685
  • Change PyCFunction::new_closure to take name and doc arguments. #​2686
  • PyType::is_subclass, PyErr::is_instance and PyAny::is_instance now take &PyAny instead of &PyType arguments, so that they work with objects that pretend to be types using __subclasscheck__ and __instancecheck__. #​2695
  • Deprecate #[args] attribute and passing "args" specification directly to #[pyfunction] in favor of the new #[pyo3(signature = (...))] option. #​2702
  • Deprecate required arguments after Option<T> arguments to #[pyfunction] and #[pymethods] without also using #[pyo3(signature)] to specify whether the arguments should be required or have defaults. #​2703
  • Change #[pyfunction] and #[pymethods] to use a common call "trampoline" to slightly reduce generated code size and compile times. #​2705
  • PyAny::cast_as() and Py::cast_as() are now deprecated in favor of PyAny::downcast() and the new Py::downcast(). #​2734
  • Relax lifetime bounds on PyAny::downcast(). #​2734
  • Automatically generate __text_signature__ for all Python functions created using #[pyfunction] and #[pymethods]. #​2784
  • Accept any iterator in PySet::new and PyFrozenSet::new. #​2795
  • Mixing #[cfg(...)] and #[pyo3(...)] attributes on #[pyclass] struct fields will now work. #​2796
  • Re-enable PyFunction on when building for abi3 or PyPy. #​2838
  • Improve derive(FromPyObject) to use intern! when applicable for #[pyo3(item)]. #​2879
Removed
  • Remove the deprecated pyproto feature, #[pyproto] macro, and all accompanying APIs. #​2587
  • Remove all functionality deprecated in PyO3 0.16. #​2843
Fixed
  • Disable PyModule::filename on PyPy. #​2715
  • PyCodeObject is now once again defined with fields on Python 3.7. #​2726
  • Raise a TypeError if #[new] pymethods with no arguments receive arguments when called from Python. #​2749
  • Use the NOARGS argument calling convention for methods that have a single py: Python argument (as a performance optimization). #​2760
  • Fix truncation of isize values to c_long in PySlice::new. #​2769
  • Fix soundness issue with FFI definition PyUnicodeDecodeError_Create on PyPy leading to indeterminate behavior (typically a TypeError). #​2772
  • Allow functions taking **kwargs to accept keyword arguments which share a name with a positional-only argument (as permitted by PEP 570). #​2800
  • Fix unresolved symbol for PyObject_Vectorcall on PyPy 3.9 and up. #​2811
  • Fix memory leak in PyCFunction::new_closure. #​2842
vorner/pyo3-log (pyo3-log)

v0.8.3

Compare Source

  • LogRecord takes tuple as args, provide an empty one and not a None (#​28).

v0.8.2

Compare Source

  • Allow pyo3 0.19.

v0.8.1

Compare Source

  • Don't insist on newest version of pyo3 as a dependency, allow older versions
    too.

v0.8.0

  • Update to pyo3 0.18.

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 if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate
Copy link
Contributor Author

renovate bot commented Jun 6, 2023

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: Cargo.lock
Command failed: docker run --rm --name=renovate_a_sidecar --label=renovate_a_child --memory=3584m -v "/tmp/worker/2e3398/26803a/repos/github/bitwarden/sdk":"/tmp/worker/2e3398/26803a/repos/github/bitwarden/sdk" -v "/tmp/worker/2e3398/26803a/cache":"/tmp/worker/2e3398/26803a/cache" -e CONTAINERBASE_CACHE_DIR -w "/tmp/worker/2e3398/26803a/repos/github/bitwarden/sdk" ghcr.io/containerbase/sidecar:9.5.2 bash -l -c "install-tool rust 1.71.0 && cargo update --manifest-path crates/bitwarden-py/Cargo.toml --workspace"
/usr/local/bin/docker: line 4: .: filename argument required
.: usage: . filename [arguments]
install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /tmp/worker/2e3398/26803a/repos/github/bitwarden/sdk/crates/bitwarden-napi/Cargo.toml
workspace: /tmp/worker/2e3398/26803a/repos/github/bitwarden/sdk/Cargo.toml
    Updating crates.io index
error: failed to select a version for `pyo3-ffi`.
    ... required by package `pyo3 v0.18.0`
    ... which satisfies dependency `pyo3 = "^0.18"` of package `pyo3-asyncio v0.18.0`
    ... which satisfies dependency `pyo3-asyncio = "^0.18.0"` of package `bitwarden-py v0.1.0 (/tmp/worker/2e3398/26803a/repos/github/bitwarden/sdk/crates/bitwarden-py)`
versions that meet the requirements `=0.18.0` are: 0.18.0

the package `pyo3-ffi` links to the native library `python`, but it conflicts with a previous package which links to `python` as well:
package `pyo3-ffi v0.19.1`
    ... which satisfies dependency `pyo3-ffi = "=0.19.1"` of package `pyo3 v0.19.1`
    ... which satisfies dependency `pyo3 = "^0.19.1"` of package `bitwarden-py v0.1.0 (/tmp/worker/2e3398/26803a/repos/github/bitwarden/sdk/crates/bitwarden-py)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='pyo3-ffi' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

failed to select a version for `pyo3-ffi` which could resolve this conflict

@renovate renovate bot force-pushed the renovate/pyo3-non-major branch 3 times, most recently from 4c6bb32 to 8cc2275 Compare July 7, 2023 14:29
@bitwarden-bot
Copy link

bitwarden-bot commented Jul 7, 2023

Logo
Checkmarx One – Scan Summary & Details75a31ad6-a2fd-4a5d-8294-e50bfe778ac4

No New Or Fixed Issues Found

@renovate renovate bot force-pushed the renovate/pyo3-non-major branch 13 times, most recently from 9ae54ad to 92694e4 Compare July 17, 2023 09:57
@renovate renovate bot force-pushed the renovate/pyo3-non-major branch from 92694e4 to 3b2f130 Compare July 17, 2023 10:04
@renovate renovate bot force-pushed the renovate/pyo3-non-major branch from 3b2f130 to 0d54ae1 Compare July 17, 2023 10:22
@renovate
Copy link
Contributor Author

renovate bot commented Jul 17, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@Hinton Hinton requested a review from dani-garcia July 17, 2023 10:25
@Hinton
Copy link
Member

Hinton commented Jul 17, 2023

Downgraded pyo3 to 0.18 so we can upgrade this dependency for now.

@Hinton Hinton enabled auto-merge (squash) July 17, 2023 15:10
@Hinton Hinton requested a review from MGibson1 July 17, 2023 19:55
@Hinton Hinton merged commit f0c10f1 into master Jul 18, 2023
32 checks passed
@Hinton Hinton deleted the renovate/pyo3-non-major branch July 18, 2023 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants