From c7016f8e4ced53b58f4b5fbacdd9e04df91496a3 Mon Sep 17 00:00:00 2001 From: kngwyu Date: Sat, 23 Nov 2019 15:29:39 +0900 Subject: [PATCH 1/3] Refer guide for nightly install --- README.md | 4 ++++ guide/src/get_started.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 0dded72e..58a00ff4 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,10 @@ A comparison with rust-cpython can be found [in the guide](https://pyo3.rs/maste PyO3 supports Python 3.5 and up. The minimum required Rust version is 1.37.0-nightly 2019-07-19. +If you have never used nightly Rust, the official guide has +[a great section](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html#rustup-and-the-role-of-rust-nightly) +about installing it. + PyPy is also supported (via cpyext) for Python 3.5 only, targeted PyPy version is 7.0.0. Please refer to the guide for installation instruction against PyPy. diff --git a/guide/src/get_started.md b/guide/src/get_started.md index 10759d4e..decfaa37 100644 --- a/guide/src/get_started.md +++ b/guide/src/get_started.md @@ -12,6 +12,10 @@ A comparison with rust-cpython can be found [in the guide](https://pyo3.rs/maste PyO3 supports Python 3.5 and up. The minimum required Rust version is 1.37.0-nightly 2019-07-19. +If you have never used nightly Rust, the official guide has +[a great section](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html#rustup-and-the-role-of-rust-nightly) +about installing it. + PyPy is also supported (via cpyext) for Python 3.5 only, targeted PyPy version is 7.0.0. Please refer to the [pypy section](https://pyo3.rs/master/pypy.html). From 6c6d54db3c5a9fe226b6545af6dcbefbb6b0ef90 Mon Sep 17 00:00:00 2001 From: kngwyu Date: Sat, 23 Nov 2019 16:29:49 +0900 Subject: [PATCH 2/3] Fix compile error in the latest nightly --- src/err.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/err.rs b/src/err.rs index 38575279..7b999f98 100644 --- a/src/err.rs +++ b/src/err.rs @@ -490,11 +490,22 @@ impl PyErrArguments for std::io::IntoInnerError { } } +impl PyErrArguments for std::convert::Infallible { + fn arguments(&self, py: Python) -> PyObject { + "Infalliable!".to_object(py) + } +} + +impl std::convert::From for PyErr { + fn from(_: std::convert::Infallible) -> PyErr { + PyErr::new::("Infalliable!") + } +} + impl_to_pyerr!(std::array::TryFromSliceError, exceptions::ValueError); impl_to_pyerr!(std::num::ParseIntError, exceptions::ValueError); impl_to_pyerr!(std::num::ParseFloatError, exceptions::ValueError); impl_to_pyerr!(std::num::TryFromIntError, exceptions::ValueError); -impl_to_pyerr!(std::string::ParseError, exceptions::ValueError); impl_to_pyerr!(std::str::ParseBoolError, exceptions::ValueError); impl_to_pyerr!(std::ffi::IntoStringError, exceptions::UnicodeDecodeError); impl_to_pyerr!(std::ffi::NulError, exceptions::ValueError); From 935adaa5d5220b4fbeff36fd02a7ea59e8144b4c Mon Sep 17 00:00:00 2001 From: kngwyu Date: Sat, 23 Nov 2019 17:09:10 +0900 Subject: [PATCH 3/3] Bump version to 0.8.3 --- CHANGELOG.md | 13 +++++++++++++ Cargo.toml | 4 ++-- README.md | 4 ++-- guide/src/get_started.md | 4 ++-- pyo3-derive-backend/Cargo.toml | 2 +- pyo3cls/Cargo.toml | 4 ++-- src/lib.rs | 4 ++-- 7 files changed, 24 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07012eef..369e9ffc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## Unreleased + +## [0.8.3] + +### Fixed + +* Now all `&Py~` types have `!Send` bound. [#655](https://github.com/PyO3/pyo3/pull/655) +* Fix a compile error raised by the stabilization of `!` type. [#672](https://github.com/PyO3/pyo3/issues/672). + +### Removed + +* `#[init]` is removed. [#658](https://github.com/PyO3/pyo3/pull/658) + ## [0.8.2] ### Added diff --git a/Cargo.toml b/Cargo.toml index deb71e96..bf2acbae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3" -version = "0.8.2" +version = "0.8.3" description = "Bindings to Python interpreter" authors = ["PyO3 Project and Contributors "] readme = "README.md" @@ -22,7 +22,7 @@ appveyor = { repository = "fafhrd91/pyo3" } libc = "0.2.62" spin = "0.5.1" num-traits = "0.2.8" -pyo3cls = { path = "pyo3cls", version = "=0.8.2" } +pyo3cls = { path = "pyo3cls", version = "=0.8.3" } num-complex = { version = ">= 0.2", optional = true } num-bigint = { version = ">= 0.2", optional = true } inventory = "0.1.4" diff --git a/README.md b/README.md index 58a00ff4..2187251f 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ name = "string_sum" crate-type = ["cdylib"] [dependencies.pyo3] -version = "0.8.2" +version = "0.8.3" features = ["extension-module"] ``` @@ -95,7 +95,7 @@ Add `pyo3` to your `Cargo.toml` like this: ```toml [dependencies] -pyo3 = "0.8.2" +pyo3 = "0.8.3" ``` Example program displaying the value of `sys.version` and the current user name: diff --git a/guide/src/get_started.md b/guide/src/get_started.md index decfaa37..a9a290dd 100644 --- a/guide/src/get_started.md +++ b/guide/src/get_started.md @@ -44,7 +44,7 @@ name = "string_sum" crate-type = ["cdylib"] [dependencies.pyo3] -version = "0.8.2" +version = "0.8.3" features = ["extension-module"] ``` @@ -89,7 +89,7 @@ Add `pyo3` to your `Cargo.toml` like this: ```toml [dependencies] -pyo3 = "0.8.2" +pyo3 = "0.8.3" ``` Example program displaying the value of `sys.version` and the current user name: diff --git a/pyo3-derive-backend/Cargo.toml b/pyo3-derive-backend/Cargo.toml index 256df3dd..baa00f82 100644 --- a/pyo3-derive-backend/Cargo.toml +++ b/pyo3-derive-backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-derive-backend" -version = "0.8.2" +version = "0.8.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 851a1b98..e760707d 100644 --- a/pyo3cls/Cargo.toml +++ b/pyo3cls/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3cls" -version = "0.8.2" +version = "0.8.3" description = "Proc macros for PyO3 package" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -17,7 +17,7 @@ proc-macro = true quote = "1" proc-macro2 = "1" syn = { version = "1", features = ["full", "extra-traits"] } -pyo3-derive-backend = { path = "../pyo3-derive-backend", version = "=0.8.2" } +pyo3-derive-backend = { path = "../pyo3-derive-backend", version = "=0.8.3" } [features] unsound-subclass = ["pyo3-derive-backend/unsound-subclass"] diff --git a/src/lib.rs b/src/lib.rs index f65a33e6..d2583163 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -48,7 +48,7 @@ //! crate-type = ["cdylib"] //! //! [dependencies.pyo3] -//! version = "0.8.2" +//! version = "0.8.3" //! features = ["extension-module"] //! ``` //! @@ -93,7 +93,7 @@ //! //! ```toml //! [dependencies] -//! pyo3 = "0.8.2" +//! pyo3 = "0.8.3" //! ``` //! //! Example program displaying the value of `sys.version`: