Skip to content

bpo-38235: Correct some arguments names in logging documentation #16571

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 1 commit into from
Oct 4, 2019

Conversation

AWhetter
Copy link
Contributor

@AWhetter AWhetter commented Oct 3, 2019

There's some other arguments names that are also incorrect in the documentation. For example Formatter.formatException is defined as def formatException(self, ei): but documented as .. method:: formatException(exc_info), and makeLogRecord is defined as def makeLogRecord(dict): but documented as .. function:: makeLogRecord(attrdict). The argument names in the documentation are more clear, but they don't match the code. I'm not sure if the preference is for consistency or readability. So for now I've only changed lvl because level is a better name, but I'm happy to find and fix the other inconsistencies if that's preferred.

https://bugs.python.org/issue38235

Copy link
Contributor

@aeros aeros 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 PR @AWhetter and welcome!

I'm not sure if the preference is for consistency or readability.

Typically, that decision is left up to the maintainer for the module, rather than a global rule for all of the documentation. In the case of logging, that is @vsajip. I'll add him as a reviewer.

Personally, I'm in favor of changing lvl to level for consistency. I'm generally not a fan of abbreviating argument names.

I'm happy to find and fix the other inconsistencies if that's preferred.

As for fixing all of the other inconsistencies, let's keep this PR simple and focused just on the lvl to level conversions. That makes it much easier to review and makes merging the PR a much smaller decision for the maintainer to make. In it's current state, I think it works great as an introductory PR to gain some experience with the CPython workflow. (:

@aeros aeros requested a review from vsajip October 4, 2019 01:36
@aeros
Copy link
Contributor

aeros commented Oct 4, 2019

Also @vsajip would you mind being added to the CODEOWNERS file as an owner for anything related to the logging module? This would allow you to be automatically added as a reviewer for any PR that affects logging documentation or code files.

I don't mind opening a PR to add you if you don't have the time to do so, but I wanted to make sure you were okay with it first. Brett was saying that he wants to encourage populating CODEOWNERS with experts instead of manually adding reviewers.

Copy link
Member

@CuriousLearner CuriousLearner left a comment

Choose a reason for hiding this comment

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

Looks good to me. 🌮

@vsajip vsajip merged commit 3142c66 into python:master Oct 4, 2019
@miss-islington
Copy link
Contributor

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

@miss-islington
Copy link
Contributor

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

@bedevere-bot
Copy link

GH-16576 is a backport of this pull request to the 3.8 branch.

@bedevere-bot
Copy link

GH-16577 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 4, 2019
…honGH-16571)

(cherry picked from commit 3142c66)

Co-authored-by: Ashley Whetter <AWhetter@users.noreply.github.com>
vsajip pushed a commit that referenced this pull request Oct 4, 2019
…16571) (GH-16576)

(cherry picked from commit 3142c66)

Co-authored-by: Ashley Whetter <AWhetter@users.noreply.github.com>
vsajip pushed a commit that referenced this pull request Oct 4, 2019
…16571) (GH-16577)

(cherry picked from commit 3142c66)

Co-authored-by: Ashley Whetter <AWhetter@users.noreply.github.com>
@brandtbucher
Copy link
Member

Congrats on your first CPython contribution @AWhetter! 🍾

Looking forward to seeing more from you in the future.

@AWhetter
Copy link
Contributor Author

AWhetter commented Oct 4, 2019

Yay! Thank you! 🙌

AWhetter added a commit to AWhetter/cpython that referenced this pull request Oct 4, 2019
pythonGH-16571).

(cherry picked from commit 3142c66)

Co-authored-by: Ashley Whetter <AWhetter@users.noreply.github.com>
ned-deily pushed a commit to ned-deily/cpython that referenced this pull request Oct 14, 2019
…honGH-16571) (pythonGH-16577)

(cherry picked from commit 3142c66)

Co-authored-by: Ashley Whetter <AWhetter@users.noreply.github.com>
jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
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
None yet
Development

Successfully merging this pull request may close these issues.

9 participants