Commit f4c409e
authored
refactor: centralize optional-dependency typing shims (#719)
## Summary
Centralizes every optional-dependency feature flag and stub type into a single canonical module, and stops internal code from reaching into private `_typing` modules.
## Changes
- Make `advanced_alchemy/_typing.py` the single source of truth for all `*_INSTALLED` flags and optional-dependency stub types (pydantic, msgspec, attrs, cattrs, litestar, sqlmodel, numpy, orjson).
- Re-export the full surface from the public `advanced_alchemy/typing.py`.
- Delete `advanced_alchemy/service/_typing.py` — its contents were generic shims with nothing service-specific.
- Update internal callers (`service/__init__.py`, `service/_util.py`, `service/typing.py`, `repository/_typing.py`) to import from `advanced_alchemy.typing` instead of reaching into private `_typing` modules.1 parent 437d56e commit f4c409e
14 files changed
Lines changed: 2412 additions & 1701 deletions
File tree
- advanced_alchemy
- mixins
- repository
- service
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments