Improve exception string formatting#423
Conversation
|
Python 3.12 is timing out in the existing integration suite, while 3.8, 3.11, I also compared that test on the PR head and the pre-change commit in the same Could you rerun the Python 3.12 job when convenient? I haven't pushed a |
|
Thanks for the interest and PR. Changes look good, will retry the test on CircleCI. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #423 +/- ##
==========================================
+ Coverage 99.46% 99.52% +0.06%
==========================================
Files 18 18
Lines 1694 1702 +8
==========================================
+ Hits 1685 1694 +9
+ Misses 9 8 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What changed
Exceptions such as
AuthenticationErrorkeep a printf-style message and itsvalues in
args, so their default string output currently looks like a tuple.This adds a shared string representation that formats those values while
leaving
argsunchanged. Single-argument exceptions keep their existingoutput, and invalid formats fall back to Python's normal exception formatting.
The behavior is covered by regression tests and documented in the exceptions
reference.
Verification
pytest(21 passed)flake8 psshflake8 tests ci/integration_testspython setup.py check --restructuredtextpython setup.py sdist bdist_wheelorigin/master)Resolves #404