diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c0ab0e4..c57f0906 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,11 +25,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. * Removes the types from the root module and the prelude. They now live in `pyo3::types` instead. * All exceptions are consturcted with `py_err` instead of `new`, as they return `PyErr` and not `Self`. * `as_mut` and friends take and `&mut self` instead of `&self` - * `ObjectProtocol::call` now takes an `Option` for the kwargs instead of an `IntoPyDictPointer`. + * `ObjectProtocol::call` now takes an `Option<&PyDict>` for the kwargs instead of an `IntoPyDictPointer`. * `IntoPyDictPointer` was replace by `IntoPyDict` which doesn't convert `PyDict` itself anymore and returns a `PyDict` instead of `*mut PyObject`. * `PyTuple::new` now takes an `IntoIterator` instead of a slice * Updated to syn 0.15 * Splitted `PyTypeObject` into `PyTypeObject` without the create method and `PyTypeCreate` with requires `PyObjectAlloc + PyTypeInfo + Sized`. + * Ran `cargo edition --fix` which prefixed path with `crate::` for rust 2018 + * Renamed `async` to `pyasync` as async will be a keyword in the 2018 edition. ### Fixed diff --git a/Cargo.toml b/Cargo.toml index a4829197..4e7d6bf6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3" -version = "0.5.0-alpha.2" +version = "0.5.0-alpha.3" description = "Bindings to Python interpreter" authors = ["PyO3 Project and Contributors "] readme = "README.md" @@ -23,7 +23,7 @@ codecov = { repository = "PyO3/pyo3", branch = "master", service = "github" } libc = "0.2.43" spin = "0.4.9" num-traits = "0.2.6" -pyo3cls = { path = "pyo3cls", version = "=0.5.0-alpha.2" } +pyo3cls = { path = "pyo3cls", version = "=0.5.0-alpha.3" } mashup = "0.1.9" num-complex = { version = "0.2.1", optional = true } diff --git a/guide/src/conversions.md b/guide/src/conversions.md index 04e67624..ad28c043 100644 --- a/guide/src/conversions.md +++ b/guide/src/conversions.md @@ -2,9 +2,9 @@ `PyO3` provides some handy traits to convert between Python types and Rust types. -## `.extract()?` +## `.extract()` -The easiest way to convert a python object to a rust value is using `.extract()`. +The easiest way to convert a python object to a rust value is using `.extract()?`. ## `ToPyObject` and `IntoPyObject` trait @@ -76,7 +76,7 @@ fn main() { } ``` -`kwargs` can by `None` or `Some(PyDict)`. You can use the +`kwargs` can by `None` or `Some(&PyDict)`. You can use the [`IntoPyDict`][IntoPyDict] trait to convert other dict-like containers, e.g. `HashMap`, `BTreeMap` as well as tuples with up to 10 elements and `Vec`s where each element is a two element tuple. ```rust diff --git a/pyo3-derive-backend/Cargo.toml b/pyo3-derive-backend/Cargo.toml index 778edc17..ae4e9763 100644 --- a/pyo3-derive-backend/Cargo.toml +++ b/pyo3-derive-backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-derive-backend" -version = "0.5.0-alpha.2" +version = "0.5.0-alpha.3" description = "Code generation for PyO3 package" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] diff --git a/pyo3cls/Cargo.toml b/pyo3cls/Cargo.toml index 2711c602..1130a1cc 100644 --- a/pyo3cls/Cargo.toml +++ b/pyo3cls/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3cls" -version = "0.5.0-alpha.2" +version = "0.5.0-alpha.3" description = "Proc macros for PyO3 package" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -16,4 +16,4 @@ proc-macro = true quote= "0.6.9" proc-macro2 = "0.4.20" syn = { version = "0.15.15", features = ["full", "extra-traits"] } -pyo3-derive-backend = { path = "../pyo3-derive-backend", version = "=0.5.0-alpha.2" } +pyo3-derive-backend = { path = "../pyo3-derive-backend", version = "=0.5.0-alpha.3" }