File: use-pyint

package info (click to toggle)
rust-subversion 0.0.8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 752 kB
  • sloc: makefile: 2
file content (14 lines) | stat: -rw-r--r-- 732 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
In pyo3 0.22 PyInt was an alias for PyLong. In pyo3 0.23 this was
switched around so PyLong was a deprecated alias for PyInt.
In pyo3 0.25 PyLong was removed.
--- rust-subversion-0.0.8.orig/src/lib.rs
+++ rust-subversion-0.0.8/src/lib.rs
@@ -147,7 +147,7 @@ impl pyo3::FromPyObject<'_> for Revision
             return Revision::from_str(&rev).map_err(|e| {
                 pyo3::exceptions::PyValueError::new_err(format!("Invalid revision: {}", e))
             });
-        } else if ob.is_instance_of::<pyo3::types::PyLong>() {
+        } else if ob.is_instance_of::<pyo3::types::PyInt>() {
             let rev = ob.extract::<i64>()?;
             return Ok(Revision::Number(Revnum::from_raw(rev).unwrap()));
         } else {