Handle missing nested packages in package_is_available - #76
Sanjays2402 wants to merge 1 commit into
Conversation
|
Hi @Sanjays2402 Can you give an example of why we need this? |
|
Sure — the concrete case is the msgspec extra: |
|
Thanks I'm still not convinced that this change is required. The function is very clearly scoped to packages rather than modules, it's only use within python-json-logger is with packages, and it is for internal use rather than external consumption. Without a valid reason I'm inclined to close this pull request. |
importlib.util.find_spec raises ModuleNotFoundError for missing parents in dotted module names. Treat missing modules in the requested name as unavailable while preserving unrelated dependency errors.