-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
contextlib.suppress
converts instances of a subtype of ExceptionGroup
to an instance of the ExceptionGroup
class
#119287
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
Comments
contextlib.suppress
converts instances of a suptype of ExceptionGroup
to an instance of the ExceptionGroup
classcontextlib.suppress
converts instances of a subtype of ExceptionGroup
to an instance of the ExceptionGroup
class
For |
thanks, that seems to work. however i think this behavior should be documented either in the docs for the |
… it from contextlib.suppress
… it from contextlib.suppress (pythonGH-119657) (cherry picked from commit 5c02ea8) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
… it from contextlib.suppress (pythonGH-119657) (cherry picked from commit 5c02ea8) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
… it from contextlib.suppress (python#119657)
… it from contextlib.suppress (python#119657)
… it from contextlib.suppress (python#119657)
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
in this code, the
suppress
context manager is expected to have no effect, as aFooException
is not being raised within it. instead, it gets converted to anExceptionGroup
then re-raised.expected output:
actual output:
CPython versions tested on:
3.12
Operating systems tested on:
Windows
Linked PRs
The text was updated successfully, but these errors were encountered: