Changelog¶
All notable changes to this project are documented here and in CHANGELOG.md.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Latest Release
See the latest release on GitHub for the most recent changes.
Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.3.0 - 2025-08-03¶
Added¶
@ainjectdecorator: Clean async dependency injection that automatically awaits async dependenciesAsyncDependencyError: Clear error messages guiding users to use correct decorator- Strict async/sync separation:
@injectrejects async dependencies,@ainjecthandles them properly - Performance optimizations: Cached async resolver detection for better runtime performance
Breaking Changes¶
@injectbehavior change: Now rejects async dependencies with clear error messages (use@ainjectinstead)
Enhanced¶
- Error messages: More concise and actionable guidance for developers
- Code quality: Reduced duplication and improved type safety
- Documentation: Comprehensive async/await examples and usage patterns
Technical¶
- Added async resolver caching in
DependencyScopefor performance - Extracted helper functions to reduce code duplication
- Enhanced type annotations for better static analysis
0.2.0 - 2025-08-03¶
Added¶
- Async/Await Support:
DependencyScopenow supports bothwithandasync withcontext managers - Async Resolvers: New
register_async_resolver()method for async factory functions - Context Isolation: Enhanced thread and async task isolation using
contextvars - Async Utilities:
run_with_scope_context()andgather_with_scope_isolation()helper functions
Enhanced¶
- Threading Support: Improved scope management with better async task isolation
- Concurrency Safety: Eliminates race conditions in concurrent async scenarios
Technical¶
- Uses
contextvars.ContextVarinstead ofthreading.localfor scope stack management - Zero breaking changes
0.1.0 - 2024-01-20¶
Added¶
@injectdecorator for automatic dependency injectionInject[key]type-safe parameter markersDependencyScopecontext manager for explicit scope management- Thread-safe dependency registration and resolution
- Circular dependency detection at registration time
- Lazy evaluation with optional caching (
evaluate_once=True) - Support for keyword-only parameters and method chaining
- Full mypy compatibility with Python 3.11+ typing syntax
- Clear error messages and exception hierarchy
Requirements¶
- Python 3.11+
- No external dependencies