Skip to content

Commit 4bf3c4d

Browse files
authored
chore: upgrade pyo3 (#12755)
Mainly to remove `#[allow(clippy::useless_conversion)]` which is fixed from 0.24. ## Checklist - [ ] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [ ] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
1 parent 36fa1ee commit 4bf3c4d

File tree

5 files changed

+25
-21
lines changed

5 files changed

+25
-21
lines changed

src/native/Cargo.lock

Lines changed: 21 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/native/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ strip = "debuginfo"
99
opt-level = 3
1010

1111
[dependencies]
12-
pyo3 = { version = "0.22.3", features = ["extension-module"] }
12+
pyo3 = { version = "0.24", features = ["extension-module"] }
1313
datadog-ddsketch = { git = "https://github.com/DataDog/libdatadog", rev = "v16.0.3" }
1414
datadog-library-config = { git = "https://github.com/DataDog/libdatadog", rev = "v16.0.3" }
1515

src/native/ddsketch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ impl DDSketchPy {
3232

3333
fn to_proto<'p>(&self, py: Python<'p>) -> Bound<'p, PyBytes> {
3434
let res = self.ddsketch.clone().encode_to_vec();
35-
PyBytes::new_bound(py, &res)
35+
PyBytes::new(py, &res)
3636
}
3737
}

src/native/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#[allow(clippy::useless_conversion)]
21
mod ddsketch;
3-
#[allow(clippy::useless_conversion)]
42
mod library_config;
53

64
use pyo3::prelude::*;

src/native/library_config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ impl PyConfigurator {
4040
);
4141
match res_config {
4242
Ok(config) => {
43-
let list = PyList::empty_bound(py);
43+
let list = PyList::empty(py);
4444
for c in config.iter() {
45-
let dict = PyDict::new_bound(py);
45+
let dict = PyDict::new(py);
4646
dict.set_item("name", c.name.to_str().to_owned())?;
4747
dict.set_item("value", c.value.clone())?;
4848
dict.set_item("source", c.source.to_str().to_owned())?;

0 commit comments

Comments
 (0)