Skip to content

Commit 7149a1f

Browse files
authored
Bump to 0.7.0-alpha.1 (#457)
1 parent f8bf258 commit 7149a1f

File tree

12 files changed

+30
-29
lines changed

12 files changed

+30
-29
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
### Added
1111

12+
* PyPy support by omerbenamram in [#393](https://github.com/PyO3/pyo3/pull/393)
1213
* Have `PyModule` generate an index of its members (`__all__` list).
1314

1415
### Changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyo3"
3-
version = "0.6.0"
3+
version = "0.7.0-alpha.1"
44
description = "Bindings to Python interpreter"
55
authors = ["PyO3 Project and Contributors <https://github.com/PyO3>"]
66
readme = "README.md"
@@ -22,7 +22,7 @@ appveyor = { repository = "fafhrd91/pyo3" }
2222
libc = "0.2.48"
2323
spin = "0.5.0"
2424
num-traits = "0.2.6"
25-
pyo3cls = { path = "pyo3cls", version = "=0.6.0" }
25+
pyo3cls = { path = "pyo3cls", version = "=0.7.0-alpha.1" }
2626
mashup = "0.1.9"
2727
num-complex = { version = "0.2.1", optional = true }
2828
inventory = "0.1.3"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ name = "string_sum"
4646
crate-type = ["cdylib"]
4747

4848
[dependencies.pyo3]
49-
version = "0.6.0"
49+
version = "0.7.0-alpha.1"
5050
features = ["extension-module"]
5151
```
5252

@@ -94,7 +94,7 @@ Add `pyo3` this to your `Cargo.toml`:
9494

9595
```toml
9696
[dependencies]
97-
pyo3 = "0.6.0-alpha.4"
97+
pyo3 = "0.7.0-alpha.1"
9898
```
9999

100100
Example program displaying the value of `sys.version`:

guide/src/advanced.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Currently, [#341](https://github.com/PyO3/pyo3/issues/341) causes `cargo test` t
1212

1313
```toml
1414
[dependencies.pyo3]
15-
version = "0.6.0"
15+
version = "0.7.0-alpha.1"
1616

1717
[features]
1818
extension-module = ["pyo3/extension-module"]

guide/src/class.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ each protocol implementation block has to be annotated with `#[pyproto]` attribu
485485

486486
### Basic object customization
487487

488-
[`PyObjectProtocol`](https://docs.rs/pyo3/0.6.0-alpha.4/class/basic/trait.PyObjectProtocol.html) trait provide several basic customizations.
488+
[`PyObjectProtocol`](https://docs.rs/pyo3/0.7.0-alpha.1/class/basic/trait.PyObjectProtocol.html) trait provide several basic customizations.
489489

490490
#### Attribute access
491491

@@ -539,7 +539,7 @@ Each methods corresponds to python's `self.attr`, `self.attr = value` and `del s
539539
If your type owns references to other python objects, you will need to
540540
integrate with Python's garbage collector so that the GC is aware of
541541
those references.
542-
To do this, implement [`PyGCProtocol`](https://docs.rs/pyo3/0.6.0-alpha.4/class/gc/trait.PyGCProtocol.html) trait for your struct.
542+
To do this, implement [`PyGCProtocol`](https://docs.rs/pyo3/0.7.0-alpha.1/class/gc/trait.PyGCProtocol.html) trait for your struct.
543543
It includes two methods `__traverse__` and `__clear__`.
544544
These correspond to the slots `tp_traverse` and `tp_clear` in the Python C API.
545545
`__traverse__` must call `visit.call()` for each reference to another python object.
@@ -588,7 +588,7 @@ collector, and it is possible to track them with `gc` module methods.
588588
### Iterator Types
589589

590590
Iterators can be defined using the
591-
[`PyIterProtocol`](https://docs.rs/pyo3/0.6.0-alpha.4/class/iter/trait.PyIterProtocol.html) trait.
591+
[`PyIterProtocol`](https://docs.rs/pyo3/0.7.0-alpha.1/class/iter/trait.PyIterProtocol.html) trait.
592592
It includes two methods `__iter__` and `__next__`:
593593
* `fn __iter__(slf: PyRefMut<Self>) -> PyResult<impl IntoPyObject>`
594594
* `fn __next__(slf: PyRefMut<Self>) -> PyResult<Option<impl IntoPyObject>>`

guide/src/conversions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ Many conversions in PyO3 can't use `std::convert::Into` because they need a gil
107107

108108
Eventually, traits such as `IntoPyObject` will be replaces by this trait and a `FromPy` trait will be added that will implement `IntoPy`, just like with `From` and `Into`.
109109

110-
[`ToPyObject`]: https://docs.rs/pyo3/0.6.0-alpha.4/trait.ToPyObject.html
111-
[IntoPyObject]: https://docs.rs/pyo3/0.6.0-alpha.4/trait.IntoPyObject.html
112-
[PyObject]: https://docs.rs/pyo3/0.6.0-alpha.4/struct.PyObject.html
113-
[PyTuple]: https://docs.rs/pyo3/0.6.0-alpha.4/struct.PyTuple.html
114-
[ObjectProtocol]: https://docs.rs/pyo3/0.6.0-alpha.4/trait.ObjectProtocol.html
115-
[IntoPyDict]: https://docs.rs/pyo3/0.6.0-alpha.4/trait.IntoPyDict.html
110+
[`ToPyObject`]: https://docs.rs/pyo3/0.7.0-alpha.1/trait.ToPyObject.html
111+
[IntoPyObject]: https://docs.rs/pyo3/0.7.0-alpha.1/trait.IntoPyObject.html
112+
[PyObject]: https://docs.rs/pyo3/0.7.0-alpha.1/struct.PyObject.html
113+
[PyTuple]: https://docs.rs/pyo3/0.7.0-alpha.1/struct.PyTuple.html
114+
[ObjectProtocol]: https://docs.rs/pyo3/0.7.0-alpha.1/trait.ObjectProtocol.html
115+
[IntoPyDict]: https://docs.rs/pyo3/0.7.0-alpha.1/trait.IntoPyDict.html

guide/src/exception.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn main() {
3737

3838
## Raise an exception
3939

40-
To raise an exception, first you need to obtain an exception type and construct a new [`PyErr`](https://docs.rs/pyo3/0.2.7/struct.PyErr.html), then call [`PyErr::restore()`](https://docs.rs/pyo3/0.2.7/struct.PyErr.html#method.restore) method to write the exception back to the Python interpreter's global state.
40+
To raise an exception, first you need to obtain an exception type and construct a new [`PyErr`](https://docs.rs/pyo3/0.7.0-alpha.1/struct.PyErr.html), then call [`PyErr::restore()`](https://docs.rs/pyo3/0.7.0-alpha.1/struct.PyErr.html#method.restore) method to write the exception back to the Python interpreter's global state.
4141

4242
```rust
4343
# extern crate pyo3;
@@ -53,7 +53,7 @@ fn main() {
5353
}
5454
```
5555

56-
If you already have a Python exception instance, you can simply call [`PyErr::from_instance()`](https://docs.rs/pyo3/0.2.7/struct.PyErr.html#method.from_instance).
56+
If you already have a Python exception instance, you can simply call [`PyErr::from_instance()`](https://docs.rs/pyo3/0.7.0-alpha.1/struct.PyErr.html#method.from_instance).
5757

5858
```rust,ignore
5959
PyErr::from_instance(py, err).restore(py);
@@ -81,7 +81,7 @@ fn my_func(arg: PyObject) -> PyResult<()> {
8181
## Check exception type
8282

8383
Python has an [`isinstance`](https://docs.python.org/3/library/functions.html#isinstance) method to check object type,
84-
in `PyO3` there is a [`Python::is_instance()`](https://docs.rs/pyo3/0.2.7/struct.Python.html#method.is_instance) method which does the same thing.
84+
in `PyO3` there is a [`Python::is_instance()`](https://docs.rs/pyo3/0.7.0-alpha.1/struct.Python.html#method.is_instance) method which does the same thing.
8585

8686
```rust
8787
# extern crate pyo3;
@@ -98,7 +98,7 @@ fn main() {
9898
}
9999
```
100100

101-
[`Python::is_instance()`](https://docs.rs/pyo3/0.2.7/struct.Python.html#method.is_instance) calls the underlying [`PyType::is_instance`](https://docs.rs/pyo3/0.2.7/struct.PyType.html#method.is_instance) method to do the actual work.
101+
[`Python::is_instance()`](https://docs.rs/pyo3/0.7.0-alpha.1/struct.Python.html#method.is_instance) calls the underlying [`PyType::is_instance`](https://docs.rs/pyo3/0.7.0-alpha.1/struct.PyType.html#method.is_instance) method to do the actual work.
102102

103103
To check the type of an exception, you can simply do:
104104

@@ -116,10 +116,10 @@ err.is_instance::<exceptions::TypeError>(py);
116116

117117
## Handle Rust Error
118118

119-
The vast majority of operations in this library will return [`PyResult<T>`](https://docs.rs/pyo3/0.2.7/type.PyResult.html).
119+
The vast majority of operations in this library will return [`PyResult<T>`](https://docs.rs/pyo3/0.7.0-alpha.1/type.PyResult.html).
120120
This is an alias for the type `Result<T, PyErr>`.
121121

122-
A [`PyErr`](https://docs.rs/pyo3/0.2.7/struct.PyErr.html) represents a Python exception.
122+
A [`PyErr`](https://docs.rs/pyo3/0.7.0-alpha.1/struct.PyErr.html) represents a Python exception.
123123
Errors within the PyO3 library are also exposed as Python exceptions.
124124

125125
PyO3 library handles python exception in two stages. During first stage `PyErr` instance get
@@ -129,7 +129,7 @@ exception instance get crated and set to python interpreter.
129129
In simple case, for custom errors support implementation of `std::convert::From<T>` trait
130130
for this custom error is enough. `PyErr::new` accepts arguments in form
131131
of `ToPyObject + 'static`. In case if `'static` constraint can not be satisfied or
132-
more complex arguments are required [`PyErrArgument`](https://docs.rs/pyo3/0.2.7/trait.PyErrArguments.html)
132+
more complex arguments are required [`PyErrArgument`](https://docs.rs/pyo3/0.7.0-alpha.1/trait.PyErrArguments.html)
133133
trait can be implemented. In that case actual exception arguments creation get delayed
134134
until `Python` object is available.
135135

@@ -193,5 +193,5 @@ fn tell(file: PyObject) -> PyResult<u64> {
193193

194194
```
195195

196-
[`exc`](https://docs.rs/pyo3/0.2.7/exc/index.html) defines exceptions for
196+
[`exc`](https://docs.rs/pyo3/0.7.0-alpha.1/exc/index.html) defines exceptions for
197197
several standard library modules.

guide/src/get_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ name = "string_sum"
3838
crate-type = ["cdylib"]
3939

4040
[dependencies.pyo3]
41-
version = "0.6.0-alpha.4"
41+
version = "0.7.0-alpha.1"
4242
features = ["extension-module"]
4343
```
4444

guide/src/parallelism.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CPython has an infamous GIL(Global Interpreter Lock) prevents developers
44
getting true parallelism. With PyO3 you can release GIL when executing
55
Rust code to achieve true parallelism.
66

7-
The [`Python::allow_threads`](https://docs.rs/pyo3/0.2.7/struct.Python.html#method.allow_threads)
7+
The [`Python::allow_threads`](https://docs.rs/pyo3/0.7.0-alpha.1/struct.Python.html#method.allow_threads)
88
method temporarily releases the GIL, thus allowing other Python threads to run.
99

1010
```rust,ignore

pyo3-derive-backend/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyo3-derive-backend"
3-
version = "0.6.0"
3+
version = "0.7.0-alpha.1"
44
description = "Code generation for PyO3 package"
55
authors = ["PyO3 Project and Contributors <https://github.com/PyO3>"]
66
keywords = ["pyo3", "python", "cpython", "ffi"]

pyo3cls/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyo3cls"
3-
version = "0.6.0"
3+
version = "0.7.0-alpha.1"
44
description = "Proc macros for PyO3 package"
55
authors = ["PyO3 Project and Contributors <https://github.com/PyO3>"]
66
keywords = ["pyo3", "python", "cpython", "ffi"]
@@ -17,4 +17,4 @@ proc-macro = true
1717
quote= "0.6.9"
1818
proc-macro2 = "0.4.20"
1919
syn = { version = "0.15.15", features = ["full", "extra-traits"] }
20-
pyo3-derive-backend = { path = "../pyo3-derive-backend", version = "=0.6.0" }
20+
pyo3-derive-backend = { path = "../pyo3-derive-backend", version = "=0.7.0-alpha.1" }

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
//! crate-type = ["cdylib"]
4949
//!
5050
//! [dependencies.pyo3]
51-
//! version = "0.6.0-alpha.4"
51+
//! version = "0.7.0-alpha.1"
5252
//! features = ["extension-module"]
5353
//! ```
5454
//!
@@ -93,7 +93,7 @@
9393
//!
9494
//! ```toml
9595
//! [dependencies]
96-
//! pyo3 = "0.6.0-alpha.4"
96+
//! pyo3 = "0.7.0-alpha.1"
9797
//! ```
9898
//!
9999
//! Example program displaying the value of `sys.version`:

0 commit comments

Comments
 (0)