-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
bpo-23835: Enforce that configparser defaults are strings #2558
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
Conversation
ambv
left a comment
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.
Instead of this, reading defaults should be done by callingself.read_dict(), then it will behave consistently with doing:
cp['DEFAULT'] = {1: 2.4}|
Yeah, that seems more sensible (I originally wrote the patch against 2.7, which is why I didn't use read_dict). Do you want the new version in a new PR, or just replace the current PR with the new code? Also, where should I add a test, I couldn't find where I should add it last time I looked. |
|
Replacing the current PR is totally fine. There are tests for configparser in Lib/test/test_configparser.py. |
|
Done. |
|
Ping? |
Add assert statements to the new test.
|
I'll add a NEWS.d entry in a separate PR. |
|
Thanks! ✨ 🍰 ✨ |
* Enforce that configparser defaults are strings * Update test_configparser.py
This is the patch attached to https://bugs.python.org/issue23835, updated to master.
https://bugs.python.org/issue23835