Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

gh-111375: UseNULL in the exception stack to indicate an exception was handled#113302

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

pR0Ps
Copy link
Contributor

@pR0PspR0Ps commentedDec 20, 2023
edited by bedevere-appbot
Loading

Previously, bothNULL andPy_None would be used interchangeably to indicate that an exception is no longer being handled. By ensuring that onlyNULL is used, this opens up the possibility to usePy_None to indicate a cleared exception. The difference here would be that clearing would indicate that no exception is currently being handled vs. handling would indicate that the next exception in the stack is currently being handled.

This functionality will be used to patch up some edge cases in how the exception context interacts with exceptions thrown into coroutines. See#111676 (comment) for context.

This is implemented in this commit by changing code that could addPy_None to the exception stack to indicate that an exception is no longer being handled to addNULL instead. An assert was also added to ensure thatPy_None is no longer added to the exception stack.

Possible reviewers based ongit blame:@iritkatriel ,@markshannon

@pR0PspR0Ps changed the titlegh-111676: UseNULL in the exception stack to indicate an exception was handledgh-111375: UseNULL in the exception stack to indicate an exception was handledDec 20, 2023
Previously, both `NULL` and `Py_None` would be used interchangeably toindicate that an exception is no longer being handled. By ensuring thatonly `NULL` is used, this opens up the possibility to use `Py_None` toindicate a cleared exception. The difference here would be that clearingwould indicate that no exception is currently being handled vs. handlingwould indicate that the next exception in the stack is currently beinghandled.This functionality will be used to patch up some edge cases in how theexception context interacts with exceptions thrown into coroutines.This is implemented in this commit by changing code that could add`Py_None` to the exception stack to indicate that an exception is nolonger being handled to add `NULL` instead. An assert was also added toensure that `Py_None` is no longer added to the exception stack.Seepythongh-111676 for context.
@iritkatrieliritkatriel added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelDec 20, 2023
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@iritkatriel for commit4ac01c0 🤖

If you want to schedule another build, you need to add the🔨 test-with-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelDec 20, 2023
@iritkatriel
Copy link
Member

I checked a couple of the failed builedbots and the failures seem unrelated (and also appear in the previous runs). But we should check all of them to be sure there's nothing new before merging. Some buildbots are still running.

pR0Ps reacted with thumbs up emoji

@iritkatrieliritkatriel merged commita2dd0e7 intopython:mainDec 21, 2023
@pR0PspR0Ps deleted the bugfix/consistent-exception-stack-values branchDecember 21, 2023 14:28
ryan-duve pushed a commit to ryan-duve/cpython that referenced this pull requestDec 26, 2023
kulikjak pushed a commit to kulikjak/cpython that referenced this pull requestJan 22, 2024
aisk pushed a commit to aisk/cpython that referenced this pull requestFeb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull requestSep 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@iritkatrieliritkatrieliritkatriel left review comments

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

@gvanrossumgvanrossumAwaiting requested review from gvanrossum

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@pR0Ps@bedevere-bot@iritkatriel

[8]ページ先頭

©2009-2025 Movatter.jp