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
bpo-21018: document how to escape characters in configparser #6137
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. Thanks again to your contribution and we look forward to looking at it! |
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 built the docs and these changes LGTM. @ambv or @berkerpeksag, would you be able to approve and merge? Thanks!
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'd still prefer only adding examples to the "Interpolation of values" section at https://docs.python.org/3/library/configparser.html#interpolation-of-values There is no need to explicitly document the escape characters. IMO, adding examples with a short comment would be better.
For example:
[Settings]
frequency: %%80
(I'm open to use more meaningful and close to real world examples :))
The problem with just an example for me is that it is not clear which characters one needs to escape and which not, being explicit about it seems better to me. But I'm open to whatever you guys prefer. If it is just an example I would suggest to add a comment
|
Your suggested example is much better than mine. |
Let me know what you want me to do... Should I change this pull request, create a new one, if so, do I need to rebase or can I just amend my request? |
@arunpersaud yes, please update the PR. Rebasing your branch would be good, but not required unless it has merge conflicts. |
…configparser Document how $ and % can be escaped in configparser.
Updated my branch. Let me know if this is OK or if other changes are needed. |
Thanks @arunpersaud for the PR, and @JulienPalard for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
…configparser (pythonGH-6137) Document how $ and % can be escaped in configparser. (cherry picked from commit 9a94093) Co-authored-by: Arun Persaud <arun@nubati.net>
GH-15845 is a backport of this pull request to the 3.7 branch. |
Thanks @arunpersaud for this PR! |
Thanks @arunpersaud for the PR, and @JulienPalard for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
…configparser (pythonGH-6137) Document how $ and % can be escaped in configparser. (cherry picked from commit 9a94093) Co-authored-by: Arun Persaud <arun@nubati.net>
GH-15846 is a backport of this pull request to the 3.8 branch. |
…configparser (pythonGH-6137) Document how $ and % can be escaped in configparser.
Document how $ and % can be escaped in configparser.
https://bugs.python.org/issue21018