-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
os.utime raises exceptions without a filename. #109033
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
Labels
type-bug
An unexpected behavior, bug, or error
Comments
rpigott
added a commit
to rpigott/cpython
that referenced
this issue
Sep 6, 2023
The filename was previously intentionally omitted from exception becuase "it might confuse the user". Uncaught exceptions are not generally a replacement for user-facing error messages, so obscuring this information only has the effect of making the programmer's life more difficult.
rpigott
added a commit
to rpigott/cpython
that referenced
this issue
Sep 6, 2023
The filename was previously intentionally omitted from exception becuase "it might confuse the user". Uncaught exceptions are not generally a replacement for user-facing error messages, so obscuring this information only has the effect of making the programmer's life more difficult.
rpigott
added a commit
to rpigott/cpython
that referenced
this issue
Sep 7, 2023
The filename was previously intentionally omitted from exception becuase "it might confuse the user". Uncaught exceptions are not generally a replacement for user-facing error messages, so obscuring this information only has the effect of making the programmer's life more difficult.
rpigott
added a commit
to rpigott/cpython
that referenced
this issue
Sep 8, 2023
The filename was previously intentionally omitted from exception becuase "it might confuse the user". Uncaught exceptions are not generally a replacement for user-facing error messages, so obscuring this information only has the effect of making the programmer's life more difficult.
rpigott
added a commit
to rpigott/cpython
that referenced
this issue
Sep 9, 2023
The filename was previously intentionally omitted from exception becuase "it might confuse the user". Uncaught exceptions are not generally a replacement for user-facing error messages, so obscuring this information only has the effect of making the programmer's life more difficult.
rpigott
added a commit
to rpigott/cpython
that referenced
this issue
Sep 19, 2023
The filename was previously intentionally omitted from exception becuase "it might confuse the user". Uncaught exceptions are not generally a replacement for user-facing error messages, so obscuring this information only has the effect of making the programmer's life more difficult.
rpigott
added a commit
to rpigott/cpython
that referenced
this issue
Sep 19, 2023
The filename was previously intentionally omitted from exception becuase "it might confuse the user". Uncaught exceptions are not generally a replacement for user-facing error messages, so obscuring this information only has the effect of making the programmer's life more difficult.
vstinner
pushed a commit
that referenced
this issue
Sep 19, 2023
The filename was previously intentionally omitted from exception because "it might confuse the user". Uncaught exceptions are not generally a replacement for user-facing error messages, so obscuring this information only has the effect of making the programmer's life more difficult.
Implemented in ddf2e95 |
csm10495
pushed a commit
to csm10495/cpython
that referenced
this issue
Sep 28, 2023
The filename was previously intentionally omitted from exception because "it might confuse the user". Uncaught exceptions are not generally a replacement for user-facing error messages, so obscuring this information only has the effect of making the programmer's life more difficult.
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this issue
Sep 2, 2024
The filename was previously intentionally omitted from exception because "it might confuse the user". Uncaught exceptions are not generally a replacement for user-facing error messages, so obscuring this information only has the effect of making the programmer's life more difficult.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
The builtin os.utime option raises exceptions without a filename. E.g. on Linux:
The source actually provides a justification for this omission:
which really is no justification at all.
Uncaught exceptions are not usually considered a replacement for user-facing error messages, so omitting the filename here is at best a guidance to the programmer, but this approach unnecessarily removes context that could be helpful in crafting a useful error message. On Linux at least, I don't even think that the exception traceback has the potential for confusion raised in this comment — EPERM could quite clearly mean that my user lacks the requisite permission to modify the file in whatever relevant way, including changing the timestamps.
CPython versions tested on:
3.11
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: