Repository navigation
4.0.0a1
Pre-release
Pre-release
Second alpha release of FastDepends 4.0.
Msgspec hooks
- Add keyword-only
enc_hookandschema_hookoptions toMsgSpecSerializer, alongside the existingdec_hook. - Reuse the configured JSON encoder across serializers created by the same factory. Factory-level and bound encoding preserve custom
encode()overrides and raw root-byte passthrough. - Apply
schema_hookto input and response JSON schemas, including dependency inputs, filtered fields and custom-field source groups. Native Struct metadata remains supported.
Async custom fields
- Avoid opening an AnyIO task group when no custom field uses
field=True. - This removes an implicit scheduling checkpoint for sequential custom fields. The order in which other async tasks run, and when cancellation is observed, can therefore change. Code that needs an explicit checkpoint should provide one.
- Synchronous
use()hooks continue to run in the worker thread pool; concurrentfield=Trueresolution and exception unwrapping are preserved.
@inject continues to return validated Python values. JSON encoding remains an explicit operation.
Install this alpha explicitly:
pip install 'fast-depends[msgspec]==4.0.0a1'Full changelog: 4.0.0a0...4.0.0a1