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-132775: Clean Up Cross-Interpreter Error Handling#135369

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

ericsnowcurrently
Copy link
Member

@ericsnowcurrentlyericsnowcurrently commentedJun 10, 2025
edited by bedevere-appbot
Loading

In this refactor we:

  • move some code around
  • make a couple of typedefs opaque
  • decouple errors from session state
  • improve tracebacks for propagated exceptions

This change helps simplify several upcoming changes.

};
if (override != NULL) {
err = *override;
*override = (_PyXI_error_override){0};
Copy link
Contributor

Choose a reason for hiding this comment

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

test_call passes without the line in my case.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

fixed

if (override == NULL) {
override = &_override;
}
_PyXI_errcode errcode = override->code;
Copy link
Contributor

Choose a reason for hiding this comment

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

Fortest_running, putting_override.code = errcode; in the_PyXI_ERR_ALREADY_RUNNING case (several lines below) works well for me.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

fixed

@@ -1485,6 +1491,10 @@ _PyXI_excinfo_Apply(_PyXI_excinfo *info, PyObject *exctype)
if (tbexc == NULL) {
PyErr_Clear();
}
else {
PyErr_SetObject(exctype, tbexc);
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

tbexc seems to be leaking.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

fixed

Thanks for tracking this down! I don't know how you find these things so quickly. 😄

neonene reacted with laugh emoji
Copy link
Contributor

Choose a reason for hiding this comment

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

Bisection might be effective using Windows binaries? Not so quick, but even I could be a tester to share the burden.

ericsnowcurrently reacted with heart emoji
const char *msg = error->override != NULL
? error->override->msg
: error->uncaught.msg;
_set_xid_lookup_failure(tstate, NULL, msg, cause);
Copy link
Contributor

Choose a reason for hiding this comment

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

cause seems to be leaking.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

fixed

@ericsnowcurrentlyericsnowcurrently marked this pull request as draftJune 11, 2025 17:45
@ericsnowcurrently
Copy link
MemberAuthor

Hmm, I forgot to mark this as "draft". Sorry about that.

neonene reacted with thumbs up emoji

@ericsnowcurrentlyericsnowcurrently marked this pull request as ready for reviewJune 12, 2025 16:01
@ericsnowcurrentlyericsnowcurrently merged commitc7f4a80 intopython:mainJun 13, 2025
70 of 71 checks passed
@miss-islington-app
Copy link

Thanks@ericsnowcurrently for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@ericsnowcurrentlyericsnowcurrently deleted the clean-up-xi-error-handling branchJune 13, 2025 22:45
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJun 13, 2025
…135369)In this refactor we:* move some code around* make a couple of typedefs opaque* decouple errors from session state* improve tracebacks for propagated exceptionsThis change helps simplify several upcoming changes.(cherry picked from commitc7f4a80)Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
@bedevere-app
Copy link

GH-135492 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelJun 13, 2025
ericsnowcurrently added a commit that referenced this pull requestJun 14, 2025
In this refactor we:* move some code around* make a couple of typedefs opaque* decouple errors from session state* improve tracebacks for propagated exceptionsThis change helps simplify several upcoming changes.(cherry picked from commitc7f4a80, AKAgh-135369)Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
lkollar pushed a commit to lkollar/cpython that referenced this pull requestJun 19, 2025
…135369)In this refactor we:* move some code around* make a couple of typedefs opaque* decouple errors from session state* improve tracebacks for propagated exceptionsThis change helps simplify several upcoming changes.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@neoneneneoneneneonene left review comments

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

Successfully merging this pull request may close these issues.

2 participants
@ericsnowcurrently@neonene

[8]ページ先頭

©2009-2025 Movatter.jp