Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/PyO3>"]
readme = "README.md"
Expand All @@ -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"
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -46,7 +50,7 @@ name = "string_sum"
crate-type = ["cdylib"]

[dependencies.pyo3]
version = "0.8.2"
version = "0.8.3"
features = ["extension-module"]
```

Expand Down Expand Up @@ -91,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:
Expand Down
8 changes: 6 additions & 2 deletions guide/src/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down Expand Up @@ -40,7 +44,7 @@ name = "string_sum"
crate-type = ["cdylib"]

[dependencies.pyo3]
version = "0.8.2"
version = "0.8.3"
features = ["extension-module"]
```

Expand Down Expand Up @@ -85,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:
Expand Down
2 changes: 1 addition & 1 deletion pyo3-derive-backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/PyO3>"]
keywords = ["pyo3", "python", "cpython", "ffi"]
Expand Down
4 changes: 2 additions & 2 deletions pyo3cls/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/PyO3>"]
keywords = ["pyo3", "python", "cpython", "ffi"]
Expand All @@ -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"]
13 changes: 12 additions & 1 deletion src/err.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,11 +490,22 @@ impl<W: Send + std::fmt::Debug> PyErrArguments for std::io::IntoInnerError<W> {
}
}

impl PyErrArguments for std::convert::Infallible {
fn arguments(&self, py: Python) -> PyObject {
"Infalliable!".to_object(py)
}
}

impl std::convert::From<std::convert::Infallible> for PyErr {
fn from(_: std::convert::Infallible) -> PyErr {
PyErr::new::<exceptions::ValueError, _>("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);
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
//! crate-type = ["cdylib"]
//!
//! [dependencies.pyo3]
//! version = "0.8.2"
//! version = "0.8.3"
//! features = ["extension-module"]
//! ```
//!
Expand Down Expand Up @@ -93,7 +93,7 @@
//!
//! ```toml
//! [dependencies]
//! pyo3 = "0.8.2"
//! pyo3 = "0.8.3"
//! ```
//!
//! Example program displaying the value of `sys.version`:
Expand Down