Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump PyO3 to 0.20 to fix backtraces (Cherry-pick of #20517) #20532

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/python/pants/engine/internals/scheduler_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,8 @@ def test_trace_includes_nested_exception_traceback() -> None:
return await Get(SomeOutput, SomeInput(outer_input.s))
File LOCATION-INFO, in __await__
result = yield self
File LOCATION-INFO, in raise_an_exception
raise Exception(some_input.s)
Exception: asdf

The above exception was the direct cause of the following exception:
Expand Down
40 changes: 19 additions & 21 deletions src/rust/engine/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 src/rust/engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ prodash = { git = "https://github.com/stuhood/prodash", rev = "stuhood/raw-messa
prost = "0.11"
prost-build = "0.11"
prost-types = "0.11"
pyo3 = "0.19"
pyo3 = "0.20"
rand = "0.8"
regex = "1"
rlimit = "0.8"
Expand Down
4 changes: 2 additions & 2 deletions src/rust/engine/src/externs/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ pub struct PyMergeDigests(pub Vec<DirectoryDigest>);
#[pymethods]
impl PyMergeDigests {
#[new]
fn __new__(digests: &PyAny, py: Python) -> PyResult<Self> {
let digests: PyResult<Vec<DirectoryDigest>> = PyIterator::from_object(py, digests)?
fn __new__(digests: &PyAny, _py: Python) -> PyResult<Self> {
let digests: PyResult<Vec<DirectoryDigest>> = PyIterator::from_object(digests)?
.map(|v| {
let py_digest = v?.extract::<PyDigest>()?;
Ok(py_digest.0)
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/src/interning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl Interns {
let (id, type_id): (u64, TypeId) = {
let v = v.as_ref(py);
let keys = self.keys.as_ref(py);
let id: u64 = if let Some(key) = keys.get_item(v) {
let id: u64 = if let Some(key) = keys.get_item(v)? {
key.extract()?
} else {
let id = self.id_generator.fetch_add(1, atomic::Ordering::Relaxed);
Expand Down
Loading