Skip to content

Re-raise ModuleNotFoundError instead of ImportError - #12381

Merged
crusaderky merged 1 commit into
dask:mainfrom
crusaderky:ImportError
May 7, 2026
Merged

crusaderky merged 1 commit into
dask:mainfrom
crusaderky:ImportError

Conversation

@crusaderky

@crusaderky crusaderky commented May 7, 2026 •

Copy link
Copy Markdown
Collaborator

When catching ModuleNotFoundError, re-raise the exact class instead of a generic ImportError.

This PR also fixes a regression introduced by #12373 when numpy is not installed.

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

     20 files  ±0       20 suites  ±0   5h 5m 56s ⏱️ + 10m 55s
 18 295 tests ±0   17 011 ✅ ±0   1 272 💤 ±0  12 ❌ ±0 
299 528 runs  ±0  257 315 ✅ +2  42 201 💤  - 2  12 ❌ ±0 

For more details on these failures, see this check.

Results for commit 60c3eaa. ± Comparison against base commit b05bd69.

@crusaderky
crusaderky merged commit 374b436 into dask:main May 7, 2026
27 of 28 checks passed
@crusaderky
crusaderky deleted the ImportError branch May 7, 2026 19:43
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.

1 participant