Skip to content

Commit 8175d6f

Browse files
committed
Merge branch 'master' into pyclass-new-layout
2 parents b86de93 + c8cb3ad commit 8175d6f

24 files changed

+520
-317
lines changed

CHANGELOG.md

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

88
## Unreleased
99

10+
* Support for `#[name = "foo"]` attribute for `#[pyfunction]` and in `#[pymethods]`. [#692](https://github.com/PyO3/pyo3/pull/692)
11+
12+
## [0.8.4]
13+
1014
### Added
1115

1216
* Support for `#[text_signature]` attribute. [#675](https://github.com/PyO3/pyo3/pull/675)

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.8.3"
3+
version = "0.8.4"
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.62"
2323
spin = "0.5.1"
2424
num-traits = "0.2.8"
25-
pyo3cls = { path = "pyo3cls", version = "=0.8.3" }
25+
pyo3cls = { path = "pyo3cls", version = "=0.8.4" }
2626
num-complex = { version = ">= 0.2", optional = true }
2727
num-bigint = { version = ">= 0.2", optional = true }
2828
inventory = "0.1.4"

README.md

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

5252
[dependencies.pyo3]
53-
version = "0.8.3"
53+
version = "0.8.4"
5454
features = ["extension-module"]
5555
```
5656

@@ -95,7 +95,7 @@ Add `pyo3` to your `Cargo.toml` like this:
9595

9696
```toml
9797
[dependencies]
98-
pyo3 = "0.8.3"
98+
pyo3 = "0.8.4"
9999
```
100100

101101
Example program displaying the value of `sys.version` and the current user name:

guide/src/get_started.md

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

4646
[dependencies.pyo3]
47-
version = "0.8.3"
47+
version = "0.8.4"
4848
features = ["extension-module"]
4949
```
5050

@@ -89,7 +89,7 @@ Add `pyo3` to your `Cargo.toml` like this:
8989

9090
```toml
9191
[dependencies]
92-
pyo3 = "0.8.3"
92+
pyo3 = "0.8.4"
9393
```
9494

9595
Example program displaying the value of `sys.version` and the current user name:

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.8.3"
3+
version = "0.8.4"
44
description = "Code generation for PyO3 package"
55
authors = ["PyO3 Project and Contributors <https://github.com/PyO3>"]
66
keywords = ["pyo3", "python", "cpython", "ffi"]

pyo3-derive-backend/src/func.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@ pub enum MethodProto {
5555
},
5656
}
5757

58-
impl PartialEq<str> for MethodProto {
59-
fn eq(&self, name: &str) -> bool {
58+
impl MethodProto {
59+
pub fn name(&self) -> &str {
6060
match *self {
61-
MethodProto::Free { name: n, .. } => n == name,
62-
MethodProto::Unary { name: n, .. } => n == name,
63-
MethodProto::Binary { name: n, .. } => n == name,
64-
MethodProto::BinaryS { name: n, .. } => n == name,
65-
MethodProto::Ternary { name: n, .. } => n == name,
66-
MethodProto::TernaryS { name: n, .. } => n == name,
67-
MethodProto::Quaternary { name: n, .. } => n == name,
61+
MethodProto::Free { ref name, .. } => name,
62+
MethodProto::Unary { ref name, .. } => name,
63+
MethodProto::Binary { ref name, .. } => name,
64+
MethodProto::BinaryS { ref name, .. } => name,
65+
MethodProto::Ternary { ref name, .. } => name,
66+
MethodProto::TernaryS { ref name, .. } => name,
67+
MethodProto::Quaternary { ref name, .. } => name,
6868
}
6969
}
7070
}

pyo3-derive-backend/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ mod utils;
1616

1717
pub use module::{add_fn_to_module, process_functions_in_module, py_init};
1818
pub use pyclass::{build_py_class, PyClassArgs};
19-
pub use pyfunction::PyFunctionAttr;
19+
pub use pyfunction::{build_py_function, PyFunctionAttr};
2020
pub use pyimpl::{build_py_methods, impl_methods};
2121
pub use pyproto::build_py_proto;
2222
pub use utils::get_doc;

0 commit comments

Comments
 (0)