Skip to content
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

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

Closed
mwsealey opened this issue Jan 5, 2025 · 1 comment
Closed

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

mwsealey opened this issue Jan 5, 2025 · 1 comment
Assignees

Comments

@mwsealey
Copy link

mwsealey commented Jan 5, 2025

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'`

@msimacek
Copy link
Contributor

msimacek commented Jan 6, 2025

Thank you for the report, I'll fix it shortly

@msimacek msimacek self-assigned this Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants