Skip to content

Commit f9f5d50

Browse files
committed
Upgrade to PyO3 0.11.
1 parent 08f84aa commit f9f5d50

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ autoexamples = false
1414

1515
[dependencies]
1616
inline-python-macros = { version = "0.5.0", path = "./macros" }
17-
pyo3 = { version = "0.10.0", default-features = false }
17+
pyo3 = { version = "0.11.0", default-features = false }
1818

1919
[workspace]
2020
members = ["examples", "ct-python"]

macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ proc_macro = true
1616
[dependencies]
1717
proc-macro2 = { version = "1.0", features = ["span-locations"] }
1818
quote = "1.0"
19-
pyo3 = { version = "0.10.0", default-features = false }
19+
pyo3 = { version = "0.11.0", default-features = false }
2020

2121
[target.'cfg(unix)'.dependencies]
2222
libc = "0.2.71"

macros/src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ use pyo3::{PyAny, AsPyRef, PyErr, PyResult, Python, ToPyObject};
77
pub fn compile_error_msg(py: Python, error: PyErr, tokens: TokenStream) -> TokenStream {
88
let value = error.to_object(py);
99

10-
if value.is_none() {
10+
if value.is_none(py) {
1111
let error = format!("python: {}", error.ptype.as_ref(py).name());
1212
return quote!(compile_error!{#error});
1313
}
1414

15-
if error.matches(py, pyo3::exceptions::SyntaxError::type_object()) {
15+
if error.matches(py, pyo3::exceptions::SyntaxError::type_object(py)) {
1616
let line: Option<usize> = value.getattr(py, "lineno").ok().and_then(|x| x.extract(py).ok());
1717
let msg: Option<String> = value.getattr(py, "msg").ok().and_then(|x| x.extract(py).ok());
1818
if let (Some(line), Some(msg)) = (line, msg) {

0 commit comments

Comments
 (0)