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

fix(deps): update rust crate pyo3 to 0.18.3 #8

Merged
merged 1 commit into from
May 16, 2023
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 15, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
pyo3 dependencies minor 0.16.5 -> 0.18.3

Release Notes

pyo3/pyo3

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

v0.17.3

Compare Source

Packaging
  • Support Python 3.11. (Previous versions of PyO3 0.17 have been tested against Python 3.11 release candidates and are expected to be compatible, this is the first version tested against Python 3.11.0.) #​2708
Added
  • Implemented ExactSizeIterator for PyListIterator, PyDictIterator, PySetIterator and PyFrozenSetIterator. #​2676
Fixed
  • Fix regression of impl FromPyObject for [T; N] no longer accepting types passing PySequence_Check, e.g. NumPy arrays, since version 0.17.0. This the same fix that was applied impl FromPyObject for Vec<T> in version 0.17.1 extended to fixed-size arrays. #​2675
  • Fix UB in FunctionDescription::extract_arguments_fastcall due to creating slices from a null pointer. #​2687

v0.17.2

Compare Source

Packaging
  • Added optional chrono feature to convert chrono types into types in the datetime module. #​2612
Added
  • Add support for num-bigint feature on PyPy. #​2626
Fixed
  • Correctly implement __richcmp__ for enums, fixing __ne__ returning always returning True. #​2622
  • Fix compile error since 0.17.0 with Option<&SomePyClass> argument with a default. #​2630
  • Fix regression of impl FromPyObject for Vec<T> no longer accepting types passing PySequence_Check, e.g. NumPy arrays, since 0.17.0. #​2631

v0.17.1

Compare Source

Fixed
  • Fix visibility of PyDictItems, PyDictKeys, and PyDictValues types added in PyO3 0.17.0.
  • Fix compile failure when using #[pyo3(from_py_with = "...")] attribute on an argument of type Option<T>. #​2592
  • Fix clippy redundant-closure lint on **kwargs arguments for #[pyfunction] and #[pymethods]. #​2595

v0.17.0

Compare Source

Packaging
  • Update inventory dependency to 0.3 (the multiple-pymethods feature now requires Rust 1.62 for correctness). #​2492
Added
  • Add timezone_utc. #​1588
  • Implement ToPyObject for [T; N]. #​2313
  • Add PyDictKeys, PyDictValues and PyDictItems Rust types. #​2358
  • Add append_to_inittab. #​2377
  • Add FFI definition PyFrame_GetCode. #​2406
  • Add PyCode and PyFrame high level objects. #​2408
  • Add FFI definitions Py_fstring_input, sendfunc, and _PyErr_StackItem. #​2423
  • Add PyDateTime::new_with_fold, PyTime::new_with_fold, PyTime::get_fold, and PyDateTime::get_fold for PyPy. #​2428
  • Add #[pyclass(frozen)]. #​2448
  • Accept #[pyo3(name)] on enum variants. #​2457
  • Add CompareOp::matches to implement __richcmp__ as the result of a Rust std::cmp::Ordering comparison. #​2460
  • Add PySuper type. #​2486
  • Support PyPy on Windows with the generate-import-lib feature. #​2506
  • Add FFI definitions Py_EnterRecursiveCall and Py_LeaveRecursiveCall. #​2511
  • Add PyDict::get_item_with_error. #​2536
  • Add #[pyclass(sequence)] option. #​2567
Changed
  • Change datetime constructors taking a tzinfo to take Option<&PyTzInfo> instead of Option<&PyObject>: PyDateTime::new, PyDateTime::new_with_fold, PyTime::new, and PyTime::new_with_fold. #​1588
  • Move PyTypeObject::type_object method to the PyTypeInfo trait, and deprecate the PyTypeObject trait. #​2287
  • Methods of Py and PyAny now accept impl IntoPy<Py<PyString>> rather than just &str to allow use of the intern! macro. #​2312
  • Change the deprecated pyproto feature to be opt-in instead of opt-out. #​2322
  • Emit better error messages when #[pyfunction] return types do not implement IntoPy. #​2326
  • Require T: IntoPy for impl<T, const N: usize> IntoPy<PyObject> for [T; N] instead of T: ToPyObject. #​2326
  • Deprecate the ToBorrowedObject trait. #​2333
  • Iterators over PySet and PyDict will now panic if the underlying collection is mutated during the iteration. #​2380
  • Iterators over PySet and PyDict will now panic if the underlying collection is mutated during the iteration. #​2380
  • Allow #[classattr] methods to be fallible. #​2385
  • Prevent multiple #[pymethods] with the same name for a single #[pyclass]. #​2399
  • Fixup lib_name when using PYO3_CONFIG_FILE. #​2404
  • Add a message to the ValueError raised by the #[derive(FromPyObject)] implementation for a tuple struct. #​2414
  • Allow #[classattr] methods to take Python argument. #​2456
  • Rework PyCapsule type to resolve soundness issues: #​2485
    • PyCapsule::new and PyCapsule::new_with_destructor now take name: Option<CString> instead of &CStr.
    • The destructor F in PyCapsule::new_with_destructor must now be Send.
    • PyCapsule::get_context deprecated in favor of PyCapsule::context which doesn't take a py: Python<'_> argument.
    • PyCapsule::set_context no longer takes a py: Python<'_> argument.
    • PyCapsule::name now returns PyResult<Option<&CStr>> instead of &CStr.
  • FromPyObject::extract for Vec<T> no longer accepts Python str inputs. #​2500
  • Ensure each #[pymodule] is only initialized once. #​2523
  • pyo3_build_config::add_extension_module_link_args now also emits linker arguments for wasm32-unknown-emscripten. #​2538
  • Type checks for PySequence and PyMapping now require inputs to inherit from (or register with) collections.abc.Sequence and collections.abc.Mapping respectively. #​2477
  • Disable PyFunction on when building for abi3 or PyPy. #​2542
  • Deprecate Python::acquire_gil. #​2549
Removed
  • Remove all functionality deprecated in PyO3 0.15. #​2283
  • Make the Dict, WeakRef and BaseNativeType members of the PyClass private implementation details. #​2572
Fixed
  • Enable incorrectly disabled FFI definition PyThreadState_DeleteCurrent. #​2357
  • Fix wrap_pymodule interactions with name resolution rules: it no longer "sees through" glob imports of use submodule::* when submodule::submodule is a #[pymodule]. #​2363
  • Correct FFI definition PyEval_EvalCodeEx to take *const *mut PyObject array arguments instead of *mut *mut PyObject. #​2368
  • Fix "raw-ident" structs (e.g. #[pyclass] struct r#RawName) incorrectly having r# at the start of the class name created in Python. #​2395
  • Correct FFI definition Py_tracefunc to be unsafe extern "C" fn (was previously safe). #​2407
  • Fix compile failure with #[pyo3(from_py_with = "...")] annotations on a field in a #[derive(FromPyObject)] struct. #​2414
  • Fix FFI definitions _PyDateTime_BaseTime and _PyDateTime_BaseDateTime lacking leading underscores in their names. #​2421
  • Remove FFI definition PyArena on Python 3.10 and up. #​2421
  • Fix FFI definition PyCompilerFlags missing member cf_feature_version on Python 3.8 and up. #​2423
  • Fix FFI definition PyAsyncMethods missing member am_send on Python 3.10 and up. #​2423
  • Fix FFI definition PyGenObject having multiple incorrect members on various Python versions. #​2423
  • Fix FFI definition PySyntaxErrorObject missing members end_lineno and end_offset on Python 3.10 and up. #​2423
  • Fix FFI definition PyHeapTypeObject missing member ht_module on Python 3.9 and up. #​2423
  • Fix FFI definition PyFrameObject having multiple incorrect members on various Python versions. #​2424 #​2434
  • Fix FFI definition PyTypeObject missing deprecated field tp_print on Python 3.8. #​2428
  • Fix FFI definitions PyDateTime_CAPI. PyDateTime_Date, PyASCIIObject, PyBaseExceptionObject, PyListObject, and PyTypeObject on PyPy. #​2428
  • Fix FFI definition _inittab field initfunc typo'd as initfun. #​2431
  • Fix FFI definitions _PyDateTime_BaseTime and _PyDateTime_BaseDateTime incorrectly having fold member. #​2432
  • Fix FFI definitions PyTypeObject. PyHeapTypeObject, and PyCFunctionObject having incorrect members on PyPy 3.9. #​2433
  • Fix FFI definition PyGetSetDef to have *const c_char for doc member (not *mut c_char). #​2439
  • Fix #[pyo3(from_py_with = "...")] being ignored for 1-element tuple structs and transparent structs. #​2440
  • Use memoffset to avoid UB when computing PyCell layout. #​2450
  • Fix incorrect enum names being returned by the generated repr for enums renamed by #[pyclass(name = "...")] #​2457
  • Fix PyObject_CallNoArgs incorrectly being available when building for abi3 on Python 3.9. #​2476
  • Fix several clippy warnings generated by #[pyfunction] arguments. #​2503

v0.16.6

Compare Source

Changed
  • Fix soundness issues with PyCapsule type with select workarounds. Users are encourage to upgrade to PyO3 0.17 at their earliest convenience which contains API breakages which fix the issues in a long-term fashion. #​2522
    • PyCapsule::new and PyCapsule::new_with_destructor now take ownership of a copy of the name to resolve a possible use-after-free.
    • PyCapsule::name now returns an empty CStr instead of dereferencing a null pointer if the capsule has no name.
    • The destructor F in PyCapsule::new_with_destructor will never be called if the capsule is deleted from a thread other than the one which the capsule was created in (a warning will be emitted).
  • Panics during drop of panic payload caught by PyO3 will now abort. #​2544

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

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

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • 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 renovate bot force-pushed the renovate/pyo3-0.x branch 5 times, most recently from 6c0922d to 5bb7a5a Compare May 15, 2023 18:06
@mattkram mattkram merged commit 7b102ed into main May 16, 2023
2 checks passed
@mattkram mattkram deleted the renovate/pyo3-0.x branch May 16, 2023 03:54
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

1 participant