-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-112997: Don't log arguments in asyncio unless debugging #115667
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
Conversation
Nothing else in Python generally logs the contents of variables, so this can be very unexpected for developers and could leak sensitive information in to terminals and log files.
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.
What about the calls to some of the modified functions in base_futures.py
and futures.py
?
Lib/asyncio/format_helpers.py
Outdated
"""Format function arguments and keyword arguments. | ||
|
||
Special case for a single parameter: ('hello',) is formatted as ('hello'). | ||
""" | ||
# Avoid printing sensitive argument contents unless debugging |
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 behavior should be mentioned in the docstring, not just in a comment.
There were no arguments included in the call in I can't see any calls for this in |
So that this information is more readily available.
It's a fair cop.
I was thinking of this: if self._loop.get_debug():
self._source_traceback = format_helpers.extract_stack(
sys._getframe(1)) but since that's already wrapped in I'm happy with this now, so I'll merge. Congrats! |
…hon#115667) Nothing else in Python generally logs the contents of variables, so this can be very unexpected for developers and could leak sensitive information in to terminals and log files.
…hon#115667) Nothing else in Python generally logs the contents of variables, so this can be very unexpected for developers and could leak sensitive information in to terminals and log files.
…hon#115667) Nothing else in Python generally logs the contents of variables, so this can be very unexpected for developers and could leak sensitive information in to terminals and log files.
…hon#115667) Nothing else in Python generally logs the contents of variables, so this can be very unexpected for developers and could leak sensitive information in to terminals and log files.
Nothing else in Python generally logs the contents of variables, so this can be very unexpected for developers and could leak sensitive information in to terminals and log files.