-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
make conf.set
case insensitive
#33452
Conversation
`conf.get` is insensitive (it converts section and key to lower case) but set is not, which can lead to surprising behavior (see the test, which is not passing without the fix). I suggest that we override set as well to fix that. Any value that was set before with upper case was unreacheable.
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.
I like this change. I remember I encountered such a gotcha recently. But have the same questions/suggestions as TP
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 after resolving the discussions with the other reviewers.
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.
Same as @hussein-awala. OK for me with a few small comments
* make `conf.set` case insensitive `conf.get` is insensitive (it converts section and key to lower case) but set is not, which can lead to surprising behavior (see the test, which is not passing without the fix). I suggest that we override set as well to fix that. Any value that was set before with upper case was unreacheable. * fix remove_option as well * away with the str() * add significant change newsfragment (cherry picked from commit abbd567)
conf.get
is insensitive (it converts section and key to lower case), butset
is not, which can lead to surprising behavior (see the test, which is not passing without the fix).I suggest that we override set as well to fix that. Any value that was set before with upper case was unreacheable.