Releases
v0.1.4
Compare
Sorry, something went wrong.
No results found
Added
π Comprehensive Async Lifecycle Management : Revolutionary async/await support for robust production applications
EventLoopManager : Centralized event loop management for guaranteed async execution
Async Component Lifecycle : Full support for async initialize(), start(), stop(), and cleanup() methods
Mixed Sync/Async Support : Automatic fallback between async and sync lifecycle methods
Thread-Safe Execution : Safe async operations in any context with proper event loop handling
π Event-Driven Monitoring : Lifecycle callbacks for component observability
Component creation and disposal events
Configurable lifecycle callbacks on ScopeManager
Real-time monitoring of component lifecycle events
π Enhanced Component Disposal : Improved cleanup with proper async handling
Async disposal through EventLoopManager integration
Graceful fallback when no event loop is available
Support for multiple disposal methods (cleanup, dispose, close, shutdown)
π Runtime Circular Dependency Detection : Comprehensive runtime detection of circular dependencies with detailed error reporting
Thread-safe resolution chain tracking using thread-local storage
Clear error messages showing complete dependency chains
Support for forward references in type hints (e.g., "ServiceB")
Zero performance impact when no circular dependencies exist
π Enhanced Documentation : Added comprehensive sections to README
Async lifecycle management with examples
Event-driven monitoring capabilities
Mixed sync/async patterns and best practices
Circular dependency detection examples and best practices
Improved
Test Reliability : Fixed 24 failing tests and achieved 100% test suite reliability
Test Coverage : Improved from 81% to 84% code coverage
Component Lifecycle : Enhanced BaseComponent with both sync and async lifecycle variants
Error Handling : Better async error handling and reporting throughout the framework
Fixed
Async Disposal Issues : Resolved async component disposal in mixed sync/async environments
Event Loop Management : Fixed event loop availability issues in testing and production
Module Builder : Corrected error handling in ContextModuleBuilder
Registry Management : Fixed duplicate module registration cleanup
Forward Reference Resolution : Fixed type hint resolution for forward references in dependency injection
Supports string-based forward references like "ComponentB" in constructor parameters
π§ Global Context Reset : Fixed global context reset functionality for proper test isolation
reset_global_context() now properly sets global context instance to None
is_global_context_initialized() correctly returns False after reset
Fixed singleton instance cleanup in GlobalContext class
π§ Auto-Wiring Control : Fixed auto-wiring enable/disable functionality
enable_auto_wiring() method now properly sets the context's auto-wire flag
Auto-wiring factory respects context's _auto_wire setting
Contexts can be created with auto_wire=False and later enabled
π§ͺ Test Configuration : Added pytest-asyncio configuration for async test support
Added asyncio_mode = "auto" to pyproject.toml
Fixed async test execution in global context tests
π§ͺ Test Assertions : Fixed summary test assertions to check for class objects instead of class names
π§ͺ Exception Test Syntax : Fixed invalid from clause usage in exception tests
Improved
β‘ Dependency Resolution : Enhanced type hint resolution with proper module globals handling
π Error Reporting : CircularDependencyError includes complete dependency chain for debugging
π‘οΈ Thread Safety : Resolution chain tracking is thread-safe using thread-local storage
π§ͺ Test Coverage : All core functionality tests now pass (37/37 tests in key areas)
Technical Details
Added thread-local resolution chain tracking in container_impl.py
Enhanced get_constructor_dependencies() to resolve forward references correctly
Improved global context lifecycle management and singleton behavior
Fixed context auto-wiring state management
You canβt perform that action at this time.