Skip to content

[mypyc] Propagate errors in import helpers - #22349

Merged
p-sawicki merged 2 commits into
python:masterfrom
p-sawicki:preserve-errors-import-helpers
Nov 2, 2026
Merged

p-sawicki merged 2 commits into
python:masterfrom
p-sawicki:preserve-errors-import-helpers

Conversation

@p-sawicki

Copy link
Copy Markdown
Collaborator

In CPyImport_ImportFrom, only set ImportError when the imported attribute lookup fails with no other error, otherwise propagate the error.

Add missing error checks when calling cpython APIs in import-related functions in misc_ops.c and locks.c.

@p-sawicki
p-sawicki merged commit 8849b3b into python:master Nov 2, 2026
18 checks passed
@p-sawicki
p-sawicki deleted the preserve-errors-import-helpers branch November 2, 2026 15:42
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

Successfully merging this pull request may close these issues.

2 participants