8000 gh-125436: add missing allow_unnamed_section doc; split too long line by litlighilit · Pull Request #125437 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-125436: add missing allow_unnamed_section doc; split too long line #125437

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

Merged
merged 6 commits into from
Nov 5, 2024

Conversation

litlighilit
Copy link
Contributor
@litlighilit litlighilit commented Oct 14, 2024

Copy link
Member
@Eclips4 Eclips4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a versionchanged section for the allow_unnamed_section parameter.

@bedevere-app
Copy link
bedevere-app bot commented Oct 14, 2024

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 8000 be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@Eclips4
Copy link
Member
Eclips4 commented Oct 14, 2024

Though, let' not add a new versionchanged section, let's add a versionadded section with a short explanation of what allow_unnamed_section is doing.

@litlighilit
Copy link
Contributor Author
litlighilit commented Oct 14, 2024

Many params own their decription below function doc.

So is ConfigParser's default_section converter param.

Screenshot_2024-10-14-17-05-44-337_org.mozilla.firefox-edit.jpg

a short explanation of what allow_unnamed_section is doing.

Shall allow_unnamed_section's decription go here, too?

@Eclips4
Copy link
Member
Eclips4 commented Oct 14, 2024

Shall allow_unnamed_section's decription go here, too?

Yes, it should. After its description there should be a versionadded directive.

@picnixz
Copy link
Member
picnixz commented Oct 14, 2024

You may also add the versionadded after the doctests, where the other versionchanged were put (just be careful to order it by version).

@litlighilit
Copy link
Contributor Author
litlighilit commented Oct 14, 2024

Both of desc and versionchanged are done.

See if the added desc for allow_unnamed_section is suitable.


I've seen the CI failure but not sure what's up.

- add space in ref before `<` char of URL to fix compile error;
- add `*` to mark keywords (fixup) of ConfigParser;
- simpify desc for `allow_unnamed_section` param;
@litlighilit litlighilit requested a review from Eclips4 October 15, 2024 01:08
Copy link
Member
@Eclips4 Eclips4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!
Taking a closer look at the #117273 I've noticed that the class ConfigParser inherits from the RawConfigParser and therefore parameter allow_unnamed_section has actually been added to the RawConfigParser class. Therefore, we need to do two things:

  • Update doc for ConfigParser (which you have already done!)
  • Update doc for RawConfigParser. Although this class is considered legacy in docs, it would still be useful to update its signature. The section with an explanation what allow_unnamed_section is doing unnecessary here.

- apply suggestion from python#125437 (review)
- also update for  `versionchanged` for params of RawConfigParser
@litlighilit litlighilit requested a review from Eclips4 October 17, 2024 17:42
@litlighilit
Copy link
Contributor Author

ping @Eclips4

Copy link
Member
@Eclips4 Eclips4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for waiting @litlighilit! LGTM. Thank you!

@Eclips4 Eclips4 enabled auto-merge (squash) November 5, 2024 02:34
@Eclips4 Eclips4 merged commit d960226 into python:main Nov 5, 2024
28 of 29 checks passed
@miss-islington-app
Copy link

Thanks @litlighilit for the PR, and @Eclips4 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 5, 2024
… to ``ConfigParser`` documentation (pythonGH-125437)

Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` doc, as well as to it's parent ``RawConfigParser``.
Split too long line on ``ConfigParser`` signature.
Add some sections about when some of ``RawConfigParser`` parameters were added.
(cherry picked from commit d960226)

Co-authored-by: lit <litlighilit@foxmail.com>
@bedevere-app
Copy link
bedevere-app bot commented Nov 5, 2024

GH-126421 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Nov 5, 2024
Eclips4 pushed a commit that referenced this pull request Nov 5, 2024
…r to ``ConfigParser`` documentation (GH-125437) (#126421)

gh-125436: Doc: Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` documentation (GH-125437)

Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` doc, as well as to it's parent ``RawConfigParser``.
Split too long line on ``ConfigParser`` signature.
Add some sections about when some of ``RawConfigParser`` parameters were added.
(cherry picked from commit d960226)

Co-authored-by: lit <litlighilit@foxmail.com>
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
… to ``ConfigParser`` documentation (python#125437)

Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` doc, as well as to it's parent ``RawConfigParser``.
Split too long line on ``ConfigParser`` signature.
Add some sections about when some of ``RawConfigParser`` parameters were added.
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
… to ``ConfigParser`` documentation (python#125437)

Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` doc, as well as to it's parent ``RawConfigParser``.
Split too long line on ``ConfigParser`` signature.
Add some sections about when some of ``RawConfigParser`` parameters were added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants
0