-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
gh-103606: Improve error message from logging.config.FileConfig #103628
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
Conversation
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
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.
Thanks for the PR.
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 |
Hi @vsajip I have made the requested changes; please review again, one more question why doesn't the module has type annotation if this is because you lack people then I would like to do this as the module is very complex and interesting |
Thanks for making the requested changes! @vsajip: please review the changes made to this pull request. |
3260bb8
to
64d7142
Compare
test on Windows is failing
is windows runner picking random runners in between? |
64d7142
to
5a6afbb
Compare
Passed |
…python into fix-issue-103606
5a6afbb
to
467f639
Compare
Hi @vsajip, please review again |
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 And if you don't make the requested changes, you will be poked with soft cushions! |
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 |
Co-authored-by: Vinay Sajip <[email protected]>
I have made the requested changes; please review again |
Thanks for making the requested changes! @vsajip: please review the changes made to this pull request. |
Thanks @Agent-Hellboy for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, @Agent-Hellboy and @vsajip, I could not cleanly backport this to |
|
|
GH-104687 is a backport of this pull request to the 3.11 branch. |
Hi, @miss-islington I cherry-picked it on 3.11 |
…pythonGH-103628) (cherry picked from commit 152227b)
@@ -126,6 +130,10 @@ in :mod:`logging` itself) and defining handlers which are declared either in | |||
.. versionadded:: 3.10 | |||
The *encoding* parameter is added. | |||
|
|||
.. versionadded:: 3.12 |
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.
Strictly speaking I'd have said versionchanged rather than versionadded.
if not os.path.exists(fname): | ||
raise FileNotFoundError(f"{fname} doesn't exist") | ||
elif not os.path.getsize(fname): | ||
raise ValueError(f'{fname} is an empty file') |
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.
ValueError is generally only used when the value itself is a problem, not when something external to the process such as a filesystem doesn't look right. Same below. If in doubt as to what exception to use here, I'd just go with RuntimeError if you don't have an Error exception class for your package already.
Uh oh!
There was an error while loading. Please reload this page.