diff --git a/CHANGELOG.md b/CHANGELOG.md index afac9f72..ce9fdd20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,64 @@ To see unreleased changes, please see the [CHANGELOG on the main branch guide](h +## [0.18.0] - 2023-01-17 + +### Packaging + +- Relax `indexmap` optional depecency to allow `>= 1.6, < 2`. [#2849](https://github.com/PyO3/pyo3/pull/2849 +- Relax `hashbrown` optional dependency to allow `>= 0.9, < 0.14`. [#2875](https://github.com/PyO3/pyo3/pull/2875) +- Update `memoffset` dependency to 0.8. [#2875](https://github.com/PyO3/pyo3/pull/2875) + +### Added + +- Add `GILOnceCell::get_or_try_init` for fallible `GILOnceCell` initialization. [#2398](https://github.com/PyO3/pyo3/pull/2398) +- Add experimental feature `experimental-inspect` with `type_input()` and `type_output()` helpers to get the Python type of any Python-compatible object. [#2490](https://github.com/PyO3/pyo3/pull/2490) [#2882](https://github.com/PyO3/pyo3/pull/2882) +- The `#[pyclass]` macro can now take `get_all` and `set_all` to create getters and setters for every field. [#2692](https://github.com/PyO3/pyo3/pull/2692) +- Add `#[pyo3(signature = (...))]` option for `#[pyfunction]` and `#[pymethods]`. [#2702](https://github.com/PyO3/pyo3/pull/2702) +- `pyo3-build-config`: rebuild when `PYO3_ENVIRONMENT_SIGNATURE` environment variable value changes. [#2727](https://github.com/PyO3/pyo3/pull/2727) +- Add conversions between non-zero int types in `std::num` and Python `int`. [#2730](https://github.com/PyO3/pyo3/pull/2730) +- Add `Py::downcast()` as a companion to `PyAny::downcast()`, as well as `downcast_unchecked()` for both types. [#2734](https://github.com/PyO3/pyo3/pull/2734) +- Add types for all built-in `Warning` classes as well as `PyErr::warn_explicit`. [#2742](https://github.com/PyO3/pyo3/pull/2742) +- Add `abi3-py311` feature. [#2776](https://github.com/PyO3/pyo3/pull/2776) +- Add FFI definition `_PyErr_ChainExceptions()` for CPython. [#2788](https://github.com/PyO3/pyo3/pull/2788) +- Add FFI definitions `PyVectorcall_NARGS` and `PY_VECTORCALL_ARGUMENTS_OFFSET` for PyPy 3.8 and up. [#2811](https://github.com/PyO3/pyo3/pull/2811) +- Add `PyList::get_item_unchecked` for PyPy. [#2827](https://github.com/PyO3/pyo3/pull/2827) + +### Changed + +- PyO3's macros now emit a much nicer error message if function return values don't implement the required trait(s). [#2664](https://github.com/PyO3/pyo3/pull/2664) +- Use a TypeError, rather than a ValueError, when refusing to treat a str as a Vec. [#2685](https://github.com/PyO3/pyo3/pull/2685) +- Change `PyCFunction::new_closure` to take `name` and `doc` arguments. [#2686](https://github.com/PyO3/pyo3/pull/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](https://github.com/PyO3/pyo3/pull/2695) +- Deprecate `#[args]` attribute and passing "args" specification directly to `#[pyfunction]` in favor of the new `#[pyo3(signature = (...))]` option. [#2702](https://github.com/PyO3/pyo3/pull/2702) +- Deprecate required arguments after `Option` arguments to `#[pyfunction]` and `#[pymethods]` without also using `#[pyo3(signature)]` to specify whether the arguments should be required or have defaults. [#2703](https://github.com/PyO3/pyo3/pull/2703) +- Change `#[pyfunction]` and `#[pymethods]` to use a common call "trampoline" to slightly reduce generated code size and compile times. [#2705](https://github.com/PyO3/pyo3/pull/2705) +- `PyAny::cast_as()` and `Py::cast_as()` are now deprecated in favor of `PyAny::downcast()` and the new `Py::downcast()`. [#2734](https://github.com/PyO3/pyo3/pull/2734) +- Relax lifetime bounds on `PyAny::downcast()`. [#2734](https://github.com/PyO3/pyo3/pull/2734) +- Automatically generate `__text_signature__` for all Python functions created using `#[pyfunction]` and `#[pymethods]`. [#2784](https://github.com/PyO3/pyo3/pull/2784) +- Accept any iterator in `PySet::new` and `PyFrozenSet::new`. [#2795](https://github.com/PyO3/pyo3/pull/2795) +- Mixing `#[cfg(...)]` and `#[pyo3(...)]` attributes on `#[pyclass]` struct fields will now work. [#2796](https://github.com/PyO3/pyo3/pull/2796) +- Re-enable `PyFunction` on when building for abi3 or PyPy. [#2838](https://github.com/PyO3/pyo3/pull/2838) +- Improve `derive(FromPyObject)` to use `intern!` when applicable for `#[pyo3(item)]`. [#2838](https://github.com/PyO3/pyo3/pull/2838) + +### Removed + +- Remove the deprecated `pyproto` feature, `#[pyproto]` macro, and all accompanying APIs. [#2587](https://github.com/PyO3/pyo3/pull/2587) +- Remove all functionality deprecated in PyO3 0.16. [#2843](https://github.com/PyO3/pyo3/pull/2843) + +### Fixed + +- Disable `PyModule::filename` on PyPy. [#2715](https://github.com/PyO3/pyo3/pull/2715) +- `PyCodeObject` is now once again defined with fields on Python 3.7. [#2726](https://github.com/PyO3/pyo3/pull/2726) +- Raise a `TypeError` if `#[new]` pymethods with no arguments receive arguments when called from Python. [#2749](https://github.com/PyO3/pyo3/pull/2749) +- Use the `NOARGS` argument calling convention for methods that have a single `py: Python` argument (as a performance optimization). [#2760](https://github.com/PyO3/pyo3/pull/2760) +- Fix truncation of `isize` values to `c_long` in `PySlice::new`. [#2769](https://github.com/PyO3/pyo3/pull/2769) +- Fix soundness issue with FFI definition `PyUnicodeDecodeError_Create` on PyPy leading to indeterminate behavior (typically a `TypeError`). [#2772](https://github.com/PyO3/pyo3/pull/2772) +- Allow functions taking `**kwargs` to accept keyword arguments which share a name with a positional-only argument (as permitted by PEP 570). [#2800](https://github.com/PyO3/pyo3/pull/2800) +- Fix unresolved symbol for `PyObject_Vectorcall` on PyPy 3.9 and up. [#2811](https://github.com/PyO3/pyo3/pull/2811) +- Fix memory leak in `PyCFunction::new_closure`. [#2842](https://github.com/PyO3/pyo3/pull/2842) + + ## [0.17.3] - 2022-11-01 ### Packaging @@ -93,7 +151,7 @@ To see unreleased changes, please see the [CHANGELOG on the main branch guide](h - Rework `PyCapsule` type to resolve soundness issues: [#2485](https://github.com/PyO3/pyo3/pull/2485) - `PyCapsule::new` and `PyCapsule::new_with_destructor` now take `name: Option` instead of `&CStr`. - The destructor `F` in `PyCapsule::new_with_destructor` must now be `Send`. - - `PyCapsule::get_context` deprecated in favour of `PyCapsule::context` which doesn't take a `py: Python<'_>` argument. + - `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>` instead of `&CStr`. - `FromPyObject::extract` for `Vec` no longer accepts Python `str` inputs. [#2500](https://github.com/PyO3/pyo3/pull/2500) @@ -138,7 +196,7 @@ To see unreleased changes, please see the [CHANGELOG on the main branch guide](h ## [0.16.6] - 2022-08-23 -### Changed +### 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](https://github.com/PyO3/pyo3/pull/2522) - `PyCapsule::new` and `PyCapsule::new_with_destructor` now take ownership of a copy of the `name` to resolve a possible use-after-free. @@ -204,7 +262,7 @@ To see unreleased changes, please see the [CHANGELOG on the main branch guide](h - Allow `#[pyo3(crate = "...", text_signature = "...")]` options to be used directly in `#[pyclass(crate = "...", text_signature = "...")]`. [#2234](https://github.com/PyO3/pyo3/pull/2234) - Make `PYO3_CROSS_LIB_DIR` environment variable optional when cross compiling. [#2241](https://github.com/PyO3/pyo3/pull/2241) - Mark `METH_FASTCALL` calling convention as limited API on Python 3.10. [#2250](https://github.com/PyO3/pyo3/pull/2250) -- Deprecate `pyo3_build_config::cross_compiling` in favour of `pyo3_build_config::cross_compiling_from_to`. [#2253](https://github.com/PyO3/pyo3/pull/2253) +- Deprecate `pyo3_build_config::cross_compiling` in favor of `pyo3_build_config::cross_compiling_from_to`. [#2253](https://github.com/PyO3/pyo3/pull/2253) ### Fixed @@ -284,7 +342,7 @@ To see unreleased changes, please see the [CHANGELOG on the main branch guide](h - Add modulo argument to `__ipow__` magic method. [#2083](https://github.com/PyO3/pyo3/pull/2083) - Fix FFI definition for `_PyCFunctionFast`. [#2126](https://github.com/PyO3/pyo3/pull/2126) - `PyDateTimeAPI` and `PyDateTime_TimeZone_UTC` are are now unsafe functions instead of statics. [#2126](https://github.com/PyO3/pyo3/pull/2126) -- `PyDateTimeAPI` does not implicitly call `PyDateTime_IMPORT` anymore to reflect the original Python API more closely. Before the first call to `PyDateTime_IMPORT` a null pointer is returned. Therefore before calling any of the following FFI functions `PyDateTime_IMPORT` must be called to avoid undefined behaviour: [#2126](https://github.com/PyO3/pyo3/pull/2126) +- `PyDateTimeAPI` does not implicitly call `PyDateTime_IMPORT` anymore to reflect the original Python API more closely. Before the first call to `PyDateTime_IMPORT` a null pointer is returned. Therefore before calling any of the following FFI functions `PyDateTime_IMPORT` must be called to avoid undefined behavior: [#2126](https://github.com/PyO3/pyo3/pull/2126) - `PyDateTime_TimeZone_UTC` - `PyDate_Check` - `PyDate_CheckExact` @@ -317,7 +375,7 @@ To see unreleased changes, please see the [CHANGELOG on the main branch guide](h - Fix the `wrap_pymodule!` macro using the wrong name for a `#[pymodule]` with a `#[pyo3(name = "..")]` attribute. [#2081](https://github.com/PyO3/pyo3/pull/2081) - Fix magic methods in `#[pymethods]` accepting implementations with the wrong number of arguments. [#2083](https://github.com/PyO3/pyo3/pull/2083) - Fix panic in `#[pyfunction]` generated code when a required argument following an `Option` was not provided. [#2093](https://github.com/PyO3/pyo3/pull/2093) -- Fixed undefined behaviour caused by incorrect `ExactSizeIterator` implementations. [#2124](https://github.com/PyO3/pyo3/pull/2124) +- Fixed undefined behavior caused by incorrect `ExactSizeIterator` implementations. [#2124](https://github.com/PyO3/pyo3/pull/2124) - Fix missing FFI definition `PyCMethod_New` on Python 3.9 and up. [#2143](https://github.com/PyO3/pyo3/pull/2143) - Add missing FFI definitions `_PyLong_NumBits` and `_PyLong_AsByteArray` on PyPy. [#2146](https://github.com/PyO3/pyo3/pull/2146) - Fix memory leak in implementation of `AsPyPointer` for `Option`. [#2160](https://github.com/PyO3/pyo3/pull/2160) @@ -639,7 +697,7 @@ To see unreleased changes, please see the [CHANGELOG on the main branch guide](h ### Added -- Add support for building for CPython limited API. Opting-in to the limited API enables a single extension wheel built with PyO3 to be installable on multiple Python versions. This required a few minor changes to runtime behaviour of of PyO3 `#[pyclass]` types. See the migration guide for full details. [#1152](https://github.com/PyO3/pyo3/pull/1152) +- Add support for building for CPython limited API. Opting-in to the limited API enables a single extension wheel built with PyO3 to be installable on multiple Python versions. This required a few minor changes to runtime behavior of of PyO3 `#[pyclass]` types. See the migration guide for full details. [#1152](https://github.com/PyO3/pyo3/pull/1152) - Add feature flags `abi3-py36`, `abi3-py37`, `abi3-py38` etc. to set the minimum Python version when using the limited API. [#1263](https://github.com/PyO3/pyo3/pull/1263) - Add argument names to `TypeError` messages generated by pymethod wrappers. [#1212](https://github.com/PyO3/pyo3/pull/1212) - Add FFI definitions for PEP 587 "Python Initialization Configuration". [#1247](https://github.com/PyO3/pyo3/pull/1247) @@ -941,7 +999,7 @@ To see unreleased changes, please see the [CHANGELOG on the main branch guide](h - Usage of raw identifiers with `#[pyo3(set)]`. [#745](https://github.com/PyO3/pyo3/pull/745) - Usage of `PyObject` with `#[pyo3(get)]`. [#760](https://github.com/PyO3/pyo3/pull/760) - `#[pymethods]` used in conjunction with `#[cfg]`. #[769](https://github.com/PyO3/pyo3/pull/769) -- `"*"` in a `#[pyfunction()]` argument list incorrectly accepting any number of positional arguments (use `args = "*"` when this behaviour is desired). #[792](https://github.com/PyO3/pyo3/pull/792) +- `"*"` in a `#[pyfunction()]` argument list incorrectly accepting any number of positional arguments (use `args = "*"` when this behavior is desired). #[792](https://github.com/PyO3/pyo3/pull/792) - `PyModule::dict`. #[809](https://github.com/PyO3/pyo3/pull/809) - Fix the case where `DESCRIPTION` is not null-terminated. #[822](https://github.com/PyO3/pyo3/pull/822) @@ -1311,7 +1369,8 @@ Yanked - Initial release -[Unreleased]: https://github.com/pyo3/pyo3/compare/v0.17.3...HEAD +[Unreleased]: https://github.com/pyo3/pyo3/compare/v0.18.0...HEAD +[0.18.0]: https://github.com/pyo3/pyo3/compare/v0.17.3...v0.18.0 [0.17.3]: https://github.com/pyo3/pyo3/compare/v0.17.2...v0.17.3 [0.17.2]: https://github.com/pyo3/pyo3/compare/v0.17.1...v0.17.2 [0.17.1]: https://github.com/pyo3/pyo3/compare/v0.17.0...v0.17.1 diff --git a/Cargo.toml b/Cargo.toml index 58f30e78..b6946f6f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3" -version = "0.17.3" +version = "0.18.0" description = "Bindings to Python interpreter" authors = ["PyO3 Project and Contributors "] readme = "README.md" @@ -20,10 +20,10 @@ parking_lot = ">= 0.11, < 0.13" memoffset = "0.8" # ffi bindings to the python interpreter, split into a separate crate so they can be used independently -pyo3-ffi = { path = "pyo3-ffi", version = "=0.17.3" } +pyo3-ffi = { path = "pyo3-ffi", version = "=0.18.0" } # support crates for macros feature -pyo3-macros = { path = "pyo3-macros", version = "=0.17.3", optional = true } +pyo3-macros = { path = "pyo3-macros", version = "=0.18.0", optional = true } indoc = { version = "1.0.3", optional = true } unindent = { version = "0.1.4", optional = true } @@ -56,7 +56,7 @@ rayon = "1.0.2" widestring = "0.5.1" [build-dependencies] -pyo3-build-config = { path = "pyo3-build-config", version = "0.17.3", features = ["resolve-config"] } +pyo3-build-config = { path = "pyo3-build-config", version = "0.18.0", features = ["resolve-config"] } [features] default = ["macros"] diff --git a/README.md b/README.md index 004fe592..63c125e1 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ name = "string_sum" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.17.3", features = ["extension-module"] } +pyo3 = { version = "0.18.0", features = ["extension-module"] } ``` **`src/lib.rs`** @@ -137,7 +137,7 @@ Start a new project with `cargo new` and add `pyo3` to the `Cargo.toml` like th ```toml [dependencies.pyo3] -version = "0.17.3" +version = "0.18.0" features = ["auto-initialize"] ``` diff --git a/Releasing.md b/Releasing.md index 29abdd5f..3692c1f0 100644 --- a/Releasing.md +++ b/Releasing.md @@ -35,7 +35,7 @@ Write release notes which match the style of previous releases. You can get the Save as a draft and wait for now. -## 3. Leave for a cooling off period +## 3. Leave for a cooling off period Wait a couple of days in case anyone wants to hold up the release to add bugfixes etc. @@ -50,6 +50,6 @@ To put live: If the release PR targeted a branch other than main, you will need to cherry-pick the version bumps, CHANGELOG modifications and removal of towncrier `newsfragments` and open another PR to land these on main. -## 6. Delete the release branch (patch releases only) +## 6. Delete the release branch (patch releases only) For 0.X.Y patch releases, the release branch is no longer needed, so it should be deleted. diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 1b97a1c8..52a8069f 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -5,7 +5,7 @@ publish = false edition = "2018" [dev-dependencies] -pyo3 = { version = "0.17.3", path = "..", features = ["auto-initialize", "extension-module"] } +pyo3 = { version = "0.18.0", path = "..", features = ["auto-initialize", "extension-module"] } [[example]] name = "decorator" diff --git a/examples/decorator/.template/pre-script.rhai b/examples/decorator/.template/pre-script.rhai index 75638cc8..c9759acc 100644 --- a/examples/decorator/.template/pre-script.rhai +++ b/examples/decorator/.template/pre-script.rhai @@ -1,4 +1,4 @@ -variable::set("PYO3_VERSION", "0.17.3"); +variable::set("PYO3_VERSION", "0.18.0"); file::rename(".template/Cargo.toml", "Cargo.toml"); file::rename(".template/pyproject.toml", "pyproject.toml"); file::rename(".template/tox.ini", "tox.ini"); diff --git a/examples/maturin-starter/.template/pre-script.rhai b/examples/maturin-starter/.template/pre-script.rhai index 75638cc8..c9759acc 100644 --- a/examples/maturin-starter/.template/pre-script.rhai +++ b/examples/maturin-starter/.template/pre-script.rhai @@ -1,4 +1,4 @@ -variable::set("PYO3_VERSION", "0.17.3"); +variable::set("PYO3_VERSION", "0.18.0"); file::rename(".template/Cargo.toml", "Cargo.toml"); file::rename(".template/pyproject.toml", "pyproject.toml"); file::rename(".template/tox.ini", "tox.ini"); diff --git a/examples/setuptools-rust-starter/.template/pre-script.rhai b/examples/setuptools-rust-starter/.template/pre-script.rhai index a12f34aa..69574a02 100644 --- a/examples/setuptools-rust-starter/.template/pre-script.rhai +++ b/examples/setuptools-rust-starter/.template/pre-script.rhai @@ -1,4 +1,4 @@ -variable::set("PYO3_VERSION", "0.17.3"); +variable::set("PYO3_VERSION", "0.18.0"); file::rename(".template/Cargo.toml", "Cargo.toml"); file::rename(".template/setup.cfg", "setup.cfg"); file::rename(".template/tox.ini", "tox.ini"); diff --git a/examples/word-count/.template/pre-script.rhai b/examples/word-count/.template/pre-script.rhai index ddac6b62..88f41205 100644 --- a/examples/word-count/.template/pre-script.rhai +++ b/examples/word-count/.template/pre-script.rhai @@ -1,4 +1,4 @@ -variable::set("PYO3_VERSION", "0.17.3"); +variable::set("PYO3_VERSION", "0.18.0"); file::rename(".template/Cargo.toml", "Cargo.toml"); file::rename(".template/tox.ini", "tox.ini"); file::delete(".template"); diff --git a/newsfragments/2398.added.md b/newsfragments/2398.added.md deleted file mode 100644 index a547d451..00000000 --- a/newsfragments/2398.added.md +++ /dev/null @@ -1 +0,0 @@ -Add `GILOnceCell::get_or_try_init` for fallible `GILOnceCell` initialization. diff --git a/newsfragments/2490.added.md b/newsfragments/2490.added.md deleted file mode 100644 index f1d85bc3..00000000 --- a/newsfragments/2490.added.md +++ /dev/null @@ -1 +0,0 @@ -Added `type_input()` and `type_output()` to get the Python type of any Python-compatible object. diff --git a/newsfragments/2587.removed.md b/newsfragments/2587.removed.md deleted file mode 100644 index 65650998..00000000 --- a/newsfragments/2587.removed.md +++ /dev/null @@ -1 +0,0 @@ -Remove the deprecated `pyproto` feature, `#[pyproto]` macro, and all accompanying APIs. diff --git a/newsfragments/2664.changed.md b/newsfragments/2664.changed.md deleted file mode 100644 index 7dd461d7..00000000 --- a/newsfragments/2664.changed.md +++ /dev/null @@ -1 +0,0 @@ -PyO3's macros now emit a much nicer error message if function return values don't implement the required trait(s). \ No newline at end of file diff --git a/newsfragments/2685.changed.md b/newsfragments/2685.changed.md deleted file mode 100644 index 8e498fe1..00000000 --- a/newsfragments/2685.changed.md +++ /dev/null @@ -1 +0,0 @@ -Use a TypeError, rather than a ValueError, when refusing to treat a str as a Vec diff --git a/newsfragments/2686.changed.md b/newsfragments/2686.changed.md deleted file mode 100644 index a1c54ea0..00000000 --- a/newsfragments/2686.changed.md +++ /dev/null @@ -1 +0,0 @@ -Change PyCFunction::new_closure to take name and doc arguments. diff --git a/newsfragments/2692.added.md b/newsfragments/2692.added.md deleted file mode 100644 index d6e45677..00000000 --- a/newsfragments/2692.added.md +++ /dev/null @@ -1 +0,0 @@ -The `#[pyclass]` macro can now take `get_all` and `set_all` to create getters and setters for every field. \ No newline at end of file diff --git a/newsfragments/2695.changed.md b/newsfragments/2695.changed.md deleted file mode 100644 index 4765f35a..00000000 --- a/newsfragments/2695.changed.md +++ /dev/null @@ -1,3 +0,0 @@ -`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__`. diff --git a/newsfragments/2702.added.md b/newsfragments/2702.added.md deleted file mode 100644 index 6fa67fe1..00000000 --- a/newsfragments/2702.added.md +++ /dev/null @@ -1 +0,0 @@ -Add `#[pyo3(signature = (...))]` option for `#[pyfunction]` and `#[pymethods]`. diff --git a/newsfragments/2702.changed.md b/newsfragments/2702.changed.md deleted file mode 100644 index e39fd3a8..00000000 --- a/newsfragments/2702.changed.md +++ /dev/null @@ -1 +0,0 @@ -Deprecate `#[args]` attribute and passing "args" specification directly to `#[pyfunction]` in favour of the new `#[pyo3(signature = (...))]` option. diff --git a/newsfragments/2703.changed.md b/newsfragments/2703.changed.md deleted file mode 100644 index bc67791e..00000000 --- a/newsfragments/2703.changed.md +++ /dev/null @@ -1 +0,0 @@ -Deprecate required arguments after `Option` arguments to `#[pyfunction]` and `#[pymethods]` without also using `#[pyo3(signature)]` to specify whether the arguments should be required or have defaults. diff --git a/newsfragments/2705.changed.md b/newsfragments/2705.changed.md deleted file mode 100644 index 8365fc01..00000000 --- a/newsfragments/2705.changed.md +++ /dev/null @@ -1 +0,0 @@ -Change `#[pyfunction]` and `#[pymethods]` to use a common call "trampoline" to slightly reduce generated code size and compile times. diff --git a/newsfragments/2715.fixed.md b/newsfragments/2715.fixed.md deleted file mode 100644 index 00e856ee..00000000 --- a/newsfragments/2715.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Disable `PyModule::filename` on PyPy diff --git a/newsfragments/2726.fixed.md b/newsfragments/2726.fixed.md deleted file mode 100644 index ec8020fe..00000000 --- a/newsfragments/2726.fixed.md +++ /dev/null @@ -1 +0,0 @@ -`PyCodeObject` is now once again defined with fields on Python 3.7. diff --git a/newsfragments/2727.added.md b/newsfragments/2727.added.md deleted file mode 100644 index bfc836d8..00000000 --- a/newsfragments/2727.added.md +++ /dev/null @@ -1 +0,0 @@ -`pyo3-build-config`: rebuild when `PYO3_ENVIRONMENT_SIGNATURE` environment variable value changed diff --git a/newsfragments/2730.added.md b/newsfragments/2730.added.md deleted file mode 100644 index 3507c1cd..00000000 --- a/newsfragments/2730.added.md +++ /dev/null @@ -1 +0,0 @@ -Add conversions between non-zero int types in `std::num` and Python int. diff --git a/newsfragments/2734.added.md b/newsfragments/2734.added.md deleted file mode 100644 index ccbd31b5..00000000 --- a/newsfragments/2734.added.md +++ /dev/null @@ -1,2 +0,0 @@ -Added `Py::downcast()` as a companion to `PyAny::downcast()`, as well as -`downcast_unchecked()` for both types. diff --git a/newsfragments/2734.changed.md b/newsfragments/2734.changed.md deleted file mode 100644 index 9eb9ff3d..00000000 --- a/newsfragments/2734.changed.md +++ /dev/null @@ -1,3 +0,0 @@ -`PyAny::cast_as()` and `Py::cast_as()` are now deprecated in favor of -`PyAny::downcast()` and the new `Py::downcast()`. The `PyAny::downcast()` -lifetime bounds where slightly relaxed. diff --git a/newsfragments/2742.added.md b/newsfragments/2742.added.md deleted file mode 100644 index 0d2871ea..00000000 --- a/newsfragments/2742.added.md +++ /dev/null @@ -1 +0,0 @@ -Added exports for all built-in `Warning` classes as well as `PyErr::warn_explicit`. diff --git a/newsfragments/2749.fixed.md b/newsfragments/2749.fixed.md deleted file mode 100644 index e37742a1..00000000 --- a/newsfragments/2749.fixed.md +++ /dev/null @@ -1,2 +0,0 @@ -Fix a bug that allowed `#[new]` pymethods with no arguments to be called from -Python with any argument list. diff --git a/newsfragments/2760.fixed.md b/newsfragments/2760.fixed.md deleted file mode 100644 index 65f543e6..00000000 --- a/newsfragments/2760.fixed.md +++ /dev/null @@ -1,2 +0,0 @@ -Also apply the `NOARGS` argument convention to methods that have a single -`py: Python` argument. diff --git a/newsfragments/2769.fixed.md b/newsfragments/2769.fixed.md deleted file mode 100644 index d575dd2a..00000000 --- a/newsfragments/2769.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix truncation of `isize` values to `c_long` in `PySlice::new`. diff --git a/newsfragments/2772.fixed.md b/newsfragments/2772.fixed.md deleted file mode 100644 index cf7b7986..00000000 --- a/newsfragments/2772.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix soundness issue with FFI definition `PyUnicodeDecodeError_Create` on PyPy leading to indeterminate behaviour (typically a `TypeError`). diff --git a/newsfragments/2776.added.md b/newsfragments/2776.added.md deleted file mode 100644 index 6166ef1d..00000000 --- a/newsfragments/2776.added.md +++ /dev/null @@ -1 +0,0 @@ -Add `abi3-py311` feature. diff --git a/newsfragments/2784.changed.md b/newsfragments/2784.changed.md deleted file mode 100644 index 74c0428d..00000000 --- a/newsfragments/2784.changed.md +++ /dev/null @@ -1 +0,0 @@ -Automatically generate `__text_signature__` for all Python functions created using `#[pyfunction]` and `#[pymethods]`. diff --git a/newsfragments/2788.added.md b/newsfragments/2788.added.md deleted file mode 100644 index 2c744cef..00000000 --- a/newsfragments/2788.added.md +++ /dev/null @@ -1 +0,0 @@ -Define `_PyErr_ChainExceptions()` FFI for CPython. diff --git a/newsfragments/2795.changed.md b/newsfragments/2795.changed.md deleted file mode 100644 index b78efb63..00000000 --- a/newsfragments/2795.changed.md +++ /dev/null @@ -1 +0,0 @@ -Accept any iterator in `PySet::new` and `PyFrozenSet::new`. diff --git a/newsfragments/2796.changed.md b/newsfragments/2796.changed.md deleted file mode 100644 index 6d50956d..00000000 --- a/newsfragments/2796.changed.md +++ /dev/null @@ -1 +0,0 @@ -Mixing cfgs and pyo3 attributes on struct fields will now work \ No newline at end of file diff --git a/newsfragments/2800.fixed.md b/newsfragments/2800.fixed.md deleted file mode 100644 index 6a5b8503..00000000 --- a/newsfragments/2800.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Allow functions taking `**kwargs` to accept keyword arguments which share a name with a positional-only argument (as permitted by PEP 570). diff --git a/newsfragments/2811.added.md b/newsfragments/2811.added.md deleted file mode 100644 index 63242532..00000000 --- a/newsfragments/2811.added.md +++ /dev/null @@ -1 +0,0 @@ -Add FFI definitions `PyVectorcall_NARGS` and `PY_VECTORCALL_ARGUMENTS_OFFSET` for PyPy 3.8 and up. diff --git a/newsfragments/2811.fixed.md b/newsfragments/2811.fixed.md deleted file mode 100644 index 0011182c..00000000 --- a/newsfragments/2811.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix unresolved symbol for `PyObject_Vectorcall` on PyPy 3.9 and up. diff --git a/newsfragments/2827.added.md b/newsfragments/2827.added.md deleted file mode 100644 index 4bd084ae..00000000 --- a/newsfragments/2827.added.md +++ /dev/null @@ -1 +0,0 @@ -Add `PyList::get_item_unchecked` for PyPy. diff --git a/newsfragments/2838.changed.md b/newsfragments/2838.changed.md deleted file mode 100644 index d459d239..00000000 --- a/newsfragments/2838.changed.md +++ /dev/null @@ -1 +0,0 @@ -Re-enable `PyFunction` on when building for abi3 or PyPy. diff --git a/newsfragments/2842.fixed.md b/newsfragments/2842.fixed.md deleted file mode 100644 index 2bb66b11..00000000 --- a/newsfragments/2842.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix memory leak in `PyCFunction::new_closure`. diff --git a/newsfragments/2843.removed.md b/newsfragments/2843.removed.md deleted file mode 100644 index bd7d399b..00000000 --- a/newsfragments/2843.removed.md +++ /dev/null @@ -1 +0,0 @@ -Remove all functionality deprecated in PyO3 0.16. diff --git a/newsfragments/2849.packaging.md b/newsfragments/2849.packaging.md deleted file mode 100644 index 62084844..00000000 --- a/newsfragments/2849.packaging.md +++ /dev/null @@ -1 +0,0 @@ -Relax dependency on Rust crate `indexmap` to cover `>= 1.6, < 2` diff --git a/newsfragments/2875.changed.md b/newsfragments/2875.changed.md deleted file mode 100644 index b2f82e4b..00000000 --- a/newsfragments/2875.changed.md +++ /dev/null @@ -1 +0,0 @@ -Update `memoffset` to 0.8 and relax `hashbrown` version constraint to allow 0.13.x diff --git a/newsfragments/2879.changed.md b/newsfragments/2879.changed.md deleted file mode 100644 index 42c5287a..00000000 --- a/newsfragments/2879.changed.md +++ /dev/null @@ -1 +0,0 @@ -Improve `derive(FromPyObject)` to apply `intern!` when applicable to `#[pyo3(item)]`. diff --git a/pyo3-build-config/Cargo.toml b/pyo3-build-config/Cargo.toml index 3f519eab..5aa75694 100644 --- a/pyo3-build-config/Cargo.toml +++ b/pyo3-build-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-build-config" -version = "0.17.3" +version = "0.18.0" description = "Build configuration for the PyO3 ecosystem" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] diff --git a/pyo3-ffi/Cargo.toml b/pyo3-ffi/Cargo.toml index 846cda6f..80bf3eb8 100644 --- a/pyo3-ffi/Cargo.toml +++ b/pyo3-ffi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-ffi" -version = "0.17.3" +version = "0.18.0" description = "Python-API bindings for the PyO3 ecosystem" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -38,4 +38,4 @@ generate-import-lib = ["pyo3-build-config/python3-dll-a"] [build-dependencies] -pyo3-build-config = { path = "../pyo3-build-config", version = "0.17.3", features = ["resolve-config"] } +pyo3-build-config = { path = "../pyo3-build-config", version = "0.18.0", features = ["resolve-config"] } diff --git a/pyo3-macros-backend/Cargo.toml b/pyo3-macros-backend/Cargo.toml index 8669d214..3ff76d84 100644 --- a/pyo3-macros-backend/Cargo.toml +++ b/pyo3-macros-backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-macros-backend" -version = "0.17.3" +version = "0.18.0" description = "Code generation for PyO3 package" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] diff --git a/pyo3-macros/Cargo.toml b/pyo3-macros/Cargo.toml index 372ad78f..661de9ca 100644 --- a/pyo3-macros/Cargo.toml +++ b/pyo3-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-macros" -version = "0.17.3" +version = "0.18.0" description = "Proc macros for PyO3 package" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -22,4 +22,4 @@ abi3 = ["pyo3-macros-backend/abi3"] proc-macro2 = { version = "1", default-features = false } quote = "1" syn = { version = "1.0.56", features = ["full", "extra-traits"] } -pyo3-macros-backend = { path = "../pyo3-macros-backend", version = "=0.17.3" } +pyo3-macros-backend = { path = "../pyo3-macros-backend", version = "=0.18.0" } diff --git a/pyproject.toml b/pyproject.toml index e9b46d06..e62881d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ exclude = ''' [tool.towncrier] filename = "CHANGELOG.md" -version = "0.17.3" +version = "0.18.0" start_string = "\n" template = ".towncrier.template.md" title_format = "## [{version}] - {project_date}"