rust-cpython v0.2.0 Release Notes
Release Date: 2018-02-27 // about 6 years ago-
- 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)
- Added