- the minimum supported Rust version is now 1.41.1
- on Python 3, strings now directly use the UTF-8 representation stored inside the Python string
- visibility keywords are now permitted on classes and functions (PR by @tdyas)
- the
PyNone
type can be used as a marker representing None in Python (PR by @markbt)
- add a way to disable converting
PyString
to unicode on Python 2 (PR by @quark-zju) - initial serde support (PR by @quark-zju)
- avoid abort if the Python function never returns due to thread exit (PR by @quark-zju)
- Added Python 3.9 support.
- ignore trailing comma in plist parsing (PR by @lausek)
- make fields of initialization config public and implement Default (PR by @indygreg)
- fix macros without $crate:: access (PR by @markbt)
- properties (attributes with getter/setters defined in Rust (PR by @markbt)
- adoption of 2018 edition and general code modernization (PR by @markbt)
- reference extraction for slot functions and optional reference extraction (PR by @markbt)
- PEP-587 initialization APIs (python3-sys for Python≥3.8) (PR by @indygreg)
- more import APIs (python3-sys) (PR by @indygreg)
- link-time inconsistency with build config (original PR by @svevang adapted as 202)
- missing
pub
classifier inPySharedRef
example. (PR by @Alphare) - README updates: copyright years, version number in examples
- The 0.4.x series is planned to be the last that will support Rust 2015.
- Added Python 3.8 support.
- Type errors during downcasts now explain what the expected and actual types are. (PR by @markbt)
- Data items can now be shared between Python objects (e.g. for iterators) using
PySharedRef
. (PR by @yuja) PyList
can now be appended to withappend
. The method for inserting items is renamed toinsert
for consistency. (PR by @binh-vu)
- Minumum Rust compiler version is now 1.30.
- Added Capsule support (PR by @gracinet)
- Added Rust Docstring support for instance methods, static methods and class methods (PRs by @quark-zju and @AdamRzepka)
- Made macros work with Rust 2018 (PR by @derekdreery)
- Support Rust raw identifiers for method and keyword names (PR by @quark-zju)
- Added
impl RefFromPyObject for [u8]
. This allows using&[u8]
as parameter type inpy_fn!
. When passing abytes
object from Python, this allows accessing the data without a copy. (other mutable Python objects will use a defensive copy)
- Added Python 3.7 support
-
Added
pub
modifier topy_class!
syntax:py_class!(pub class ClassName |py| ...)
-
Changed
obj.extract::<Vec<T>>(py)
to work with any object implementing the sequence protocol; not just lists. -
Added the
buffer
module, which allows safe access to the buffer protocol. This allows zero-copy access to numpy arrays. -
When building with
--feature nightly
,extract::<Vec<PrimitiveType>>
will try to use the buffer protocol before falling back to the sequence protocol. -
Added support for optional parameters to
py_argparse!
,py_fn!
andpy_class!
macros. (PR by @Luthaf)Example:
py_fn!(py, function(i: i32 = 0))
-
Made
ObjectProtocol::compare()
available on Python 3. -
Added
ObjectProtocol::rich_compare()
. -
Fixed non-deterministic segfault in extension modules using
py_class!
(PR by @markbt) -
Fixed python27-sys compiler error on ARM (PR by @ostrosco)
-
Export path to Python interpreter as Cargo variable (PR by @indygreg)
- First release that works on stable Rust.