internal_modules_to_public - #450
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
2234e2f to
6ad46d0
Compare
|
|
Hi! I maintain dature, a type-safe config loader built entirely on top of adaptix's custom-Provider mechanism. I'd like to propose making a handful of currently-internal symbols public, and I want to explain why — because I think dature's usage maps cleanly onto extension points you already support. The core issue: adaptix makes the abstract extension surface public — Provider, Mediator, Request, CannotProvide, loc-stack matching, Chain. That's an open invitation to write custom providers. But the moment I write a real one, every concrete type I need lives under adaptix._internal. So I'm forced to import from a private module to use a documented extension point, and any patch release can break me. Today I funnel all of it through one compat module and re-pin on every adaptix bump — which works, but it'd be much healthier as a public contract. Here's exactly what dature needs and what for: Request-handler providers — dature's skip-invalid-field and field-aliasing features are Providers that implement get_request_handlers() and wrap the loader. Those need:
Model-construction providers — dature's constructor override (call an internal factory instead of the raw dataclass) and optional-field probe (load a model but yield only the fields that succeeded) subclass ModelLoaderProvider and override provide_loader / _fetch_shape. Those need:
Shape rewriting — both of the above rebuild the shape with replace(...):
None of this reaches past the public API for convenience — it's the concrete types adaptix itself forces into the signatures of Provider and ModelLoaderProvider. Exposing them (e.g. from adaptix.provider) would let libraries like dature depend on a versioned surface, so an adaptix upgrade becomes a changelog entry rather than a broken import. |



No description provided.