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 does not accept "No value" reversely to the doc #89380
Comments
Just the simple following config crashes """ Hopefully using "Here=" solves the issue, but the doc claims it shall work. Save the config in "bug.ini", then write (it will raise an exception) |
Try this:
It should work! :) But, the docs are missing this config value here (which caused this issue):
I will update the docs. |
Thanks for your prompt answer. Don't you think it should be the default? It seems like unneeded precision. Just if you want to check one don't miss a value, but in that case, one can use 'allow_no_value=False'. |
No, it shouldn't be the default. It never was before (this is a library that we've maintained for 20+ years now) and changing it now would mean that existing applications would stop validating their configuration in the way they did up to now. .ini files are unfortunately very imprecisely specified but they are *mostly* interoperable between applications. Changing defaults at this point is therefore out of the question. |
Thanks for the patch, Nikita! ✨ 🍰 ✨ |
allow_no_value
inconfigparser
is optional #28396allow_no_value
inconfigparser
is optional (GH-28396) #28416allow_no_value
inconfigparser
is optional (GH-28396) #28418Note: 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: