Skip to content

fix: handle None module in module_available()#11448

Open
driphtyio wants to merge 1 commit into
pydata:mainfrom
driphtyio:fix-module-available
Open

fix: handle None module in module_available()#11448
driphtyio wants to merge 1 commit into
pydata:mainfrom
driphtyio:fix-module-available

Conversation

@driphtyio

Copy link
Copy Markdown

When module_available() is called with None (e.g., through a third-party plugin import chain), importlib.util.find_spec(None) raises TypeError. Add an explicit None guard that returns False instead. Also updates type hint.

Add guard for module=None in module_available() to avoid
TypeError from find_spec(None). Returns False instead.

Closes pydata#11344
@welcome

welcome Bot commented Jul 10, 2026

Copy link
Copy Markdown

Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our contributing guidelines.

@github-actions github-actions Bot added the topic-NamedArray Lightweight version of Variable label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic-NamedArray Lightweight version of Variable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant