Recent Releases of pyo3
pyo3 - PyO3 0.26.0
This version solidifies support for Python 3.14 and free-threaded Python 3.14t. A number of PyO3 APIs have been renamed to reflect the fact the GIL is no longer a universal feature of all Python implementations. For example:
- Python::with_gil is now known as Python::attach
- Python::allow_threads is now known as Python::detach
- pyo3::prepare_freethreaded_python is now known as Python::initialize()
The minimum supported Rust version has been increased to Rust 1.74.
An optional dependency on the bytes crate has been added to allow support for converting bytes::Bytes to / from Python.
The PyObject type alias for Py<PyAny> has also been deprecated; the Py and Bound smart pointers have been the primary interface for all Python-facing types since PyO3 0.21 and the PyObject type alias had been a frequent source of confusion.
There are also many other incremental improvements, bug fixes and smaller features.
Please consult the migration guide for help upgrading.
Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following contributors' commits are included in this release:
@ahlinc @alex @anilbey @bschoenmaeckers @Cheukting @codeguru42 @davidhewitt @decathorpe @dependabot[bot] @drewkett @FlickerSoul @Icxolu @jder @jessekrubin @jjmarchewitz @kemingy @msimacek @musicinmybrain @ngoldbaum @Nnamdi-sys @nucccc @olp-cs @robsdedude @rrricharrrd @sxlijin @timfel @tonybaloney @Tpt @wxianxin @xushiyan @yogevm15
- Rust
Published by davidhewitt 6 months ago
pyo3 - PyO3 0.25.1
This release adds testing for arm64 Windows, and fixes a bug with Python 3.14 support on 32-bit systems.
This release also adds a chrono-local feature to enable support for chrono::Local timezone (this was previously available in PyO3 0.24 but would convert the local timezone to a fixed offset, which did not round-trip well).
There are a few other fixes, mostly correcting FFI definitions and improving compiler errors when writing async code without the experimental-async feature enabled.
Thank you to the following contributors for the improvements:
@bschoenmaeckers @Cheukting @davidhewitt @decathorpe @dependabot[bot] @Icxolu @jessekrubin @musicinmybrain @ngoldbaum @timfel @tonybaloney @Tpt @yogevm15
- Rust
Published by davidhewitt 8 months ago
pyo3 - PyO3 0.25.0
This version extends Python version support to include the new Python 3.14, currently in beta. Please note it is possible that there may yet be changes to 3.14 before stable release which may impact final compatibility.
New optional dependencies on bigdecimal, ordered_float, and time have been added to permit converting types from those crates to Python types (and vice versa).
The experimental-inspect feature now has the capability to autogenerate type stubs. These stubs are still extremely basic and lack much information. Tooling such as setuptools-rust and maturin will also need to be updated to make adoption of these easier. Please follow https://github.com/PyO3/pyo3/issues/5137 to keep abreast of developments of this feature.
The #[pyclass] macro has gained new options #[pyclass(generic)] and #[pyclass(immutable_type)] to offer additional control over the runtime behaviour of the generated Python type object.
The AsPyPointer trait has been removed as PyO3's smart pointer types such as Py<T>, Bound<T> and Borrowed<T> covered this use case with a better API.
As part of the upgrade to support 3.14, there have also been many cleanups to pyo3-ffi. Many definitions which are private implementation details of CPython have been removed; projects downstream of CPython cannot rely on stability of these even across CPython patch releases.
There are also many other incremental improvements, bug fixes and smaller features.
Please consult the migration guide for help upgrading.
Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following contributors' commits are included in this release:
@0x676e67 @bschoenmaeckers @clin1234 @davidbrochart @davidhewitt @ddelange @decathorpe @dependabot[bot] @exg @hgmich @Icxolu @IvanIsCoding @m-ou-se @n-eq @ngoldbaum @Owen-CH-Leung @prutschman-iv @superserious-dev @Tpt @trim21 @Vrajs16 @xhochy
- Rust
Published by davidhewitt 9 months ago
pyo3 - PyO3 0.24.2
This is a small patch release containing minor bugfixes and documentation improvements, including an unused imports lint warning raised from inside PyO3's proc macros.
Thank you to the following contributors for the improvements:
@davidbrochart @davidhewitt @ddelange @decathorpe @hgmich @Icxolu @n-eq @Tpt @trim21
- Rust
Published by davidhewitt 10 months ago
pyo3 - v0.24.1
This release is a security fix for the PyString::from_object method, which passed &str data to the Python C API without checking for a terminating nul byte. All historical PyO3 versions are affected, and we recommend you upgrade if you are using PyString::from_object. Thank you to @vthib for the report and @Dr-Emann for the fix. A RUSTSEC advisory will be published shortly.
Aside from the security fix, this release contains a number of other non-breaking additions:
- An
abi3-py313feature to support compiling with the Python 3.13 stable ABI. PyAnyMethods::getattr_optto get optional attributes without paying the cost of a Python exception when the attribute in question does not exist.- Constructor for
PyInt::new. with_critical_section2for locking two objects at the same time on the free-threaded build.- Fix for a PyO3 0.24.0 regression with
Option<&str>andOption<&T>(whereT: PyClass) function arguments no longer being permitted
There are also a few other small bug fixes for edge cases, mostly related to compile errors from PyO3's macro code.
Thank you to the following contributors for the improvements:
@bschoenmaeckers @davidhewitt @Dr-Emann @emmagordon @epontan @Icxolu @IvanIsCoding @jelmer @jonaspleyer @ngoldbaum @Owen-CH-Leung @Tpt @Trolldemorted @XuehaiPan
- Rust
Published by davidhewitt 11 months ago
pyo3 - PyO3 0.24.0
This release is an incremental improvement of refinements and optimizations following the new APIs established in PyO3's last few releases.
Support for jiff datetime conversions have been added, and also UUID conversions.
The FromPyObject derive macro has gained new #[pyo3(default = ...)] and #[pyo3(rename_all = ...)] options, and the IntoPyObject derive macro has gained a new #[pyo3(into_py_with = ...)] option.
PyO3 will now pass positional arguments to Python functions using the "vectorcall" protocol in many cases, which should be an optimization over the previous behaviour (of creating a Python tuple of positional arguments).
Many methods on iterators of Python collections have been optimized.
There are also many other incremental improvements, bug fixes and smaller features.
Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following contributors' commits are included in this release:
@0x676e67 @alex @arielb1 @bschoenmaeckers @davidhewitt @dependabot[bot] @eltociear @Icxolu @IvanIsCoding @JeanArhancet @kahojyun @kemingy @kylebarron @LifeLex @LilyFoote @lundybernard @matt-codecov @mattip @mejrs @messense @msimacek @ngoldbaum @nicolasavru @Owen-CH-Leung @peterjoel @SilverBzH @Tpt @yoav-orca @yotamofek
- Rust
Published by davidhewitt 12 months ago
pyo3 - PyO3 0.23.5
This release is a final set of backports onto the PyO3 0.23 series:
- PyPy 3.11 support
- Fixes to #[pyclass(freelist)] on free-threaded Python 3.13
- Fix to Python::run for a case when __builtins__ is not loaded correctly on Python 3.10+
Thank you to the following contributors for the improvements:
@arielb1 @Icxolu @LilyFoote @mattip @mgorny @ngoldbaum
- Rust
Published by davidhewitt 12 months ago
pyo3 - PyO3 0.23.4
This release contains a range of fixes on top of PyO3 0.23.3, primarily grouped into the following categories:
- Fixes for the new support for free-threaded Python 3.13
- Fixes to conversions between Python and chrono datetimes
- Fixes to various build configuration cases for Windows
- Fixes to edge cases in PyO3's macros leading to compile failures
Thank you to the following contributors for the improvements:
@alex @bschoenmaeckers @davidhewitt @Icxolu @kahojyun @LilyFoote @mejrs @messense @msimacek @ngoldbaum @Owen-CH-Leung @Tpt
- Rust
Published by davidhewitt about 1 year ago
pyo3 - PyO3 0.23.3
This release is a soundness fix for PyO3 0.23.0 through 0.23.2.
In PyO3 0.23.0 the PYO3_CONFIG_FILE environment variable used to configure builds regressed such that changing the environment variable would no longer trigger PyO3 to reconfigure and recompile. In combination with workflows using tools such as maturin to build for multiple versions in a single build, this leads to Python wheels being compiled against the wrong Python API version.
All users who distribute artefacts for multiple Python versions are encouraged to update and rebuild with PyO3 0.23.3. Affected wheels produced from PyO3 0.23.0 through 0.23.2 are highly unstable and will crash the Python interpreter in unpredictable ways.
Aside from this fix, PyO3 0.23.3 contains some fixes to link configuration for Python 3.13t on Windows.
Thank you to the following contributors for the improvements:
@davidhewitt @Icxolu @kemingy
- Rust
Published by davidhewitt about 1 year ago
pyo3 - PyO3 0.23.2
This release fixes a build failure when attempting to compile for free-threaded Python when the abi3 or abi3-pyxx features are enabled. With this fix, the compile will now ignore (with a warning) the abi3 and abi3-pyxx flags (as is the case when compiling for PyPy, as neither support abi3).
This release also iterates upon the new IntoPyObject trait by adding an IntoPyObjectExt helper trait with some common convenience functions.
Finally, a compile failure related to ambiguous_associated_items lint errors inside generated #[pyclass] and #[derive(IntoPyObject)] output has been fixed.
Thank you to the following contributors for the improvements:
@davidhewitt @LilyFoote @ngoldbaum
- Rust
Published by davidhewitt about 1 year ago
pyo3 - PyO3 0.23.1
This is a re-release of PyO3 0.23.0 with corrections to fix docs.rs builds.
Thanks @yotamofek for the reports & fixes!
- Rust
Published by davidhewitt over 1 year ago
pyo3 - PyO3 0.23.0
This release is a significant iteration to both PyO3's internals and API with two major enhancements:
- Support for Python 3.13t, also known as "free-threaded Python".
- A new trait IntoPyObject, which unifies the existing to-Python conversion traits IntoPy and ToPyObject while also allowing new optimizations and proper error handling. The new trait also has a #[derive(IntoPyObject)] macro.
While both of these new features have undergone extensive design, it will be no surprise to find teething issues. All feedback is encouraged so that we can follow up with iterative improvements for these new features in future releases.
On top of the major additions, the removal of the "GIL Refs" API deprecated in PyO3 0.21 is now complete. A number of PyO3 APIs have had new simpler names introduced now that the PyO3 API is no longer in a migration phase (for example PyTuple::new_bound is now simplified to PyTuple::new).
Beyond that, PyO3 0.23 contains nearly 5 months of incremental improvements, bug fixes and smaller features that have been implemented while the major work of this release was ongoing.
Please consult the migration guide for help upgrading.
Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following contributors' commits are included in this release:
@abrisco @adamcavendish @ahlinc @akuhnregnier @alex @attack68 @birkenfeld @Brogolem35 @bschoenmaeckers @ChayimFriedman2 @Cheukting @csernazs @davidhewitt @deedy5 @dependabot[bot] @digitalsentinel @exg @FlickerSoul @gi0baro @glevco @Icxolu @jakelishman @jeff-k @jonaspleyer @JRRudy1 @KLMatlock @konstin @LilyFoote @MatthijsKok @Mottl @ngoldbaum @obi1kenobi @Owen-CH-Leung @sansyrox @shehabgamin @Stranger6667 @styvane @Thalyum @Tlunch @wangxiaoying @WilliamTakeshi @YesSeri @Zyell
- Rust
Published by davidhewitt over 1 year ago
pyo3 - PyO3 0.22.6
This release corrects the check for free-threaded Python introduced in PyO3 0.22.2 to prevent users accidentally installing PyO3 packages on Python 3.13t; PyO3 0.22 does not support free-threaded Python. (Stay tuned for the 0.23 release coming very soon!)
Thanks @minrk for the report and @davidhewitt for the fix!
- Rust
Published by davidhewitt over 1 year ago
pyo3 - PyO3 0.22.5
This release fixes a compile regression from 0.22.4 where #[pymethods] with name __clear__ and clear would generate code with a naming conflict. Thanks @awolverp for the report and @Icxolu for the fix!
- Rust
Published by davidhewitt over 1 year ago
pyo3 - PyO3 0.22.4
This release is a security fix for PyO3 0.22.0 through 0.22.3.
The PyWeakrefMethods trait functions for reading borrowed values from Python weak references have been identified as unsound, because they did not account for the possibility the last strong reference could be cleared at any time, leading the borrowed value to be dangling and risk of use-after-free.
PyO3 0.22.4 protects against this issue by making these methods permanently leak strong references. The methods are also marked deprecated and will be removed in PyO3 0.23. Users should switch to use the use PyWeakrefMethods functions which return owned references (the deprecation messages indicate the appropriate upgrade paths).
These functions were added in PyO3 0.22.0; all versions from 0.22.0 through 0.22.3 have been yanked.
Aside from the security fix, PyO3 0.22.4 contains a number of other bugfixes, including:
- A fix for cases where __traverse__ functions of base types were not called when using #[pyclass(extends = ...)]
- A fix for a regression in 0.22.3 where PyO3 generated code would trigger compile failures with crates using #![forbid(unsafe_code)]
Thank you to the following contributors for the improvements:
@davidhewitt @ngoldbaum @exg @Icxolu
- Rust
Published by davidhewitt over 1 year ago
pyo3 - PyO3 0.22.3
This release contains a number of quality improvements building upon PyO3 0.22.2.
Python function calls (using .call0(), .call1(args) and .call(args, kwargs)) will now make use of the "vectorcall" calling conventions where possible, which can reduce overheads in many cases.
There have been several fix-ups to PyO3's FFI definitions. A new pyo3::ffi::compat namespace has been added which offers some backwards-compatible implementations of Python APIs otherwise normally only available on recent Pythons.
There have been numerous other bug-fixes and minor tweaks to improve user experience.
Thank you to the following contributors for the improvements:
@birkenfeld @ChayimFriedman2 @csernazs @davidhewitt @Icxolu @jakelishman @LilyFoote @ngoldbaum @Zyell
- Rust
Published by davidhewitt over 1 year ago
pyo3 - PyO3 0.22.2
This release contains some minor reliability fixes building upon PyO3 0.22.1.
As PyO3 is still working on supporting freethreaded Python (upcoming in 3.13), support has been gated behind an UNSAFE_PYO3_BUILD_FREE_THREADED=1 environment variable to avoid unsuspecting users running into broken builds.
Packages built for the abi3 stable ABI will now use FFI functions for refcounting instead of inline reference count modifications on all versions of the stable ABI (previously only abi3 builds for 3.12 and up would use FFI functions). This helps mitigate interactions of old versions of the stable ABI with future CPython releases which do more complex reference counting (e.g. immortal objects, freethreaded reference counting).
The #[pymodule] declarative module now supports directly receiving options. (E.g. #[pymodule(name = "foo")], which would previously have been written as two attributes #[pymodule] #[pyo3(name = "foo")].)
A compile error on Rust 1.78 related to use of c"" literals has been fixed.
Thank you to the following contributors for the improvements:
@davidhewitt @FlickerSoul @gi0baro @Icxolu @MatthijsKok @styvane
- Rust
Published by davidhewitt over 1 year ago
pyo3 - PyO3 0.22.1
This patch release improves some cases related to new functionality in PyO3 0.22.
PartialEq<bool> has been added for Bound<'py, PyBool>.
The #[pyo3(submodule)] attribute has been added for declarative modules to stop submodules from generating an external C symbol for importing the submodule directly (which is typically never used). Declarative modules will also now correctly add items annotated with full-path attributes like #[pyo3::prelude::pyfunction].
The #[pyclass(eq)] option will no longer raise a TypeError on comparison against types not in the signature.
A #[setter] in #[pymethods] with an Option<T> input will no longer raise a deprecation warning.
A regression has been fixed in conversions for 128-bit integers on big-endian platforms.
Thank you to the following contributors for the improvements:
@alex @davidhewitt @jatoben @kylebarron @musicinmybrain @ngoldbaum @Owen-CH-Leung
- Rust
Published by davidhewitt over 1 year ago
pyo3 - PyO3 0.22.0
This release introduces support for Python 3.13. Please note that Python 3.13 is still in beta, and while breaking changes are not expected it is very possible that code compiled against Python 3.13 beta versions will be incompatible with the final 3.13 release later in the year.
The minimum supported Rust version has been increased to Rust 1.63.
PyO3's deferred reference counting used to implement Clone for Py<T> without the global interpreter lock has been demonstrated to be impossible to implement safely in the general case and has consequently been changed to panic instead of deferring when cloning Py<T> without the GIL being held. Given the nature of panics inside Clone operations being a potential footgun, this implementation has been moved behind the opt-in py-clone feature.
Other particularly notable changes include:
- The #[pyclass] macro now has additional options #[pyclass(eq, ord, hash)] to automatically generate Python implementations for equality, ordering and hashing based upon the Rust PartialEq, PartialOrd and Hash traits. This can ensure consistency and reduce boilerplate compared to implementing __eq__, __hash__ and so on manually.
- The experimental-declarative-modules feature to support #[pymodule] on Rust mod items has been stabilised (and the feature flag removed). The existing implementation of #[pymodule] on fn items is still present but soft-deprecated; in the future new features will likely be added only to declarative modules, and the fn modules may eventually be deprecated and removed.
- The GIL Refs API deprecation started in PyO3 0.21 continues with all related APIs now being gated behind the gil-refs feature, and unconditionally deprecated. In PyO3 0.23 these APIs are expected to be 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 contributors' commits are included in this release:
@adamreichold @alex @aneeshusa @birkenfeld @blmarket @Cheukting @cmpute @codeguru42 @Databean @davidbrochart @davidhewitt @deedy5 @dmatos2012 @Icxolu @JRRudy1 @lfn3 @liammcinroy @linhr @mejrs @messense @newcomertv @reswqa @sk1p @SuperJappie08 @Tpt @wyfo @xen0n @Zyell
- Rust
Published by davidhewitt over 1 year ago
pyo3 - PyO3 0.21.2
This release contains some fixes to compile-time edge cases for the PyO3 0.21 series:
- A missing deprecation warning for the GIL Ref constructor PySet::empty has now been added.
- #[pymodule] functions will no longer trigger missing_docs lints on their generated code.
- Incorrect implementations of __traverse__ in #[pymethods] will now emit a better error.
- Extension modules on AIX will now link to libpython.
This release also fixes some compile errors for the experimental-async and experimental-declarative-modules features, and corrects some documentation typos.
Thank you to the following users for the improvements:
@adamreichold @blmarket @davidhewitt @Icxolu @lfn3 @messense @wyfo
- Rust
Published by davidhewitt almost 2 years ago
pyo3 - PyO3 0.21.1
This release is a set of touch-ups to PyO3 0.21 to fix cases found as adoption of PyO3 0.21.0 progressed.
The new PyBackedStr and PyBackedBytes types have had a large range of standard traits implemented, including Clone, PartialEq, Hash, PartialOrd, Display, Debug, Send and Sync.
The argument to a #[setter] function now accepts the full range of input types as any other function argument in a #[pymethods] block, and will now correctly handle a #[pyo3(from_py_with = "...")] annotation.
Some procedural macro output has been adjusted to reuse more code and make it easier to reach complete code coverage in projects using PyO3. The import_exception_bound! macro has been added to further assist with coverage during migration, by skipping generating code which is only needed to use the exception as a GIL Ref.
Finally, the experimental-async feature now correctly handles async fn in #[pymethods] which have a &self or &mut self receiver plus additional arguments.
Thank you to the following users for the improvements:
@alex @davidhewitt @geo7 @Icxolu @reswqa @rikushoney @tisonkun
- Rust
Published by davidhewitt almost 2 years ago
pyo3 - PyO3 0.21.0
This release introduces a substantial new direction for PyO3's API. The Bound<'py, T> smart pointer type has been added that replaces "GIL Refs" such as &'py PyAny and &'py PyList with smart-pointer forms Bound<'py, PyAny> and Bound<'py, PyList>. This new smart pointer brings ownership out of PyO3's internals and into user control. This has been done for sake of both performance and soundness.
The migration guide extensively details the intended transition to the new API. To allow users a more graceful upgrade path, PyO3 0.21 and 0.22 will maintain backwards compatibility support for the existing "GIL Refs" API.
As well as the Bound API, highlights of PyO3 0.21 include:
- Support for compiling for GraalPy
- Extended chrono / datetime conversions, including support for the abi3 feature and the chrono-tz crate
- Simplifications to __next__ and __anext__ methods
PyO3 0.21 also includes two new experimental features:
- experimental-async for a simple async fn integration between Rust and Python.
- experimental-declarative-modules for a new simpler #[pymodule] syntax.
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:
@acceptacross @adamreichold @aldanor @alex @alonme @alxhill @birkenfeld @btel @daemontus @davidhewitt @dmatos2012 @Hamatti @Icxolu @jadedpasta @Jerry-Master @jessekrubin @Jgfrausing @juntyr @kushaldas @LilyFoote @maffoo @mejrs @messense @mkovaxx @neachdainn @orhun @samuelcolvin @snuderl @suriya-ganesh @timfel @Tpt @wyfo @Xuanwo
- Rust
Published by davidhewitt almost 2 years ago
pyo3 - PyO3 0.21.0-beta.0
This release is a prerelease of PyO3 0.21 specifically aimed at confirming the new "Bound" API delivers the expected payoffs to downstream projects and that the migration pathway is manageable.
Some documentation is not yet completely polished, and there are some deprecation warnings which are due to be added. The expectation is that this work will take a week or two at most, and the final 0.21 release will follow at that point.
To read about the new Bound API, best to start with the migration guide entry.
If you test out the new API and have feedback, please open a new GitHub issue or discussion, or reach out on PyO3's new Discord. Feedback in this time period before the final release is particularly appreciated.
A more detailed release announcement and acknowledgements will be written with the final release.
- Rust
Published by davidhewitt almost 2 years ago
pyo3 - PyO3 0.20.3
This is a stability & compatibility release to fix a couple of minor compilation edge cases from PyO3 0.20.2.
The portable-atomic dependency has been added to resolve compile failures on platforms without 64-bit atomic support.
A maximum Python version check (currently for Python 3.12) has been added to prevent using old PyO3 code against future Python versions beyond the supported range.
Thank you to the following users for the improvements:
@adamreichold @davidhewitt
- Rust
Published by davidhewitt almost 2 years ago
pyo3 - PyO3 0.20.2
This release corrects a failure to compile of the either feature when the experimental-inspect feature is not enabled.
It also adds backwards-compatibility for pyo3 0.20.0 to build against pyo3-build-config 0.20.2, as pyo3 0.20.0 was (unintentionally) not pinned against an exact patch version pyo3-build-config, and pyo3 0.20.0 could not build against pyo3-build-config 0.20.1 due to an internal API adjustment.
Thank you to the following users for the improvements:
@adamreichold @davidhewitt
- Rust
Published by davidhewitt about 2 years ago
pyo3 - PyO3 0.20.1
This release is a maintenance release to resolve a clippy warning which triggers on function arguments of Py<Self>.
This release also contains a few minor API additions, including optional support for the either and smallvec crates.
Thank you to the following users for the improvements:
@adamreichold @aldanor @alex @daemontus @davidhewitt @mejrs @messense @neachdainn @orhun @suriya-ganesh @wyfo
- Rust
Published by davidhewitt about 2 years ago
pyo3 - PyO3 0.20.0
This release is the first PyO3 release to be dual-licensed under Apache 2.0 OR MIT licensing (expanding from just Apache 2.0 of previous releases).
Python 3.12 stable is now supported. The minimum supported Rust version has been increased to Rust 1.56.
The __eq__, __ne__,__lt__, __le__, __gt__ and __ge__ magic methods are now usable in #[pymethods] to implement Python operators as an alternative to the __richcmp__ method PyO3 already offered.
#[pyclass(rename_all = "renaming_rule")] has been added to rename all fields of structs exposed to Python (e.g. rename_all = "snake_case") .
PyDict::get_item now returns Result<Option<&PyAny>> instead of just Option<&PyAny>. The previous implementation which ignored Python errors used APIs now considered deprecated by the Python language designers; it is now considered best practice to bubble up any exception raised during dictionary __getitem__. For most users migration for this change will simply require addition of a ? on each use of PyDict::get_item.
Note that Python 3.7 is end of life but PyO3 will continue to support for now as a number of downstream Python packages still have high proportions of downloads on 3.7. A future release is expected to drop Python 3.7 when these numbers reduce.
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 @adriangb @alex @BooleanCat @CallMeMSL @cdce8p @DataTriny @davidhewitt @ecarrara @GoldsteinE @grantslatton @Hofer-Julian @ijl @iliya-malecki @jakelishman @jeffs @juntyr @krpatter-intc @lucatrv @mejrs @messense @mhils @panpilkarz @puradox @ringsaturn @rytheo @SigureMo @smheidrich @Tpt @youknowone @zakstucke
- Rust
Published by davidhewitt over 2 years ago
pyo3 - PyO3 0.19.2
This release is a bugfix release with the primary focus being improved compatibility with Python 3.12 betas. Please note that until Python 3.12.0 stable is released PyO3 cannot guarantee that code compiled using PyO3 and beta versions of Python 3.12 will support 3.12 stable.
There have been some new minor APIs added in this release: PyErr::Display, PyAny::downcast_exact and PySlice::full.
Other bugfixes shipped in this release include:
- A correction to the conversion of Python datetime to chrono::DateTime<FixedOffset> with respect to the handling of timezones.
- Fix an edge case where PyErr::matches and PyErr::get_type could return results inconsistent with each other.
- Fix cases where converting a Python exception into a PyErr would cause its traceback to be lost.
Thank you to the following users for the improvements:
@adamreichold @alex @BooleanCat @CallMeMSL @cdce8p @davidhewitt @grantslatton @juntyr @mejrs @panpilkarz @ringsaturn @zakstucke
- Rust
Published by davidhewitt over 2 years ago
pyo3 - PyO3 0.19.1
This release fixes a memory leak caused by a reference counting error which affected PySet::new, PyFrozenSet::new and conversions from Rust set types to Python's set.
There are several other notable quality-of-life changes in this release:
- Support for PyPy 3.10.
- Support for hashbrown 0.14 and indexmap 2.0.
- Conversions for std::net::IpAddr have been added.
- The num-bigint feature is now supported with the abi3 feature.
- The num-complex feature with abi3 feature enabled will now correctly use __complex__ implementations (it always has without abi3 enabled).
- #[new] methods can now return Py<Self> to return an existing object (e.g. for singleton classes).
There are also a handful of other additions and bugfixes included in this release.
Thank you to the following users for the improvements:
@adamreichold @adriangb @alex @CallMeMSL @davidhewitt @ijl @jakelishman @lucatrv @mejrs @mhils @youknowone
- Rust
Published by davidhewitt over 2 years ago
pyo3 - 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
- Rust
Published by davidhewitt over 2 years ago
pyo3 - PyO3 0.18.3
This release fixes an issue with PyDateTime::type_object() incorrectly returning the type object for PyDate, which would cause some is_instance checks to behave incorrectly.
In addition, this release contains a handful of minor quality-of-life corrections over PyO3 0.18.2.
Thank you to the following users for the improvements:
@adamreichold @davidhewitt @decathorpe @ijl @mejrs @messense @sollyucko @willstott101 @wjones127
- Rust
Published by davidhewitt almost 3 years ago
pyo3 - PyO3 0.18.2
This release fixes a rare ref-counting race condition when a PyObject is cloned inside of closure passed to Python::allow_threads. It is advised to update to this release if possible.
Conversions for Cell<T> and Cow<[u8]> have been added, as well as PyList::to_tuple and PyTuple::to_list as the most efficient way to convert between those types.
This release also contains some other minor performance optimisations and bugfixes.
Thank you to the following users for the improvements:
@adamreichold @AdilZouitine @adriangb @AntoineRR @davidhewitt @Enyium @iajoiner @kngwyu @lycantropos @mattip @mejrs @messense @OliverBalfour @samuelcolvin
- Rust
Published by davidhewitt almost 3 years ago
pyo3 - PyO3 0.18.1
This release fixes several bugs identified since PyO3 0.18.0, including a segfault and a Windows-specific issue with the PyIterator type, which would incorrectly accept any Python class regardless of whether it defined __next__ or not.
Some new APIs have been added such as PyErr::write_unraisable(), PyAny::is_ellipsis() and PyDict::update.
Thank you to the following users for the improvements:
@adamreichold @alexpyattaev @davidhewitt @jjerphan @jmhodges @mejrs @messense @mitsuhiko @neachdainn @qbx2 @samuelcolvin
- Rust
Published by davidhewitt about 3 years ago
pyo3 - PyO3 0.18.0
This release contains a number of new features for PyO3's macros which should make maintaining PyO3 projects easier.
#[pyfunction] and #[pymethods] have a new #[pyo3(signature = (...))] option which allows specifying the Python signature. This replaces the #[args] option already present for #[pymethods]; the new option is better-validated and offers a syntax much more intuitive to users familiar with writing pure-Python functions.
#[pyclass] has new get_all and set_all options for cases where all fields of a type should be readable or writable from Python.
The #[pyo3(text_signature = "...")] option is now autogenerated for all functions created with #[pyfunction] and #[pymethods]. It can still be applied manually when it is necessary to override the generated form.
As well as the macro API improvements, some other notable changes include:
- PySet::new and PyFrozenSet::new now accept Rust iterators rather than requiring a slice.
- Rust types have been added for all Python's built-in Warning types.
- Non-zero integer types in std::num now have a conversion to/from Python int.
- The deprecated #[pyproto] attribute is now 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:
@a1phyr @adamreichold @AdilZouitine @alex @birkenfeld @CLOVIS-AI @ctb @dalcde @datapythonista @davidhewitt @dylanbstorey @flickpp @gnaaman-dn @haixuanTao @hauntsaninja @ijl @itamarst @jqnatividad @matthewlloyd @mejrs @messense @mrob95 @ongchi @Oppen @prehner @Psykopear @qbx2 @ryanrussell @saethlin @santokalayil @saulshanabrook @smheidrich @SquidDev
- Rust
Published by davidhewitt about 3 years ago
pyo3 - PyO3 0.17.3
This release confirms support for Python 3.11 in PyO3.
(Previous versions of PyO3 0.17 had been tested against release candidates of Python 3.11 and no Python 3.11 fixes have been added since 0.17.0, so all PyO3 0.17 versions should in practice be fine to use with Python 3.11.)
In addition, some other small additions and fixes have been added on top of PyO3 0.17.2.
Thank you to the following users for the improvements:
@adamreichold @ctb @datapythonista @davidhewitt @messense @saethlin
- Rust
Published by davidhewitt over 3 years ago
pyo3 - PyO3 0.17.2
This release contains non-breaking improvements and bugfixes over PyO3 0.17.1.
A new chrono feature has been added to support converting from types in chrono to types in the Python datetime module. The num-bigint feature has been expanded to add support to PyPy.
There has also been fixes for a couple of regressions observed in PyO3 0.17.
Thank you to the following users for the improvements:
@adamreichold @AdilZouitine @davidhewitt @messense @mrob95 @Oppen @prehner @Psykopear @ryanrussell @smheidrich @SquidDev
- Rust
Published by davidhewitt over 3 years ago
pyo3 - PyO3 0.17.1
This release contains some minor bug fixes for PyO3 0.17.0. In particular the new PyDictItems, PyDictKeys and PyDictValues types are actually accessible!
Thanks to @davidhewitt, @messense and @PrettyWood for the fixes.
- Rust
Published by davidhewitt over 3 years ago
pyo3 - PyO3 0.17.0
This release contains a focus on quality improvements over the PyO3 0.16 releases.
There have been new API types added such as PyDictKeys, PyDictValues, PyDictItems, PyCode, PyFrame, and PySuper. The PyMapping and PySequence types have changed so they are more directly compatible with the corresponding Python Mapping and Sequence base classes in the collections.abc module (this is a breaking change).
A new #[pyclass(frozen)] option has been added to opt-out of runtime borrow checking by removing the ability to access &mut self for objects owned by Python.
There have been a number of soundness fixes, both to the PyCapsule type (see the CHANGELOG for more details) and to a number of FFI bindings which had fallen out of sync with newer Python and PyPy releases.
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:
@acshi @aganders3 @alex @birkenfeld @cjermain @Cryptex-github @cuishuang @davidhewitt @drewkett @dswij @herquan @hoodmane @ikrivosheev @indygreg @jeertmans @jinlow @jonaspleyer @kngwyu @mejrs @messense @n8henrie @PigeonF @PWhiddy @ravenexp @savente93 @yankun1992 @yodaldevoid
- Rust
Published by davidhewitt over 3 years ago
pyo3 - PyO3 0.16.6
This release is a tactical set of soundness fixes identified for the PyCapsule bindings released in PyO3 0.16. To avoid breaking API changes capsules created with PyCapsule::new and PyCapsule::new_with_destructor will now leak their contents (and not call the destructor) if released on a thread other than the one they were created.
PyO3 0.17 will be released shortly with breaking API changes which resolve the PyCapsule issues with better design (e.g. the destructor has a Send bound added). Users are encouraged to upgrade at their earliest convenience.
Thanks to @saethlin for reporting the issue, and to @adamreichold and @davidhewitt for implementing the resolution.
- Rust
Published by davidhewitt over 3 years ago
pyo3 - PyO3 0.16.5
This release contains an FFI definition correction to resolve crashes for PyOxidizer on Python 3.10, and a new generate-import-lib feature to allow easier cross-compiling to Windows.
Thank you to the following users for the improvements:
@cjermain @davidhewitt @indygreg @messense
- Rust
Published by davidhewitt almost 4 years ago
pyo3 - PyO3 0.16.4
This release fixes a regression introduced in 0.16.3 leading to build failures on Windows, enables crates depending on PyO3 to collect code coverage using LLVM instrumentation on stable Rust version 1.60 or later, and enables safe access to time zone information attached to Python's time and datetime objects. There are also some adjustments to PyO3's build-time interpreter detection to make it easier to cross-compile abi3 Python extensions.
Thank you to the following users for the improvements:
@adamreichold @davidhewitt @mejrs @messense @pickfire @ravenexp @RicoHageman
- Rust
Published by adamreichold almost 4 years ago
pyo3 - PyO3 0.15.2
This release is a backport of PyO3 0.16's support for PyPy 3.9.
Thanks to @mejrs and @messense for the implementation work, and to @alex for testing it to build the cryptography package.
- Rust
Published by davidhewitt almost 4 years ago
pyo3 - PyO3 0.16.3
This release contains a number of non-breaking additions and fixes since PyO3 0.16.2.
They are mostly centered on improving support for various build configurations. There are also usability tweaks to the #[pyclass] macro and a new intern! macro to create statically-backed PyString objects as an optimization technique.
Thank you to the following users for the improvements:
@adamreichold
@aganders3
@alex
@kmp1
@mejrs
@messense
@mityax
@momirza
@ravenexp
@zh-jq
- Rust
Published by davidhewitt almost 4 years ago
pyo3 - PyO3 0.16.2
This release contains support for the latest PyPy 7.3.8 release, a fix for a regression from PyO3 0.16.0 which would cause flaky build failures, and corrections to documentation.
Thank you for the following users for the improvements:
@adamreichold @alex @birkenfeld @davidhewitt @messense
- Rust
Published by davidhewitt almost 4 years ago
pyo3 - PyO3 0.16.1
This release contains a couple of fixes for regressions in PyO3 0.16.0, as well as documentation fixes. The hashbrown optional dependency range has been extended to include its new 0.12 version.
Thank you for the following users for the improvements:
@adamreichold @alex @birkenfeld @davidhewitt @JerzySpendel @mejrs @messense @PanQL
- Rust
Published by davidhewitt almost 4 years ago
pyo3 - PyO3 0.16.0
This release contains substantial changes and improvements over PyO3 0.15.1. To support these improvements, support has been dropped for the end-of-life Python 3.6 and Rust versions older than 1.48.
The pyo3::ffi submodule has been split out into a separate pyo3-ffi crate, so that users who want to use PyO3's Python bindings without any of the safe APIs or macros are able to do so.
#[pyclass] can now be used on simple "C-like" enums to create Python enums.
The #[pyproto] macro has been deprecated, and can be disabled by disabling the optional #[pyproto] feature. The "magic methods" such as __repr__ which previously were implemented by #[pyproto] gained support in #[pymethods] in 0.15, and now in PyO3 0.16 #[pymethods] is intended to be the only attribute macro needed to write class method implementations.
There are numerous other reworks, improvements, and bugfixes.
For full details of all changes, see the CHANGELOG.
Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following users' commits are included in this release:
@adamreichold @aganders3 @Amanieu @aviramha @birkenfeld @b05902132 @CarlKCarlK @cmpute @danielhenrymantilla @davidhewitt @DSPOM2 @ghuls @Gobot1234 @kevinheavey @konstin @mejrs @messense @milesgranger @mrl5 @parsons20 @RicoHageman @saidvandeklundert @Tom1380 @vxgmichel
- Rust
Published by davidhewitt almost 4 years ago
pyo3 - PyO3 0.15.1
This release is a set of bug fixes for some minor issues reported since PyO3 0.15's release. There are also some small additions for those storing PyIterator, PySequence, and PyMapping in Py smart pointers, and a PyTraceback type to ease interacting with Python tracebacks from Rust.
For full details of all changes, see the CHANGELOG.
Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following users' commits are included in this release:
@dansvo @davidhewitt @KRunchPL @mejrs @messense @moriyoshi @saidvandeklundert @taiki-e
- Rust
Published by davidhewitt over 4 years ago
pyo3 - PyO3 0.15.0
This release of PyO3 brings support for Python 3.10 and PyPy 3.8. In addition, new optional dependencies on anyhow and eyre have been added for easy integration of the popular error-handling libraries with Python code.
A number of consistency improvements have been made to PyList, PyTuple and PySequence APIs. They now all exclusively use usize- based indexing, and now also support Rust's indexing operator.
In this release #[pymethods] are now able to implement many magic methods such as __str__ and __repr__, removing the need for #[pyproto] macro implementations. For the 0.15 release series both #[pymethods] and #[pyproto] will be supported; #[pyproto] is expected to be deprecated in the future.
For full details of all changes, see the CHANGELOG. For help with upgrading, see the migration guide.
Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback.
- Rust
Published by davidhewitt over 4 years ago
pyo3 - PyO3 0.14.5
This release fixes a compile regression of PyO3 0.14.4 where not all APIs related to PyStringData were conditionally disabled correctly on big-endian platforms.
In addition, a few public APIs have been added to the pyo3_build_config crate to support needs of the PyOxidizer project.
Thanks to @decathorpe and @indygreg for further reports, discussions, and resolution.
- Rust
Published by davidhewitt over 4 years ago
pyo3 - PyO3 0.14.4
This release resolves issues with the PyString::data API added in 0.14.3. After release it was found to be unsound on certain platforms, so has been disabled on those platforms and marked unsafe with the safety expectation that users will ensure it works appropriately on their platform as part of usage.
Thanks to @decathorpe and @indygreg for the report, discussion, and resolution.
- Rust
Published by davidhewitt over 4 years ago
pyo3 - PyO3 0.14.3
This release is a small set of bugfixes added on top of the PyO3 0.14.2 release.
For full details of all changes, see the CHANGELOG.
Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following users' commits are included in this release:
@awestlake87 @davidhewitt @indygreg @mejrs @messense @mtreinish @pschafhalter @Ptrskay3 @sansyrox @tiran
- Rust
Published by davidhewitt over 4 years ago
pyo3 - PyO3 0.14.2
This release is a small quality-of-life update for the PyO3 0.14 release series. Optional support for the indexmap crate has been added. In addition, there have been a number of documentation improvements, and bugfixes for regressions and incorrect FFI definitions.
Users who removed macOS cargo configuration from their setup after updating to PyO3 0.14 will unfortunately have to once again add configuration to their compilation after updating to this release. This is because PyO3 was using functionality which Cargo had erroneously allowed.
The recommended way to restore configuration for macOS is to add a build script which invokes pyo3_build_config::add_extension_module_link_args(). The cargo configuration previously recommended is also still an option.
For full details of all changes, see the CHANGELOG.
Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following users' commits are included in this release:
@alex
@awestlake87
@batconjurer
@birkenfeld
@davidhewitt
@deantvv
@Eric-Arellano
@indygreg
@IvanIsCoding
@mejrs
@messense
@nihaals
@tommilligan
- Rust
Published by davidhewitt over 4 years ago
pyo3 - PyO3 0.14.1
This release addresses some incorrect FFI definitions in PyO3 0.14.0 which caused crashes when targeting PyPy. In addition, IntoPy<PyObject> has been implemented for &PathBuf and &OsString for additional convenience when working with the new conversions.
Thank you to @alex and @jameshilliard for the quick reports, and @birkenfeld and @messense for the quick fixes!
- Rust
Published by davidhewitt over 4 years ago
pyo3 - PyO3 0.14.0
This release contains a significant number of improvements and optimizations since the 0.13 releases. Conversion support for more Rust standard library types has been added: [T; N], Path, PathBuf, OsStr, and OsString. In addition, the #[pyo3(...)] attribute options already used in #[pyclass] and #[derive(FromPyObject)] have been expanded to all macros to cover more options such as #[pyo3(name = "...")].
This release also includes some notable performance optimizations to PyO3's Python function generation, and users should observe reductions in overhead when calling PyO3-wrapped functions from Python. The documentation has also benefited from extensive work from several contributors.
Finally, there are a number of breaking changes to this release:
- To reduce the default dependency set, a new feature
multiple-pymethodshas been added. If this feature is not enabled, each#[pyclass]may only have a single#[pymethods]block. If this feature is enabled then the previous behavior (and dependency oninventory) is restored. - The
pyo3::ffimodule has received many updates to keep in sync with CPython's definitions. - A number of APIs and particular usages of PyO3 macros have been marked deprecated where better alternatives now exist.
- A number of previously-deprecated APIs have been removed.
For full details of all changes, see the CHANGELOG. For help with upgrading, see the migration guide.
Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following users' commits are included in this release:
@alex @alonblade @aviramha @birkenfeld @c410-f3r @Daggy1234 @daniil-konovalenko @davidhewitt @erikjohnston @GabrielMajeri @gilescope @indygreg @isosphere @jameshilliard @kangalioo @kngwyu @konstin @m-ou-se @mejrs @messense @nw0 @ohadravid @ravenexp @scalexm @simonrainerson @TheGhostHuCodes @winxton @1tgr
- Rust
Published by davidhewitt over 4 years ago
pyo3 - PyO3 0.13.2
This release contains small improvements over PyO3 0.13.1. The minimum supported Rust version has been lowered to Rust 1.41. A serde feature has been added which provides implementations of Serialize and Deserialize for types inside the Py<T> smart pointer.
Of note is that this release disables automatic finalization of the Python interpreter at program exit for Rust binaries embedding the Python interpreter. This was found to cause a number of issues with C extensions such as Tensorflow and Scipy which were sensitive to the deinitialization order. For the vast majority of users this should cause no impact or fix a number of problem cases. For the minority who did depend on finalization, the unsafe method with_embedded_python_interpreter has been added to manually control the interpreter lifecycle.
For full details of all changes, see the CHANGELOG.
Thank you to everyone who contributed code, documentation fixes, design ideas, bug reports, and feedback. The following users' commits are included in this release:
@alex @awestlake87 @birkenfeld @cfbolz @daniil-konovalenko @davidhewitt @decathorpe @ijl @kangalioo @kngwyu @lazka @nw0 @tdamsma
- Rust
Published by davidhewitt about 5 years ago
pyo3 - PyO3 0.13.1
This release is a set of quality-of-life improvements and bugfixes for PyO3 0.13.0. All new functionality adds flexibility to pyo3 in rarer cases, such as fixing #[pyclass(dict)] support for the abi3 feature (on compatible Python versions). In addition, a long-overdue initiative to reconcile PyO3's ffi definitions with the current state of the upstream Python API has started. This resulted in a number of new deprecations where mismatches were found.
For full details of all changes, see the CHANGELOG.
Thank you to everyone who contributed code, documentation fixes, design ideas, bug reports, and feedback. The following users' commits are included in this release:
@cecini @dalcde @daniil-konovalenko @davidhewitt @kngwyu @konstin @nw0 @OrangeTux
- Rust
Published by davidhewitt about 5 years ago
pyo3 - PyO3 0.13.0
The major feature for this PyO3 release is support for the CPython limited API. This is an opt-in feature when building extension modules which makes it possible for the built wheel to be installable on multiple Python versions.
As well as this, a number of other refinements, fixes, and performance improvements have been merged into this release. In particular, note that the internal "macros" crates have been renamed to pyo3-macros and pyo3-macros-backend for clarity and consistency (previously pyo3cls and pyo3-derive-backend).
For full details of all changes, see the CHANGELOG.
Thank you to everyone who contributed code, documentation fixes, design ideas, bug reports, and feedback. The following users' commits are included in this release:
@AleksaC @alex @Askaholic @aviramha @birkenfeld @Daggy1234 @davidhewitt @dvermd @kngwyu @konstin @Palladinium @roblabla @scalexm @Stranger6667
- Rust
Published by davidhewitt about 5 years ago
pyo3 - PyO3 0.12.4
This release fixes a reference count issue discovered in PyO3 0.12.3, present in the implementation of From<Py<T>> for PyObject. Usage of this implementation would lead to an incorrect Python reference count decrease, likely leading to use-after-free.
This regression was only present in the PyO3 0.12 series. The offending implementation was used only in one location inside the PyO3 codebase itself, though of course is likely used in downstream code. As a result, previous PyO3 versions in the 0.12 series will be yanked.
Sincerest apologies for the inconvenience.
Fixed
- Fix reference count bug in implementation of
From<Py<T>>forPyObject, a regression introduced in PyO3 0.12. #1297
- Rust
Published by davidhewitt about 5 years ago
pyo3 - PyO3 0.12.3
This release fixes support for Rust versions 1.39 through Rust 1.44, which was erroneously broken in PyO3 0.12.2. Thanks to @mtreinish for the quick bug report!
- Rust
Published by davidhewitt over 5 years ago
pyo3 - PyO3 0.12.2
This release adds the ability to specify keyword-only arguments in #[pyfunction] definitions, a new function Python::check_signals, and a couple of smaller refinements improving upon PyO3 0.12.1.
Thank you to everyone who contributed code, documentation fixes, design ideas, bug reports, and feedback. The following users' commits are included in this release:
@birkenfeld
@davidhewitt
@dvermd
@kngwyu
@sebpuetz
- Rust
Published by davidhewitt over 5 years ago
pyo3 - PyO3 0.12.1
This release contains a couple of bugfixes to resolve complation issues with 0.12.0 on specific targets. Thank you to @alex and @mtreinish for the bug reports and subsequent patches.
Fixed
- Fix building for a 32-bit Python on 64-bit Windows with a 64-bit Rust toolchain. #1179
- Fix building on platforms where
c_charisu8. #1182
- Rust
Published by davidhewitt over 5 years ago
pyo3 - PyO3 0.12.0
This release includes a few careful revisions to the PyO3 API with the intention to make it easier to learn and use. The PyErr type is reworked to implement std::error::Error. The FromPy trait is removed. Finally, the PyObject struct is now just a type alias to Py<PyAny>. While we do not take pleasure in making breaking changes for users' code, we have done so with careful thought to make migration as simple as possible while also allowing the PyO3 API to mature. Please see the migration guide for help upgrading if any of these changes affect you.
Also added is a new #[derive(FromPyObject)] macro, which enables a convenient way to accept arguments of the Python "type" Union. (See the guide entry on this new feature.)
There have been many other improvements and bugfixes too numerous to go into detail here. For the full list, see the CHANGELOG.
Thank you to everyone who contributed code, documentation fixes, design ideas, bug reports, and feedback on the way to PyO3 0.12. The full list of users who commited at least one contribution to PyO3 0.12 is below:
@alex @birkenfeld @cathay4t @davidhewitt @Hakuyume @Hywan @kngwyu @konstin @marioortizmanero @MoritzLangenstein @mtreinish @mvaled @nagisa @noam93k @Progdrasil @programmerjake @rob-thatcher @sebpuetz @vorner @vthriller
- Rust
Published by davidhewitt over 5 years ago
pyo3 - PyO3 0.11.1
#[pyclass(unsendable)] is added, please check the guide!
[0.11.1] - 2020-06-30
Added
#[pyclass(unsendable)]. #1009
Changed
- Update
parking_lotdependency to0.11. #1010
- Rust
Published by kngwyu over 5 years ago
pyo3 - PyO3 0.11.0
This is our first version that supports the stable Rust toolchain. The minimum required version is 1.39.0. Thank you @davidhewitt @scalexm @tamuhey @konstin @Nateckert @Alexander-N @m-ou-se and all issue reporters :slightlysmilingface:
Maybe the most influential change is now #[pyclass] requires Send. Please see the migration guide for more.
Added
- Support stable versions of Rust (>=1.39). #969
- Add FFI definition
PyObject_AsFileDescriptor. #938 - Add
PyByteArray::data,PyByteArray::as_bytes, andPyByteArray::as_bytes_mut. #967 - Add
GILOnceCellto use in situations wherelazy_staticoronce_cellcan deadlock. #975 - Add
Py::borrow,Py::borrow_mut,Py::try_borrow, andPy::try_borrow_mutfor accessing#[pyclass]values. #976 - Add
IterNextOutputandIterANextOutputfor returning from__next__/__anext__. #997
Changed
- Simplify internals of
#[pyo3(get)]attribute. (Remove the hidden APIGetPropertyValue.) #934 - Call
Py_Finalizeat exit to flush buffers, etc. #943 - Add type parameter to PyBuffer. #951
- Require
Sendbound for#[pyclass]. #966 - Add
Pythonargument to most methods onPyObjectandPy<T>to ensure GIL safety. #970 - Change signature of
PyTypeObject::type_object()- now takesPythonargument and returns&PyType. #970 - Change return type of
PyTuple::slice()andPyTuple::split_from()fromPy<PyTuple>to&PyTuple. #970 - Change return type of
PyTuple::as_sliceto&[&PyAny]. #971 - Rename
PyTypeInfo::type_objecttotype_object_raw, and addPythonargument. #975 - Update
num-complexoptional dependendency from0.2to0.3. #977 - Update
num-bigintoptional dependendency from0.2to0.3. #978 #[pyproto]is re-implemented without specialization. #961PyClassAlloc::allocis renamed toPyClassAlloc::new. #990#[pyproto]methods can now have return valueTorPyResult<T>(previously onlyPyResult<T>was supported). #996#[pyproto]methods can now skip annotating the return type if it is(). #998
Removed
- Remove
ManagedPyRef(unused, and needs specialization) #930
Fixed
- Fix passing explicit
NonetoOption<T>argument#[pyfunction]with a default value. #936 - Fix
PyClass.__new__'s not respecting subclasses when inherited by a Python class. #990 - Fix returning
Option<T>from#[pyproto]methods. #996 - Fix accepting
PyRef<Self>andPyRefMut<Self>to#[getter]and#[setter]methods. #999
- Rust
Published by kngwyu over 5 years ago
pyo3 - PyO3 0.10.1
0.10.0 has a deadlock bug and was yanked. Thank you @davidhewitt for fixing it!
Fixed
- Fix deadlock in
Python::acquire_gil()after dropping aPyObjectorPy<T>. #924
- Rust
Published by kngwyu almost 6 years ago
pyo3 - PyO3 0.10.0
Many changes but not so many API changes. See CHANGELOG and migraton guide for more.
Thank you @davidhewitt @m-ou-se @scalexm @Alexander-N @abingham @althonos @konstin @ijl @ArniDagur @oconnor663 and all issue reporters!
Added
- Add FFI definition
_PyDict_NewPresized. #849 - Implement
IntoPy<PyObject>forHashSetandBTreeSet. #864 - Add
PyAny::dirmethod. #886 - Gate macros behind a
macrosfeature (enabled by default). #897 - Add ability to define class attributes using
#[classattr]on functions in#[pymethods]. #905 - Implement
CloneforPyObjectandPy<T>. #908 - Implement
Deref<Target = PyAny>for all builtin types. (PyList,PyTuple,PyDictetc.) #911 - Implement
Deref<Target = PyAny>forPyCell<T>. #911 - Add
#[classattr]support for associated constants in#[pymethods]. #914
Changed
- Panics will now be raised as a Python
PanicException. #797 - Change
PyObjectandPy<T>reference counts to decrement immediately upon drop when the GIL is held. #851 - Allow
PyIterProtocolmethods to use eitherPyReforPyRefMutas the receiver type. #856 - Change the implementation of
FromPyObjectforPy<T>to apply to a wider range ofT, including allT: PyClass. #880 - Move all methods from the
ObjectProtocoltrait to thePyAnystruct. #911 - Remove need for
#![feature(specialization)]in crates depending on PyO3. #917
Removed
- Remove
PyMethodsProtocoltrait. #889 - Remove
num-traitsdependency. #895 - Remove
ObjectProtocoltrait. #911 - Remove
PyAny::None. Users should usePython::Noneinstead. #911 - Remove all
*ProtocolImpltraits. #917
Fixed
- Fix support for
__radd__and other__r*__methods as implementations for Python mathematical operators. #839 - Fix panics during garbage collection when traversing objects that were already mutably borrowed. #855
- Prevent
&'staticreferences to Python objects as arguments to#[pyfunction]and#[pymethods]. #869 - Fix lifetime safety bug with
AsPyRef::as_ref. #876 - Fix
#[pyo3(get)]attribute onPy<T>fields. #880 - Fix segmentation faults caused by functions such as
PyList::get_itemreturning borrowed objects when it was not safe to do so. #890 - Fix segmentation faults caused by nested
Python::acquire_gilcalls creating dangling references. #893 - Fix segmentatation faults when a panic occurs during a call to
Python::allow_threads. #912
- Rust
Published by kngwyu almost 6 years ago
pyo3 - PyO3 0.9.2
Added
FromPyObjectimplementations forHashSetandBTreeSet. #842
Fixed
- Correctly detect 32bit architecture. #830
- Rust
Published by kngwyu almost 6 years ago
pyo3 - PyO3 0.9.0
This is a big release and there are some breaking changes. Please check the migration guide.
Thank you @ijl @birkenfeld @Alexander-N @davidhewitt @konstin @c410-f3r @oconnor663 @andrewwhitehead @synapticarbors @bmatthieu3 @Hywan @paddywwoof @gilescope for contributing! And thank you all bug reporters and reviewers, though it's difficult to list them here.
Changed
#[new]does not takePyRawObjectand can returnSelf. #683- The blanket implementations for
FromPyObjectfor&Tand&mut Tare no longer specializable. ImplementPyTryFromfor your type to control the behavior ofFromPyObject::extract()for your types. #713 - The implementation for
IntoPy<U> for TwhereU: FromPy<T>is no longer specializable. Control the behavior of this via the implementation ofFromPy. #713 - Use
parking_lot::Mutexinstead ofspin::Mutex. #734 - Bumped minimum Rust version to
1.42.0-nightly 2020-01-21. #761 PyRefandPyRefMutare renewed forPyCell. #770- Some new FFI functions for Python 3.8. #784
PyAnyis now on the top level module and prelude. #816
Added
PyCell, which has RefCell-like features. #770PyClass,PyLayout,PyClassInitializer. #683- Implemented
IntoIteratorforPySetandPyFrozenSet. #716 FromPyObjectis now automatically implemented forT: Clonepyclasses. #730#[pyo3(get)]and#[pyo3(set)]will now use the Rust doc-comment from the field for the Python property. #755#[setter]functions may now take an argument ofPyo3::Python. #760PyTypeInfo::BaseLayoutandPyClass::BaseNativeType. #770PyDowncastImpl. #770- Implement
FromPyObjectandIntoPy<PyObject>traits for arrays (up to 32). #778 migration.mdandtypes.mdin the guide. #795, #802ffi::{_PyBytes_Resize, _PyDict_Next, _PyDict_Contains, _PyDict_GetDictPtr}. #820
Fixed
- Fixed unsoundness of subclassing. #683.
- Clear error indicator when the exception is handled on the Rust side. #719
- Usage of raw identifiers with
#[pyo3(set)]. #745 - Usage of
PyObjectwith#[pyo3(get)]. #760 #[pymethods]used in conjunction with#[cfg]. #769"*"in a#[pyfunction()]argument list incorrectly accepting any number of positional arguments (useargs = "*"when this behaviour is desired). #792PyModule::dict. #809- Fix the case where
DESCRIPTIONis not null-terminated. #822
Removed
PyRawObject. #683PyNoArgsFunction. #741initialize_type(). To set the module name for a#[pyclass], use themoduleargument to the macro. #751AsPyRef::as_mut/with/with_mut/into_py/into_mut_py. #770PyTryFrom::try_from_mut/try_from_mut_exact/try_from_mut_unchecked. #770Python::mut_from_owned_ptr/mut_from_borrowed_ptr. #770ObjectProtocol::get_base/get_mut_base. #770
- Rust
Published by kngwyu almost 6 years ago
pyo3 - PyO3 0.9.0 alpha.1
PyO3 0.9.0 Alpha.1
There are some breaking changes...
But I believe in most cases, you just change this
rust
impl MyClass {
#[new]
fn new(init: &PyRawObject) {
init.init(MyClass {});
}
}
to
rust
impl MyClass {
#[new]
fn new() -> Self {
MyClass {}
}
}
and everything works fine.
Please read the guide for detail.
CHANGELOG
Changed
- The blanket implementations for
FromPyObjectfor&Tand&mut Tare no longer specializable. ImplementPyTryFromfor your type to control the behavior ofFromPyObject::extract()for your types. - The implementation for
IntoPy<U> for TwhereU: FromPy<T>is no longer specializable. Control the behavior of this via the implementation ofFromPy. #[new]does not takePyRawObjectand can reutrnSelf#683- Use
parking_lot::Mutexinstead ofspin::Mutex#734
Added
- Implemented
IntoIteratorforPySetandPyFrozenSet. #716 PyClass,PyClassShell,PyObjectLayout,PyClassInitializer#683
Fixed
- Clear error indicator when the exception is handled on the Rust side. #719
- Fixed unsoundness of subclassing. #683.
Removed
PyRef,PyRefMut,PyRawObject#683
- Rust
Published by kngwyu about 6 years ago
pyo3 - PyO3 0.8.5
Added
- Support for #[name = "foo"] attribute for #[pyfunction] and in #[pymethods]. #692
- Implemented FromPyObject for HashMap and BTreeMap
- Rust
Published by kngwyu about 6 years ago
pyo3 - PyO3 0.8.4
Added
- Support for
#[text_signature]attribute. #675
- Rust
Published by kngwyu about 6 years ago
pyo3 - PyO3 0.8.3
[0.8.3]
Fixed
- Now all
&Py~types have!Sendbound. #655 - Fix a compile error raised by the stabilization of
!type. #672.
Removed
#[init]is removed. #658
- Rust
Published by kngwyu about 6 years ago
pyo3 - PyO3 0.8.2
Added
- FFI compatibility for PEP 590 Vectorcall. #641
Fixed
- Fix PySequenceProtocol::set_item. #624
- Fix a corner case of BigInt::FromPyObject. #630
- Fix index errors in parameter conversion. #631
- Fix handling of invalid utf-8 sequences in
PyString::as_bytes. #639 andPyString::to_string_lossy#642. - Remove
__contains__and__iter__from PyMappingProtocol. #644 - Fix proc-macro definition of PySetAttrProtocol. #645
- Rust
Published by kngwyu over 6 years ago
pyo3 - PyO3 0.8.1
NOTE Please take care that PyO3 <= 0.8.0 doesn't support the latest nightly (See #614 for detail).
Added
- Conversion between num-bigint and Python int. #608
Fixed
- Make sure the right Python interpreter is used in OSX builds. #604
- Patch specialization being broken by Rust 1.40. #614
- Fix a segfault around PyErr. #597
- Rust
Published by kngwyu over 6 years ago
pyo3 - PyO3 0.8.0
Added
moduleargument topyclassmacro. #499py_run!macro #512- Use existing fields and methods before calling custom getattr. #505
PyBytescan now be indexed just likeVec<u8>- Implement
IntoPy<PyObject>forPyRefandPyRefMut.
Removed
IntoPyObjectwas replaced withIntoPy<PyObject>#[pyclass(subclass)]is hidden aunsound-subclassfeature because it's causing segmentation faults.
Fixed
- More readable error message for generics in pyclass #503
Changed
- Implementing the Using the
gcparameter forpyclass(e.g.#[pyclass(gc)]) without implementing theclass::PyGCProtocoltrait is now a compile-time error. Failing to implement this trait could lead to segfaults. #532 PyByteArray::datahas been replaced withPyDataArray::to_vecbecause returning a&[u8]is unsound. (See this comment for a great write-up for why that was unsound)- Replace
mashupwithpaste. GILPoolgained aPythonmarker to prevent it from being misused to release Python objects without the GIL held.
- Rust
Published by konstin over 6 years ago
pyo3 - PyO3 0.7.0
Added
- PyPy support by omerbenamram in #393
- Have
PyModulegenerate an index of its members (__all__list). - Allow
slf: PyRef<T>for pyclass(#419) - Allow to use lifetime specifiers in
pymethods - Add
marshalmodule. #460
Changed
Python::runreturnsPyResult<()>instead ofPyResult<&PyAny>.- Methods decorated with
#[getter]and#[setter]can now omit wrapping the result type inPyResultif they don't raise exceptions.
Fixed
type_object::PyTypeObjecthas been marked unsafe because breaking the contracttype_object::PyTypeObject::init_typecan lead to UB.- Fixed automatic derive of
PySequenceProtocolimplementation in #423. - Capitalization & better wording to README.md.
- Docstrings of properties is now properly set using the doc of the
#[getter]method. - Fixed issues with
pymethodscrashing on doc comments containing double quotes. PySet::newandPyFrozenSet::newnow returnPyResult<&Py[Frozen]Set>; exceptions are raised if the items are not hashable.- Fixed building using
venvon Windows. PyTuple::newnow returns&PyTupleinstead ofPy<PyTuple>.
- Rust
Published by kngwyu over 6 years ago
pyo3 - PyO3 v0.6.0
Regressions
- Currently, #341 causes
cargo testto fail with weird linking errors when theextension-modulefeature is activated. For now you can work around this by making theextension-modulefeature optional and running the tests withcargo test --no-default-features:
```toml [dependencies.pyo3] version = "0.6.0"
[features] extension-module = ["pyo3/extension-module"] default = ["extension-module"] ```
Added
- Added a
wrap_pymodule!macro similar to the existingwrap_pyfunction!macro. Only available on python 3 - Added support for cross compiling (e.g. to arm v7) by mtp401 in #327. See the "Cross Compiling" section in the "Building and Distribution" chapter of the guide for more details.
- The
PyRefandPyRefMuttypes, which allow to differentiate between an instance of a rust struct on the rust heap and an instance that is embedded inside a python object. By kngwyu in #335 - Added
FromPy<T>andIntoPy<T>which are equivalent toFrom<T>andInto<T>except that they require a gil token. - Added
ManagedPyRef, which should eventually replaceToBorrowedObject.
Changed
- Renamed
PyObjectReftoPyAnyin #388 - Renamed
add_functiontoadd_wrappedas it now also supports modules. - Renamed
#[pymodinit]to#[pymodule] py.init(|| value)becomesPy::new(value)py.init_ref(|| value)becomesPyRef::new(value)py.init_mut(|| value)becomesPyRefMut::new(value).PyRawObject::initis now infallible, e.g. it returns()instead ofPyResult<()>.- Renamed
py_exception!tocreate_exception!and refactored the error macros. - Renamed
wrap_function!towrap_pyfunction! - Renamed
#[prop(get, set)]to#[pyo3(get, set)] #[pyfunction]now supports the same arguments as#[pyfn()]- Some macros now emit proper spanned errors instead of panics.
- Migrated to the 2018 edition
crate::types::exceptionsmoved tocrate::exceptions- Replace
IntoPyTuplewithIntoPy<Py<PyTuple>>. IntoPyPointerandToPyPointermoved into the crate root.class::CompareOpmoved intoclass::basic::CompareOp- PyTypeObject is now a direct subtrait PyTypeCreate, removing the old cyclical implementation in #350
- Add
PyList::{sort, reverse}by chr1sj0nes in #357 and #358 - Renamed the
typeobmodule totype_object
Removed
PyTokenwas removed due to unsoundness (See #94).- Removed the unnecessary type parameter from
PyObjectAlloc NoArgs. Just use an empty tuplePyObjectWithGIL.PyNativeTypeis sufficient now that PyToken is removed.
Fixed
- A soudness hole where every instances of a
#[pyclass]struct was considered to be part of a python object, even though you can create instances that are not part of the python heap. This was fixed throughPyRefandPyRefMut. - Fix kwargs support in #328.
- Add full support for
__dict__in #403.
- Rust
Published by konstin almost 7 years ago
pyo3 - PyO3 v0.5.3
Fixed
- Fix memory leak in ArrayList by kngwyu #316
- Rust
Published by konstin about 7 years ago
pyo3 - PyO3 v0.5.2
Fixed
- Fix undeterministic segfaults when creating many objects by kngwyu in #281
- Rust
Published by konstin about 7 years ago
pyo3 - PyO3 v0.5.0
Added
#[pyclass]objects can now be returned from rust functionsPyComplexby kngwyu in #226PyDict::from_sequence(), equivalent todict([(key, val), ...])- Bindings for the
datetimestandard library types:PyDate,PyTime,PyDateTime,PyTzInfo,PyDeltawith associatedffitypes, by pganssle #200. PyString,PyUnicode, andPyBytesnow have anas_bytes()method that returns&[u8].PyObjectProtocol::get_type_ptr()by ijl in #242
Removed
- Removed most entries from the prelude. The new prelude is small and clear.
- Slowly removing specialization uses
PyString,PyUnicode, andPyBytesno longer have adata()method (replaced byas_bytes()) andPyStringDatahas been removed.
Changed
- Removes the types from the root module and the prelude. They now live in
pyo3::typesinstead. - All exceptions are consturcted with
py_errinstead ofnew, as they returnPyErrand notSelf. as_mutand friends take and&mut selfinstead of&selfObjectProtocol::callnow takes anOption<&PyDict>for the kwargs instead of anIntoPyDictPointer.IntoPyDictPointerwas replace byIntoPyDictwhich doesn't convertPyDictitself anymore and returns aPyDictinstead of*mut PyObject.PyTuple::newnow takes anIntoIteratorinstead of a slice- Updated to syn 0.15
- Splitted
PyTypeObjectintoPyTypeObjectwithout the create method andPyTypeCreatewith requiresPyObjectAlloc<Self> + PyTypeInfo + Sized. - Ran
cargo edition --fixwhich prefixed path withcrate::for rust 2018 - Renamed
asynctopyasyncas async will be a keyword in the 2018 edition. - Starting to use
NonNull<*mut PyObject>for Py and PyObject by ijl #260
Fixed
- Added an explanation that the GIL can temporarily be released even while holding a GILGuard.
- Lots of clippy errors
- Fix segfault on calling an unknown method on a PyObject
- Work around a bug in the rust compiler by kngwyu #252
- Fixed a segfault with subclassing pyo3 create classes and using
__class__by kngwyu #263
Removed
- The pyobject_extract macro
- Rust
Published by konstin over 7 years ago
pyo3 - PyO3 v0.4.1
Fixed
- Fixed compilation on nightly since
use_extern_macroswas stabilized
Changed
- PyTryFrom's error is always to
PyDowncastError
Removed
- The pyobject_downcast macro
- Rust
Published by konstin over 7 years ago
pyo3 - PyO3 0.4.0
Removed
- Conversions from tuples to PyDict due to rust-lang/rust#52050
Changed
- Merged both examples into one
- Rustfmt all the things :heavycheckmark:
- Switched to Keep a Changelog
- Rust
Published by konstin over 7 years ago
pyo3 - PyO3 0.3.2
Changes
- Replaced
concat_identswith mashup
- Rust
Published by konstin over 7 years ago
pyo3 - PyO3 0.3.1
Changes
- Fixed scoping bug in pyobjectnativetype that would break rust-numpy
- Rust
Published by konstin over 7 years ago
pyo3 - PyO3 0.3.0
Changes
- Upgraded to syn 0.14 which means much better error messages :tada:
- 128 bit integer support by kngwyu (#137)
proc_macrohas been stabilized on nightly (rust-lang/rust#52081). This means that we can remove theproc_macrofeature, but now we need theuse_extern_macrosfrom the 2018 edition instead.- All proc macro are now prefixed with
pyand live in the prelude. This means you can use#[pyclass],#[pymethods],#[pyproto],#[pyfunction]and#[pymodinit]directly, at least after ause pyo3::prelude::*. They were also moved into a module calledproc_macro. You shouldn't use#[pyo3::proc_macro::pyclass]or other longer paths in attributes becauseproc_macro_path_invocisn't going to be stabilized soon. - Renamed the
baseoption in thepyclassmacro toextends. #[pymodinit]uses the function name as module name, unless the name is overrriden with#[pymodinit(name)]- The guide is now properly versioned.
- A few internal macros became part of the public api (#155, #186)
- Always clone in getters. This allows using the get-annotation on all Clone-Types
- Rust
Published by konstin over 7 years ago
pyo3 - PyO3 0.2.7
0.2.7 backports the compilation fix with current nightlies, so pyo3 stays usable until 0.3 is released.
- Rust
Published by konstin almost 8 years ago
pyo3 - PyO3 0.2.6
Changes
- Fix compatibility with TryFrom trait
- Rust
Published by fafhrd91 almost 8 years ago
pyo3 - PyO3 0.2.5
Changes
CPython 3.7 support
Embedded CPython 3.7b1 crashes on initialization #110
Generated extension functions are weakly typed #108
call_method*() crashes when the method does not exist #113
Allow importing exceptions from nested modules #116
- Rust
Published by fafhrd91 about 8 years ago
pyo3 - PyO3 0.2.4
Changes
Allow to get mutable ref from PyObject #106
Drop
RefFromPyObjecttraitAdd Python::register_any() method
Fix impl
FromPyObjectforPy<T>Mark method that work with raw pointers as unsafe #95
- Rust
Published by fafhrd91 about 8 years ago
pyo3 - PyO3 0.2.3
Changes
Proper
c_charusage #93Remove use of now unneeded 'AsciiExt' trait
Rustup to 1.23.0-nightly 2017-11-07
- Rust
Published by fafhrd91 about 8 years ago
pyo3 - PyO3 0.2.2
Changes
- Rustup to 1.22.0-nightly 2017-09-30
- Rust
Published by messense over 8 years ago
pyo3 - PyO3 0.2.1
Changes
- Fix rustc
const_fnnightly breakage
- Rust
Published by messense over 8 years ago
pyo3 - PyO3 0.2.0
Changes
Added inheritance support #15
Added weakref support #56
Allow to add gc support without implementing PyGCProtocol #57
Refactor
PyErrimplementation. Droppyparameter from constructor.Added subclass support #64
Added
self.__dict__supoort #68Added
pyo3::preludemodule #70Better
Iteratorsupport for PyTuple, PyList, PyDict #75Introduce IntoPyDictPointer similar to IntoPyTuple #69
- Rust
Published by fafhrd91 over 8 years ago
pyo3 - PyO3 0.1.0
Initial release
- Python2/Python3 compatible
- Python objects API
- Custom python class support
- Python class customization (Mapping, Sequence, Number, etc)
- Extension module support
- Rust
Published by fafhrd91 over 8 years ago