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
Document that logging.getLevelName() can return a numeric value. #87519
Comments
Can we document[1] that I hope it's not a duplicate, I tried to find matching ticket. I can submit PR if accepted. [1] https://docs.python.org/3.10/library/logging.html?highlight=getlevelname#logging.getLevelName |
Sure, I'll look at a PR that mentions the other usage above the "changed in 3.4" section. |
That would be great mention that! IMO This affect 3.8+? I'm not sure if docs changes are accepted to 3.6 and 3.7 |
Do we want to backport this patch? If yes, I can prepare backports. If not, we can close the ticket. |
Just noticed this fly by in the stream of emails... sorry for not commenting earlier. The patch seems to describe "Level #" as "numeric", which I would not be inclined to do. It includes the numeric value since there's no available name for it, but as a value, it's still textual. I'm referring specifically to the change here: Otherwise, I do believe this should be back-ported. |
"numeric" doesn't refer to the "Level #" representation but to the fact that >>> getLevelName('CRITICAL')
50 |
Mariusz: Good point. IMO, an insane API behavior, but a legacy we must live with. No further objections from me. |
I've prepared PRs with backports. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: