Skip to content

Commit

Permalink
Remove deprecated traceback formatting argument. (pantsbuild#15320)
Browse files Browse the repository at this point in the history
The [`etype` argument to `format_exception`](https://docs.python.org/3/library/traceback.html#traceback.format_exception) has been ignored since Python `3.5`, and is removed in Python `3.10`.

Fixes pantsbuild#15310.

[ci skip-build-wheels]
  • Loading branch information
stuhood authored May 5, 2022
1 parent 4e1eccc commit 27e2f79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rust/engine/src/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ impl Failure {
locals.set_item("tb", tb).unwrap();
locals.set_item("val", &val).unwrap();
py.eval(
"''.join(traceback.format_exception(etype=None, value=val, tb=tb))",
"''.join(traceback.format_exception(None, value=val, tb=tb))",
None,
Some(locals),
)
Expand Down

0 comments on commit 27e2f79

Please sign in to comment.