Skip to content

sys.exception() does not work in 24.1.1 #467

@mwsealey

Description

@mwsealey

Calling sys.exception() in GraalPython 24.1.1 does not work.

This is annoying as the Python docs say it was implemented in Python 3.11 (https://docs.python.org/3/library/sys.html#sys.exception)

Very easily reproduced:

`import sys

try:
raise NotImplementedError("oops")
except:
t, e, tb = sys.exc_info()
print(e == sys.exception())`

Crashes out with:

`Traceback (most recent call last):
File "", line 2, in
NotImplementedError: oops

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 5, in
AttributeError: module 'sys' has no attribute 'exception'`

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions