PyInj 1.1.0
PyInj 1.1.0 (stable)
Highlights:
- register_context (+ sync/async helpers) with per-scope cleanup
- immutable registrations
- clarified cleanup model; nested request scopes; async cleanup ordering
- LLM usage guide
Changelog:
- feat(container): add
register_contextfor sync/async context-managed providers with per-scope cleanup (request/session/singleton) - feat(container): enforce immutable registrations; re-registering the same token raises
ValueError - feat(api): add
register_context_syncandregister_context_asynchelpers; typed overloads onregister_context - refactor(cleanup): remove broad introspective resource tracking; container now tracks resources registered via context-managed registration while request/session scopes continue to clean up scoped resources
- docs: update examples to use
register_context_sync/async; clarify nested request scopes and async cleanup ordering - docs: add LLM Guide for concise usage in agent/tool contexts
- tests: refactor to context-managed registrations; fix asyncpg/httpx test indentation; update circular dependency expectation