-
-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Messy traceback if importlib.reload()
is called with a str
#125519
Comments
AlexWaygood
added
type-bug
An unexpected behavior, bug, or error
stdlib
Python modules in the Lib dir
topic-importlib
labels
Oct 15, 2024
AlexWaygood
added
3.12
bugs and security fixes
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
labels
Oct 15, 2024
AlexWaygood
added a commit
to AlexWaygood/cpython
that referenced
this issue
Oct 15, 2024
…with a non-module object
AlexWaygood
changed the title
Terrible traceback if
Messy traceback if Oct 15, 2024
importlib.reload()
is called with a str
importlib.reload()
is called with a str
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 21, 2024
…with a non-module object (pythonGH-125520) (cherry picked from commit c5c21fe) Co-authored-by: Alex Waygood <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 21, 2024
…with a non-module object (pythonGH-125520) (cherry picked from commit c5c21fe) Co-authored-by: Alex Waygood <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
If you call
importlib.reload()
with astr
, there's a huge amount of unnecessary detail in the traceback that makes it look like there's an internal error in the function itself:We should probably suppress the exception context here.
CPython versions tested on:
3.12, 3.13, CPython main branch
Operating systems tested on:
macOS
Linked PRs
importlib.reload()
is called with a non-module object #125520importlib.reload()
is called with a non-module object (GH-125520) #125768importlib.reload()
is called with a non-module object (GH-125520) #125769The text was updated successfully, but these errors were encountered: