4.0.1 — 2025-12-10¶
← 4.0.2 | 4.0.0 → | ↑ 4.x series
Added¶
Helpers - Decorators¶
- Comprehensive Cache Decorator BDD Tests - Added extensive BDD test suite for cache decorators
- Test scenarios for function caching with TTL expiration
- Test scenarios for async function caching
- Test scenarios for method caching (both sync and async)
- Test scenarios for bound method caching with instance isolation
- Test scenarios for cache key generation with different argument types
- Test scenarios for cache invalidation and clearing
- Test scenarios for cache statistics and monitoring
- Test scenarios for error handling and edge cases
Fixed¶
Helpers - Decorators¶
-
Bound Method Caching - Fixed cache decorator to properly handle bound methods
- Fixed cache key generation for bound methods to include instance identity
- Ensures each instance has its own cache namespace
- Prevents cache collisions between different instances of the same class
- Improved cache statistics tracking for bound methods
-
Type Checker Errors - Resolved all Ty type checker errors (22 fixes)
- Refactored decorators with
ParamSpecfor proper type preservation - Implemented descriptor protocol for cache decorator
- Updated port interfaces with correct type annotations
- Added
TYPE_CHECKINGimports for better type checking - No
cast()usage - all types properly inferred
- Refactored decorators with
Changed¶
Development Tools¶
- Type Checker Migration - Migrated from MyPy to Ty type checker
- Replaced MyPy with Ty for Python 3.14 type checking
- Updated all type hints to use Python 3.14 syntax (
|for unions, lowercase built-ins) - Updated Makefile to use
ty checkinstead ofmypy - Changed cache directory from
.mypy_cache/to.ty_cache/ - Updated pre-commit hooks to use Ty
- Updated documentation and contributing guides
Dependencies¶
-
Optional Dependencies
- Updated
fastapifrom>=0.124.0to>=0.124.2 - Updated
sqlalchemyfrom>=2.0.44to>=2.0.45
- Updated
-
Development Dependencies
- Removed
mypy>=1.19.0 - Added
ty(Ty type checker) - Updated
types-protobuffrom>=6.32.1.20251105to>=6.32.1.20251210
- Removed