Lazy Imports and Deprecations¶
Goal¶
Expose a stable module API while deferring heavyweight imports.
Steps¶
- Add lazy import entries in
Monkay(..., lazy_imports=...). - Add deprecated lazy imports for renamed attributes.
- Keep
__all__synchronized via automatic update orupdate_all_var. - Use
uncached_importsfor values that must refresh on each access.
Example¶
See Reference: tutorial and Reference: specials.
Regression Checks¶
- Access each lazy attribute at least once in tests.
- Assert warning text for deprecated lazy imports.
- Validate exports using
find_missing()in test helpers.