Skip to content

Commit

Permalink
Bump to pyo3 0.22
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed Jun 25, 2024
1 parent b4b8e4e commit 7c070ae
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 71 deletions.
80 changes: 13 additions & 67 deletions 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ workspace = true
features = [ "serde",]

[workspace.dependencies]
pyo3 = ">=0.20"
pyo3 = { version = ">=0.20", features = ["py-clone"] }

[dev-dependencies.pyo3]
workspace = true
2 changes: 1 addition & 1 deletion src/branch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ pub fn open_containing(url: &url::Url) -> Result<(Box<dyn Branch>, String), Bran
let m = py.import_bound("breezy.branch").unwrap();
let c = m.getattr("Branch").unwrap();

let (b, p): (&PyAny, String) = c
let (b, p): (Bound<PyAny>, String) = c
.call_method1("open_containing", (url.to_string(),))?
.extract()?;

Expand Down
4 changes: 2 additions & 2 deletions src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ impl WorkingTree {
Python::with_gil(|py| {
let m = py.import_bound("breezy.workingtree")?;
let c = m.getattr("WorkingTree")?;
let (wt, p): (&PyAny, String) =
let (wt, p): (Bound<PyAny>, String) =
c.call_method1("open_containing", (path,))?.extract()?;
Ok((WorkingTree(wt.to_object(py)), PathBuf::from(p)))
})
Expand Down Expand Up @@ -859,7 +859,7 @@ impl FromPyObject<'_> for TreeChange {
}

fn from_opt_bool_tuple(o: &Bound<PyAny>) -> PyResult<(Option<bool>, Option<bool>)> {
let tuple = o.extract::<(Option<&PyAny>, Option<&PyAny>)>()?;
let tuple = o.extract::<(Option<Bound<PyAny>>, Option<Bound<PyAny>>)>()?;
Ok((
tuple.0.map(|o| from_bool(&o.as_borrowed())).transpose()?,
tuple.1.map(|o| from_bool(&o.as_borrowed())).transpose()?,
Expand Down

0 comments on commit 7c070ae

Please sign in to comment.