Skip to content

Commit

Permalink
rust: upgrade pyo3 0.18 -> 0.19
Browse files Browse the repository at this point in the history
This required some minor code changes.
  • Loading branch information
indygreg committed May 26, 2024
1 parent a2f000d commit 5376f63
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
24 changes: 12 additions & 12 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 @@ -26,5 +26,5 @@ version = "2.0.8+zstd.1.5.5"
features = ["experimental", "legacy", "zstdmt"]

[dependencies.pyo3]
version = "0.18.3"
version = "0.19.2"
features = ["extension-module"]
5 changes: 5 additions & 0 deletions docs/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ Other Actions Not Blocking Release
0.23.0 (not yet released)
=========================

Changes
-------

* PyO3 Rust crate upgraded from 0.18 to 0.19.

0.22.0 (released 2023-11-01)
============================

Expand Down
4 changes: 2 additions & 2 deletions rust-ext/src/decompressor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ impl ZstdDecompressor {
// First chunk should not be using a dictionary. We handle it specially.
let chunk = frames.get_item(0)?;

if !chunk.is_instance_of::<PyBytes>()? {
if !chunk.is_instance_of::<PyBytes>() {
return Err(PyValueError::new_err("chunk 0 must be bytes"));
}

Expand Down Expand Up @@ -310,7 +310,7 @@ impl ZstdDecompressor {
}

for (i, chunk) in frames.iter().enumerate().skip(1) {
if !chunk.is_instance_of::<PyBytes>()? {
if !chunk.is_instance_of::<PyBytes>() {
return Err(PyValueError::new_err(format!("chunk {} must be bytes", i)));
}

Expand Down

0 comments on commit 5376f63

Please sign in to comment.