-
Notifications
You must be signed in to change notification settings - Fork 27
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
Dont log unknown values #82
Conversation
There is already an option to turn this off:
|
@@ -10,6 +10,8 @@ | |||
|
|||
from testing.testifycompat import ( | |||
assert_equal, | |||
assert_in, | |||
assert_not_in, |
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.
These are only for backwards compatibility.
Please use raw assert
assert x in y
assert x not in y
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.
Ah okay. Fixing
But this will not log if there are unknown keys in the config, since that is done at |
@dnephin bump :) |
Ok, I'm happy to merge this when the tests are passing. It looks like |
Sure thing |
Hmmm @dnephin it looks like the version of flake8 you're using no longer supports py26? It's trying to use an OrderedDict: https://travis-ci.org/dnephin/PyStaticConfiguration/jobs/158206819#L211-L216 |
@dnephin I looked into this, and it seems we have two options:
I'm good with either; which do you prefer? |
Ok, I pushed #83, if you rebase you should be set. |
Oh cool. Rebasing away |
Unknown keys are still logged. Then updates method calls to make use of this kwarg, which defaults to False
LGTM |
Hey @dnephin are you going to cut a pypi release with this change? |
Awesome, thanks! |
Thanks for the contribution! |
If users of this package happened to forget to register a key that stores sensitive data, that sensitive data would be logged in
ConfigNamespace.validate_keys()
.This change adds an optional argument to turn on this behavior.
It currently defaults to False, but it may be nice to change this to True, so that all users need to do to enable this feature is to bump their package version, but I am not sure what you think.