-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
prevent kwarg clashes #372
Comments
You're right, with your analysis, however the problem is that those method definitions aren't private at all.
Event is even a bit more complicated, because it's part of the logging calls and it's syntactically impossible to pass a kw-arg called event to it. Generally speaking, I would be interested to untangle all of this. But I'm afraid the only backward-compatible way would be to introduce new APIs that replace |
Can it at least fail silently? Like class Logger:
def _log(self, *args, **kwargs):
try:
self._real_log(*args, **kwargs)
except Exception:
self.exception("Internal logging error.") |
See hynek/structlog#372 and `--randomly-seed=1939564298`.
I keep on running into this problem:
and some others, when trying to:
I've heard from collegues of them running into the same issues with other keywords, like
event
iirc and some othersMy understanding is that most keyword clashes can be prevented by changing internal method definitions to, say, prepend each kwarg with an underscore?
Let me know your thoughts, and if you think this is reasonable, I'll raise a pr to fix this
The text was updated successfully, but these errors were encountered: