The lazy module __getattr__ on genblaze_core raises OptionalDependencyError, which does not subclass AttributeError, when the parquet extra is not installed. hasattr only swallows AttributeError, so capability probing crashes instead of returning False:
>>> import genblaze_core
>>> hasattr(genblaze_core, "ParquetSink")
OptionalDependencyError: ...
This breaks the standard feature-detection idiom, and also inspect and some IDE introspection that walk module attributes.
This is related to #40 (using OptionalDependencyError for guards), but the specific problem here is that raising it from __getattr__ makes hasattr and getattr(module, name, default) throw rather than behave.
Suggested fix: raise an error that subclasses both OptionalDependencyError and AttributeError (keeping the install hint in the message), or catch and re-raise as AttributeError from __getattr__.
Environment: genblaze-core 0.3.4, Python 3.14.
The lazy module
__getattr__ongenblaze_coreraisesOptionalDependencyError, which does not subclassAttributeError, when the parquet extra is not installed.hasattronly swallowsAttributeError, so capability probing crashes instead of returningFalse:This breaks the standard feature-detection idiom, and also
inspectand some IDE introspection that walk module attributes.This is related to #40 (using
OptionalDependencyErrorfor guards), but the specific problem here is that raising it from__getattr__makeshasattrandgetattr(module, name, default)throw rather than behave.Suggested fix: raise an error that subclasses both
OptionalDependencyErrorandAttributeError(keeping the install hint in the message), or catch and re-raise asAttributeErrorfrom__getattr__.Environment: genblaze-core 0.3.4, Python 3.14.