-
Notifications
You must be signed in to change notification settings - Fork 12
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
generate errors from bad <logfile> sections earlier #55
Conversation
- allow disallowed combinations of options be be identified and reported earlier (before any logfile handlers are created, and before any files are opened) - ensure DataConversionError is not converted to ConfigurationSyntaxError when a section end is loaded
Risks: Changes can affect 3rd-party handlers that derive from I'd expect the real risk of this is low, but can be difficult to predict, and it could take some time for affected users to report problems. |
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.
LGTM, but this might need a big version bump and a changelog notice about the earlier point of binding of sys.stdout/sys.stderr.
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.
LGTM. I like the earlier error reporting, and I like not changing exception types unnecessarily (though I don't think I saw any tests that specifically check the type of exception?).
I agree that this needs a prominent change note and is probably technically incompatible enough that it deserves a major bump.
Agree with you both on needing a change note; realized I'd not done that while in the shower. The earlier change, with |
I don't know. To me 3.3.x -> 3.4.0 is not scary, nobody's going to carefully look the changelog for such an update. But then the chances of this being a breaking change also seem small, so maybe that's fine? |
On thinking further, the change in capture time of the |
capturing stderr, stdout earlier is not a specific goal; though unlikely to be a problem for most uses, we can avoid the early capture to avoid changing runtime behavior in a ways that can be surprising in way that is unlikely to be detected early by consumers
Original capture time for stderr, stdout restored in commit f3fe237. Added note to change history. Still need tests that exceptions aren't changed inappropriately. |
- check for more specific exceptions in tests - check boundary values for logging levels - extend early checking for option combinations to <email-notifier>
Done with changes; again ready for review. |
ZConfig 3.4.0 introduced some breaking changes with error handling. cf zopefoundation/ZConfig#55 modified: src/ZServer/Zope2/Startup/tests/test_warnfilter.py
ZConfig 3.4.0 introduced some breaking changes with error handling. cf zopefoundation/ZConfig#55 modified: src/ZServer/Zope2/Startup/tests/test_warnfilter.py
allow disallowed combinations of options be be identified
and reported earlier (before any logfile handlers are created, and
before any files are opened)
ensure DataConversionError is not converted to
ConfigurationSyntaxError when a section end is loaded