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: accept leading whitespace on options+comments #43689
Comments
ConfigParser considers leading white space before The attached patch ignores leading white space on |
Logged In: YES Thanks for the patch Ken! This change sounds reasonable and
FWIW, these are mentioned in the (admittedly somewhat |
I tried to come up with a patch, but the issue isn't as easy as it The proposal conflicts with this behavior, since having : Adding blank lines doesn't solve the issue. The only case when it's One solution could be to check for the presence of a delimiter (colon or Any opinion ? (By the way, the leading whitespaces for comments isn't affected by all |
Quentin: I didn't appreciate the line-continuation issue. |
Okay, I'll upload a patch with unit tests and doc changes for the |
Didn't think "a few days" would translate into a month. My bad! Anyway, here's the promised patch. |
This looks very much like a duplicate of bpo-1714. Perhaps the two |
The patch cfgparser_comments.patch works for me. I agree with Jeremy Thurgood about the bpo-1714. |
I closed bpo-1714 as a duplicate of this. It also has a patch attached. |
Implemented as part of bpo-1682942 since it touches the same code. Moreover, this issue mentions Samba config parsing in the original comment (msg50719) which was not doable without the changes introduced by bpo-1682942. So I would supersede this issue with bpo-1682942. One way or the other, they both fly or both go. Michael, can you close this as superseded? |
Note: 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: