FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-158402: Clear error if PyImport_GetModule raises in lazy import by encukou · Pull Request #158403 · python/cpython · GitHub

Repository navigation

gh-158402: Clear error if PyImport_GetModule raises in lazy import - #158403

Closed
encukou wants to merge 2 commits into
python:mainfrom
encukou:error-in-_initializing
Closed

encukou wants to merge 2 commits into
python:mainfrom
encukou:error-in-_initializing

Conversation

encukou commented Sep 29, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Hope this is the right fix: I'm assuming lazy import cannot fail (it can't be put in a try block), and

@pablogsal's change in #157714 suggests another possible assumption: that lazy import cannot run user code. That's not the case now, though.

cc @brittanyrey

encukou commented Sep 29, 2026

Copy link
Copy Markdown
Member Author

Maybe BaseException should be raised?

encukou closed this Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL