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

Show real error if module exists but import failed #14124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

2xsaiko
Copy link

@2xsaiko 2xsaiko commented Jan 11, 2025

If a module exists but errors during importing (e.g. a bad import inside the module itself) it will act as if the module doesn't exist, which is pretty confusing. In this case propagate the real error.

(Should this unconditionally fail instead of soft-failing when required is False?)

@2xsaiko 2xsaiko requested a review from jpakkane as a code owner January 11, 2025 23:09
@eli-schwartz
Copy link
Member

If a module exists but errors during importing (e.g. a bad import inside the module itself)

Under what circumstances has this been occurring for you?

@2xsaiko
Copy link
Author

2xsaiko commented Jan 11, 2025

While working on #14121 and having a bad import in the file :)

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