Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

NameError: name 'ExceptionGroup' is not defined #4563

Copy link
Copy link
Closed
@torarvid

Description

@torarvid
Issue body actions

Feature

This test file:

eg: ExceptionGroup = ExceptionGroup("test", [Exception("test1"), Exception("test2")])
print(eg)

yields the following in CPython 3.11.1:

❯ python test.py 
test (2 sub-exceptions)

and this error in RustPython v0.2.0

❯ rustpython test.py 
Traceback (most recent call last):
  File "test.py", line 1, in <module>
    eg: ExceptionGroup = ExceptionGroup("test", [Exception("test1"), Exception("test2")])
NameError: name 'ExceptionGroup' is not defined

I discovered this when using ruff. I first created this ruff issue but now I believe this repo is where the issue might belong 🙂

Python Documentation

ExceptionGroup is now a Python builtin (new in 3.11)

https://docs.python.org/3/library/exceptions.html#exception-groups

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-vmArea: virtual machineArea: virtual machine

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.