-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
ConfigParser._read doesn't join multi-line values collected while reading if a ParsingError occured #68330
Comments
If a ParsingError occurs while reading a config file, the multi-line values collected while reading will never be joined because the error is raised before this can happen. This leads to very unexpected results, e.g. consider the following config.ini: [DEFAULT]
This will raise a ParsingError as expected. But the option values that were parsed without error are now all lists instead of strings: >>> cfg.get('DEFAULT', test')
['test'] Patch attached. |
[Btw, you might want to fix the contributor agreement form - I can't sign it because it shows no text, so I don't know what I'm supposed to enter in the fields (Firefox 37.0.2)] |
[Thanks for the headsup about the contributor agreement form, now reported as https://github.com/python/pythondotorg/issues/747] |
It seems this hasn't landed yet? |
New changeset 40567b8e3478 by Łukasz Langa in branch '3.5': New changeset 306cfb866399 by Łukasz Langa in branch '3.6': New changeset 876bee0bd0ba by Łukasz Langa in branch 'default': |
Thanks for your patch! As you can see, 2.7 is no longer touched as the codebases diverged. I'll release a 3.6 backport on PyPI sometime this weekend that you can use. |
Is this release critical for 3.6.0? |
After discussing this offline with Łukasz, I'm going to take the risk of allowing the non-conforming 3.6 checkin to remain in for 3.6.0. |
Thanks, although I have to say it's a little bit unfortunate that Python |
Would be nice to add Misc/NEWS entry for this patch. |
Misc/NEWS
so that it is managed by towncrier #552Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: