Skip to content

PyO3 0.9.0 alpha.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@kngwyu kngwyu released this 18 Jan 06:12
d2174c2

PyO3 0.9.0 Alpha.1

There are some breaking changes...
But I believe in most cases, you just change this

impl MyClass {
    #[new] 
    fn new(init: &PyRawObject) { 
        init.init(MyClass {});
    }
}

to

impl MyClass {
    #[new]
    fn new() -> Self { 
        MyClass {}
    }
}

and everything works fine.

Please read the guide for detail.

CHANGELOG

Changed

  • The blanket implementations for FromPyObject for &T and &mut T are no longer specializable. Implement PyTryFrom for your type to control the behavior of FromPyObject::extract() for your types.
  • The implementation for IntoPy<U> for T where U: FromPy<T> is no longer specializable. Control the behavior of this via the implementation of FromPy.
  • #[new] does not take PyRawObject and can reutrn Self #683
  • Use parking_lot::Mutex instead of spin::Mutex #734

Added

  • Implemented IntoIterator for PySet and PyFrozenSet. #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