GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||
GeezerVison is showing github.com — bpo-37779 : Add information about the overriding behavior of ConfigParser.read by sblondon · Pull Request #15177 · python/cpython Conversation
|
|
I can add an entry into |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@sblondon, am not a native English speaker I just left some nit formatting comments. Someone else can review the rest of the documentation.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-Authored-By: Kyle Stanley <[email protected]>
…s and remove 3 spaces before a paragraph
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@aeros167 Thanks for the rewrited paragraph, I merged it. I removed the 3 spaces before each line because the paragraph should not be indented.
The whole 'Quick Start' section use 'we', I wonder if the section should be rewritten to remove them. If it's the case, perhaps another bug report+PR is a better choice? Or reusing this one?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
@sblondon Yes, it should probably be in a separate PR and issue, since it''s involving a different section. Preferably, it would be done multiple PRs (single issue), instead of all at once. Smaller PRs tend to be significantly easier to review. However, I think this issue should be marked as "newcomer friendly" (reserved mostly for first time contributors), I think it would serve as a great introduction into contributing to Python. We'll have to see what the core devs think. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@sblondon Thanks for making the changes to the phrasing.
It looks like Travis CI is failing due to the doctests starting from line 240 to 248, specifically these lines (244 and 245):
>>> topsecret.getboolean('BatchMode', fallback=True)
True
The doctests determined that the output should be False instead of True after running through the same process in the interpreter. I'm not certain if this is the correct behavior, but either way, the differing output is causing the CI to fail from the warnings.
Since this section is unrelated to this PR and in an unaltered section, I think it should be ignored for this PR and addressed in a new issue.
One more minor suggestion, the conventional format for defining parameters is to italicize them, rather than using code blocks:
Edit: Removed 3 spaces before the line part, see my comment below.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-Authored-By: Kyle Stanley <[email protected]>
Thanks for the link @aeros167 . However, I don't understand the sentence I think that because every .rst file I watch does not have 3 spaces indentations for the main text. Examples in cpython documentation:
Example in the devguide: What do you think about it? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
@sblondon Upon further inspection of the area being modified, you're correct. For some reason, I had thought that this area was surrounded by an reST directive (which causes all lines to require the 3 space indent I was referring to). It looks like there's only the initial Thanks again for the PR and responsiveness to the feedback. Apologies if I caused any confusion, I'll edit my comments accordingly. Note: I think this mistake was partially a result of me attempting to increase the volume of my PR reviews (since that's a main bottleneck for CPython). In the future, I need to make sure that I more thoroughly inspect the full section surrounding the changes, instead of looking at the diff. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@aeros167 Thank you for the review ! :) (By the way, beware of burn out if you try to do too much volonteer work.) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
No problem, and yeah I definitely need to make sure that I pace myself. This is the first open source project that I've found myself incredibly motivated to help with, since Python was my first serious programming language 5+ years ago. It can be tempting some days to just endlessly sink my free time into it, but burnout is definitely a concern. @vstinner mentioned this in a talk earlier this year at PyCon 2019. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@ambv You are listed as a section author for this section - do you have any thoughts on the advisability of adding this section? If not, do you know who the right person would be?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
|
||
| If it is necessary to read several configurations, with each one having more | ||
| priority than the previous one, an instance of :class:`ConfigParser` can be | ||
| used to override previously defined properties and retain existing ones. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
One problem I see with this is that the first few clauses of this sentence seem to be introducing a tutorial, i.e. "If you want to do X, you can achieve it with Y", but then it turns out that you are actually describing the existing behavior of ConfigParser rather than providing a recipe or something.
I would recommend rewriting this as an introduction to the properties of a ConfigParser, like so:
It is also possible to read several configurations into a single
:class:`ConfigParser`object, in which case the most recent configuration has priority over the previous ones; conflicting keys will be taken from the new configuration and existing keys will be retained.
That's mostly an example, I'm not super happy with that particular wording...
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
That's mostly an example, I'm not super happy with that particular wording...
What do you think of this wording?
It is possible to read several configurations into a single :class:
ConfigParser, where the most recently added configuration has the highest priority. Any conflicting keys are taken from the more recent configuration while the previously existing keys are retained.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
That looks great!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@pganssle I pushed @aeros167 's version to the repository.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I have made the requested changes; please review again
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-Authored-By: Paul Ganssle <[email protected]>
|
Added a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I don't think a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@csabella I merged a version accepted by @pganssle (see the thread #15177 (review)). @ambv never replied. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing and re-opening to re-trigger CI checks which were spuriously failing before. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Looks like the failure is real: the documentation doctest fails with: @sblondon, please confirm you can successfully build the documentation locally by running this in the main directory of your |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@ambv I renamed the I checked the fix on my computer with: >>> import doctest >>> doctest.testfile("Doc/library/configparser.rst") TestResults(failed=0, attempted=88) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks everyone! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* origin/master: (27 commits) bpo-41428: Fix compiler warnings in unionobject.c (pythonGH-22388) bpo-41654: Fix compiler warning in MemoryError_dealloc() (pythonGH-22387) bpo-41833: threading.Thread now uses the target name (pythonGH-22357) bpo-30155: Add macros to get tzinfo from datetime instances (pythonGH-21633) bpo-33822: Update IDLE section of What's New 3.8 (pythonGH-22383) bpo-41844: Add IDLE section to What's New 3.9 (GN-22382) bpo-41841: Prepare IDLE News for 3.10 (pythonGH-22379) bpo-37779 : Add information about the overriding behavior of ConfigParser.read (pythonGH-15177) bpo-40170: Use inline _PyType_HasFeature() function (pythonGH-22375) bpo-40941: Fix stackdepth compiler warnings (pythonGH-22377) bpo-40941: Fix fold_tuple_on_constants() compiler warnings (pythonGH-22378) bpo-40521: Fix PyUnicode_InternInPlace() (pythonGH-22376) bpo-41834: Remove _Py_CheckRecursionLimit variable (pythonGH-22359) bpo-1635741, unicodedata: add ucd_type parameter to UCD_Check() macro (pythonGH-22328) bpo-1635741: Port _lsprof extension to multi-phase init (PEP 489) (pythonGH-22220) bpo-41513: Improve order of adding fractional values. Improve variable names. (pythonGH-22368) bpo-41816: `StrEnum.__str__` is `str.__str__` (pythonGH-22362) bpo-35764: Rewrite the IDLE Calltips doc section (pythonGH-22363) bpo-41810: Reintroduce `types.EllipsisType`, `.NoneType` & `.NotImplementedType` (pythonGH-22336) bpo-41602: raise SIGINT exit code on KeyboardInterrupt from pymain_run_module (python#21956) ...
…rser.read (pythonGH-15177) Co-Authored-By: Kyle Stanley <[email protected]> Co-Authored-By: Paul Ganssle <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.