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

added exception groups #25430

Closed
wants to merge 10 commits into from

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Apr 16, 2021

First step of PEP-654: added Exception Groups (without updating traceback formatting).

Include/pyerrors.h Show resolved Hide resolved
+-- Exception
+-- ExceptionGroup
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately we can't express here that ExceptionGroup subclasses BaseExceptionGroup as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note in parentheses?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be an unused feature that interprets whatever is in "(..)" as a platform name and then ignores any exception where the platform is not the current platform (so it won't break the test but will weaken it).

But "[...]" seems ok - anything in them appears to be ignored, and when I changed ExceptionGroup to something invalid the test failed.

if '(' in exc_name:

PC/python3dll.c Show resolved Hide resolved
Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this what we will merge once the PEP is accepted?

(Note that the master -> main rename will happen at that time too. But supposedly PSs will be automatically adjusted. We’ll see.)

Include/pyerrors.h Show resolved Hide resolved
+-- Exception
+-- ExceptionGroup
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note in parentheses?

@gvanrossum
Copy link
Member

Probably mark as Draft?

@iritkatriel iritkatriel marked this pull request as draft April 16, 2021 07:30
@iritkatriel iritkatriel removed the request for review from a team April 16, 2021 09:43
Copy link
Member Author

@iritkatriel iritkatriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this what we will merge once the PEP is accepted?

That's the idea. The branch of the other PR is very old and compile.c/eval.c changed beyond what can be fixed with a rebase. So I started from scratch on a recent cut of master. Marked as draft for now.

+-- Exception
+-- ExceptionGroup
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be an unused feature that interprets whatever is in "(..)" as a platform name and then ignores any exception where the platform is not the current platform (so it won't break the test but will weaken it).

But "[...]" seems ok - anything in them appears to be ignored, and when I changed ExceptionGroup to something invalid the test failed.

if '(' in exc_name:

Include/pyerrors.h Show resolved Hide resolved
@gvanrossum
Copy link
Member

You should probably merge this on main.

@iritkatriel
Copy link
Member Author

I rebased and regenerated Python/importlib_external.h

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Jun 12, 2021
@iritkatriel
Copy link
Member Author

Superseded by #28569.

@iritkatriel iritkatriel deleted the PEP-654-ExceptionGroup branch October 18, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review DO-NOT-MERGE stale Stale PR or inactive for long period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants