Releases: krabhishek/opusgenie-di
Releases Β· krabhishek/opusgenie-di
Release list
Release v0.1.8
Improved
- π§ Enhanced Type Support: Comprehensive improvements to type checking and stub files
- Complete Stub Files: Auto-generated
.pyistub files for all modules usingstubgen - Type Safety: Resolved all MyPy type checking errors across the entire codebase
- Lint Compliance: Fixed all Ruff lint errors including unused imports and naming conventions
- CI Integration: Added automatic stub file generation to GitHub Actions release workflow
- Developer Experience: Improved IDE support with accurate type hints and autocompletion
- Complete Stub Files: Auto-generated
Fixed
- π Stub File Quality: Fixed missing method signatures in type stub files
- Added missing
enable_auto_wiring()andshutdown()methods to Context class stubs - Corrected TypeVar naming conventions to follow PYI standards
- Removed unused imports and resolved all stub file inconsistencies
- Added missing
- π οΈ Configuration Issues: Fixed regex patterns in MyPy and Ruff configuration
- Corrected
.pyifile exclusion patterns to prevent linting errors - Improved build tool configuration for better type checking workflow
- Corrected
Added
- π Automated Stub Generation: GitHub Actions workflow now automatically generates type stubs before PyPI release
- Ensures published packages always have complete and up-to-date type information
- Validates stub file quality as part of the CI/CD pipeline
- Maintains consistency between implementation and type declarations
Technical Details
- Integrated
stubgenfrom MyPy for automatic stub file generation - Enhanced pyproject.toml configuration for better tool integration
- Improved developer workflow with comprehensive type checking support
- All type stubs now include private methods, docstrings, and complete signatures
Release v0.1.7
Release v0.1.6
updated docs. release v0.1.6
Release v0.1.5
added typehints and fixed lints
Release v0.1.4
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(), andcleanup()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
- Supports string-based forward references like
- π§ Global Context Reset: Fixed global context reset functionality for proper test isolation
reset_global_context()now properly sets global context instance to Noneis_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_wiresetting - Contexts can be created with
auto_wire=Falseand 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
- Added
- π§ͺ Test Assertions: Fixed summary test assertions to check for class objects instead of class names
- π§ͺ Exception Test Syntax: Fixed invalid
fromclause 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
Release v0.1.3
Fixed
- π PyPI Release Process: Fixed workflow to allow PyPI deployment when TestPyPI already has the version
- π§ Release Workflow: Made TestPyPI dependency optional for PyPI deployment
- π Workflow Security: Added least-privilege permissions to all GitHub Actions jobs
Added
- π Security Enhancements: Comprehensive security measures including branch protection
- π Security Documentation: Added SECURITY.md with detailed security policies