Skip to content

PyInj 1.1.0

Choose a tag to compare

@mishaal79 mishaal79 released this 04 Sep 10:06

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_context for 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_sync and register_context_async helpers; typed overloads on register_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