-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Backwards incompatible change in 17.1.0 event now required #110
Comments
This change is explicitly covered by our backward compatibility policy: all that changed is the default configuration. I don’t want to guarantee the same defaults forever because that makes it impossible to improve the first impression. All you have to do is to configure structlog explicitly. The former default still works fine: >>> structlog.processors.KeyValueRenderer()(None, None, {"foo": "bar"})
"foo='bar'" Is there a way we could document the policy and its effects better? I’ve put it to the top of the changelog but I’m open to suggestions. |
Ok, makes sense and also explains why this works in other parts where we explicitly configure the formatter. My confusion here comes from when reading the changelog it registered as "the default rendering format has changed", expecting that maybe the exact string produced would be different. While this to me looks a change in the api of It should perhaps also be noted what requirements the default components put on the log record e.g json needs the values to be json encodable and console requires the event key to be present. |
The same issue appears if the event is the empty string:
Is that also expected? |
Nope, that’s a bug. And a pretty embarrassing one given how much I preach to never do naked if checks like |
This minimal example shows the problem. Not passing an event is perhaps a bit silly and bad pratice but a regress none the less.
With 16.1.0 this outputs
on 17.1.0 I get this instead
The text was updated successfully, but these errors were encountered: