Skip to content

Commit

Permalink
Upgrade pyo3 to 0.20 (#1106)
Browse files Browse the repository at this point in the history
Co-authored-by: Dimitris Iliopoulos <[email protected]>
  • Loading branch information
diliop and Dimitris Iliopoulos authored Feb 15, 2024
1 parent 8a19d05 commit fa9300e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 21 deletions.
52 changes: 34 additions & 18 deletions native/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion native/libcst/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ trace = ["peg/trace"]

[dependencies]
paste = "1.0.9"
pyo3 = { version = ">=0.17,<0.20", optional = true }
pyo3 = { version = "0.20", optional = true }
thiserror = "1.0.37"
peg = "0.8.1"
chic = "1.2.2"
Expand Down
4 changes: 2 additions & 2 deletions native/libcst/src/nodes/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl<'a, T: Inflate<'a>> Inflate<'a> for Vec<T> {
}
#[cfg(feature = "py")]
pub mod py {
use pyo3::{types::PyTuple, AsPyPointer, IntoPy, PyObject, PyResult, Python};
use pyo3::{types::PyAny, types::PyTuple, IntoPy, PyObject, PyResult, Python};

// TODO: replace with upstream implementation once
// https://github.com/PyO3/pyo3/issues/1813 is resolved
Expand Down Expand Up @@ -188,7 +188,7 @@ pub mod py {

impl<T> TryIntoPy<PyObject> for &'_ T
where
T: AsPyPointer,
T: AsRef<PyAny>,
{
fn try_into_py(self, py: Python) -> PyResult<PyObject> {
Ok(self.into_py(py))
Expand Down

0 comments on commit fa9300e

Please sign in to comment.