Skip to content

Commit

Permalink
[pyo3] upgrade to 0.22.6
Browse files Browse the repository at this point in the history
Summary: Upgrade `pyo3` to [`0.22.6`](https://fburl.com/g3zxt353)

Test Plan:
* All `[pyo3-gil-refs]` diff "Test Plan" sections have been run on this diff
* `~/fbcode/common/rust/tools/scripts/third-party-check.sh`
* `~/fbcode/common/rust/tools/scripts/check_all.sh`

Reviewed By: zertosh

Differential Revision: D68466072

fbshipit-source-id: 9e52e76164584477fc9a21daefb8a49feaf664c1
  • Loading branch information
diliop authored and facebook-github-bot committed Jan 26, 2025
1 parent 7ced385 commit 50aa471
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions antlir/antlir2/antlir2_packager/src/oci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use std::io::Read;
use std::io::Write;
use std::path::Path;
use std::path::PathBuf;
use std::str::FromStr;
use std::sync::Arc;

use anyhow::Context;
Expand All @@ -29,6 +30,7 @@ use oci_spec::image::MediaType;
use oci_spec::image::OciLayoutBuilder;
use oci_spec::image::PlatformBuilder;
use oci_spec::image::RootFsBuilder;
use oci_spec::image::Sha256Digest;
use oci_spec::image::ANNOTATION_REF_NAME;
use serde::Deserialize;
use serde::Serialize;
Expand Down Expand Up @@ -103,8 +105,8 @@ fn write<O: OciObject>(blobs_dir: &Dir, obj: &O) -> Result<Descriptor> {
f.write_all(bytes.as_ref()).context("while writing blob")?;
DescriptorBuilder::default()
.media_type(O::MEDIA_TYPE)
.digest(format!("sha256:{sha256}"))
.size(bytes.as_ref().len() as i64)
.digest(Sha256Digest::from_str(&sha256)?)
.size(bytes.as_ref().len() as u64)
.build()
.context("while building descriptor")
}
Expand Down

0 comments on commit 50aa471

Please sign in to comment.