-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Handle Logger.exception() outside "except" block #680
Conversation
The main problem of the function is that *v* can really be anything (depending on what the users) do and the annotated return type did not properly match it (e.g., if *v* was "0", the return value would be "0"). The function now rigorously checks the user input and either returns the desired result (an exc info tuple) or None. This makes it easier and safer to use this function.
the tests are red 😇 also have you seen, that there's been changes to missing tracebacks lately – notably #657? 🤔 not sure if that maybe interacts somehow with your changes since it's thematically adjacent. |
Didn't have time yet to fix the tests. Just recreated the MR for now. #657 is superfluous now. The problem it handled should no longer be possible with this PR. |
Checks are green now. You should still carefully review the changes. ;-) |
Do you need anything else from me for this PR to get merged? :-) |
Sorry for the delays, I’ll get to structlog (there‘s quite a bit of open issues around exceptions 😰) right after pushing out attrs. I think it’s ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This very much needs a changelog entry – and as I asked inline, I wonder how breaking this would be considered given how many complains we got for the last release. 🤔
Co-authored-by: Hynek Schlawack <[email protected]>
I'll add a changelog entry when the code is ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok changelog pls and let's get this behind us
Also remove the entry for the now obsolete hynek#657
Done, feel free to edit. :-) |
Summary
Fixes #634, follow-up of #635
Pull Request Check List
main
branch – use a separate branch!api.py
.docs/api.rst
by hand.versionadded
,versionchanged
, ordeprecated
directives..rst
and.md
files is written using semantic newlines.