GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-43858: Add logging.getLevelNamesMapping() by akulakov · Pull Request #26459 · python/cpython

Conversation

@akulakov

@akulakov akulakov commented May 31, 2021 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Added a function that returns a copy of a dict of logging levels.

https://bugs.python.org/issue43858

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
akulakov added 2 commits May 31, 2021 00:28
@akulakov
added getLevelNamesDict()
f80b73a
@akulakov
Added getLevelNamesDict doc
e5601b0
@akulakov
akulakov requested a review from vsajip as a code owner May 31, 2021 04:46
@bedevere-bot bedevere-bot added the awaiting review label May 31, 2021
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label May 31, 2021
blurb-it Bot and others added 2 commits May 31, 2021 04:51
@blurb-it
📜🤖 Added by blurb_it.
72a6efa
@akulakov
Add getLevelNamesDict() to __all__
e59141b
ericvsmith
ericvsmith requested changes May 31, 2021
View reviewed changes

@ericvsmith ericvsmith left a comment

Copy link
Copy Markdown
Member

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.

This needs tests. In particular it should add tests that a copy is returned.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vsajip reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Doc/library/logging.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/logging/__init__.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting review label May 31, 2021
@bedevere-bot

bedevere-bot commented May 31, 2021

Copy link
Copy Markdown

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 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added the awaiting changes label May 31, 2021
akulakov added 4 commits May 31, 2021 10:53
@akulakov
Updated func name; expanded doc; added unit test
bebd56a
@akulakov
fix indentation on __all__
0fffa1c
@akulakov
fix __all__ again
f56e012
@akulakov
updated new entry
f578c79
@akulakov

akulakov commented May 31, 2021

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting change review and removed awaiting changes labels May 31, 2021
@bedevere-bot

bedevere-bot commented May 31, 2021

Copy link
Copy Markdown

Thanks for making the requested changes!

@ericvsmith: please review the changes made to this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot
bedevere-bot requested a review from ericvsmith May 31, 2021 15:04
ericvsmith
ericvsmith requested changes May 31, 2021
View reviewed changes

@ericvsmith ericvsmith left a comment

Copy link
Copy Markdown
Member

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.

This is looking good to me. @vsajip : I'll let you have the final word.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/logging.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_logging.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/logging.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting changes and removed awaiting change review labels May 31, 2021
@bedevere-bot

bedevere-bot commented May 31, 2021

Copy link
Copy Markdown

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 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vsajip
vsajip requested changes May 31, 2021
View reviewed changes
Comment thread Lib/test/test_logging.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@vsajip vsajip added the 🤖 automerge label May 31, 2021
ericvsmith
ericvsmith reviewed Jun 1, 2021
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2021-05-31-04-51-02.bpo-43858.r7LOu6.rst Outdated
@@ -0,0 +1 @@
Added a function that returns a copy of a dict of logging levels: func::`logging.getLevelNamesMapping()`

@ericvsmith ericvsmith Jun 1, 2021

Copy link
Copy Markdown
Member

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.

Now that I look at this: isn't the correct syntax:

:func:`logging.getLevelNamesMapping`

?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@akulakov akulakov Jun 1, 2021

Copy link
Copy Markdown
Contributor Author

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.

You are right, well spotted!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@akulakov
fixed typo in news; expanded tests; added example to the doc
cc7a8c8
@akulakov

akulakov commented Jun 1, 2021

Copy link
Copy Markdown
Contributor Author

@vsajip @ericvsmith Pushed an update per comments, please take a look!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@akulakov
fix2 for news
e71183e
ericvsmith
ericvsmith reviewed Jun 1, 2021
View reviewed changes

@ericvsmith ericvsmith left a comment

Copy link
Copy Markdown
Member

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.

With the one small item I mentioned, this looks good to me.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Misc/NEWS.d/next/Library/2021-05-31-04-51-02.bpo-43858.r7LOu6.rst Outdated
@@ -0,0 +1 @@
Added a function that returns a copy of a dict of logging levels: :func:`logging.getLevelNamesMapping()`

@ericvsmith ericvsmith Jun 1, 2021

Copy link
Copy Markdown
Member

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.

My understanding is that :func: adds the parens, so you should leave them off in this message. I've looked at other files, and they don't have the parens.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

akulakov reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@akulakov
remove parens from doc link
3d41503
@akulakov

akulakov commented Jun 1, 2021

Copy link
Copy Markdown
Contributor Author

@ericvsmith I fixed the parens, please take a look..

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vsajip
vsajip requested changes Jun 2, 2021
View reviewed changes

@vsajip vsajip left a comment

Copy link
Copy Markdown
Member

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.

Accidental double-definition in test?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/test_logging.py Outdated
self.assertEqual(rc, 1)

def test_get_level_names_mapping(self):
def test_get_level_names_mapping(self):

@vsajip vsajip Jun 2, 2021

Copy link
Copy Markdown
Member

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 don't think you meant this double level of indentation! That causes the test to do nothing effective 😞

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

akulakov reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@akulakov akulakov Jun 2, 2021

Copy link
Copy Markdown
Contributor Author

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.

Whoops, somehow doubling made it hard to spot for me..

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@akulakov
fixed double definition of test
5b1631c
@akulakov

akulakov commented Jun 2, 2021

Copy link
Copy Markdown
Contributor Author

@vsajip Fixed the doubled test..

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ericvsmith
ericvsmith reviewed Jun 2, 2021
View reviewed changes

@ericvsmith ericvsmith left a comment

Copy link
Copy Markdown
Member

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.

This all looks good to me. Thanks, @akulakov !

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@akulakov akulakov changed the title bpo-43858: Add logging.getLevelNamesDict() bpo-43858: Add logging.getLevelNamesMapping() Jun 2, 2021
vsajip
vsajip approved these changes Jun 3, 2021
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting changes labels Jun 3, 2021
@miss-islington
miss-islington merged commit 8b93f0e into python:main Jun 3, 2021
@bedevere-bot bedevere-bot removed the awaiting merge label Jun 3, 2021
@akulakov

akulakov commented Jun 5, 2021

Copy link
Copy Markdown
Contributor Author

@ericvsmith and @vsajip much thanks for the help with the PR!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@CAM-Gerlach CAM-Gerlach mentioned this pull request Oct 16, 2022
gh-95913: Add WhatsNew section for new logging APIs #98320
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ericvsmith ericvsmith ericvsmith requested changes
@vsajip vsajip vsajip approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@akulakov @bedevere-bot @vsajip @ericvsmith @the-knights-who-say-ni @miss-islington
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.