Skip to content

Commit

Permalink
Merge pull request #16 from jelmer/0.20
Browse files Browse the repository at this point in the history
Support PyO3 0.20
  • Loading branch information
omerbenamram authored Nov 27, 2023
2 parents 258a87f + eb3cf4e commit 613fd9e
Show file tree
Hide file tree
Showing 3 changed files with 203 additions and 124 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ authors = ["Omer Ben-Amram <omerbenamram@gmail.com>"]
edition = "2018"

[dependencies]
pyo3 = { version = ">=0.18.1,<0.20" }
pyo3 = { version = ">=0.18.1,<0.21" }

[dev-dependencies]
skeptic = "0.13.7"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl FileOrFileLike {
pub fn from_pyobject(path_or_file_like: PyObject) -> PyResult<FileOrFileLike> {
Python::with_gil(|py| {
// is a path
if let Ok(string_ref) = path_or_file_like.cast_as::<PyString>(py) {
if let Ok(string_ref) = path_or_file_like.downcast::<PyString>(py) {
return Ok(FileOrFileLike::File(
string_ref.to_string_lossy().to_string(),
));
Expand Down
Loading

0 comments on commit 613fd9e

Please sign in to comment.