Skip to content

Commit a7fd76c

Browse files
chore: update dependencies and changelog for cache decorator improvements
1 parent b23d0c3 commit a7fd76c

3 files changed

Lines changed: 100 additions & 36 deletions

File tree

docs/changelog.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,62 @@
22

33
All notable changes to ArchiPy are documented in this changelog, organized by version.
44

5+
## [v4.0.1] - 2025-12-10
6+
7+
### Added
8+
9+
#### Helpers - Decorators
10+
11+
- **Comprehensive Cache Decorator BDD Tests** - Added extensive BDD test suite for cache decorators
12+
- Test scenarios for function caching with TTL expiration
13+
- Test scenarios for async function caching
14+
- Test scenarios for method caching (both sync and async)
15+
- Test scenarios for bound method caching with instance isolation
16+
- Test scenarios for cache key generation with different argument types
17+
- Test scenarios for cache invalidation and clearing
18+
- Test scenarios for cache statistics and monitoring
19+
- Test scenarios for error handling and edge cases
20+
21+
### Fixed
22+
23+
#### Helpers - Decorators
24+
25+
- **Bound Method Caching** - Fixed cache decorator to properly handle bound methods
26+
- Fixed cache key generation for bound methods to include instance identity
27+
- Ensures each instance has its own cache namespace
28+
- Prevents cache collisions between different instances of the same class
29+
- Improved cache statistics tracking for bound methods
30+
31+
- **Type Checker Errors** - Resolved all Ty type checker errors (22 fixes)
32+
- Refactored decorators with `ParamSpec` for proper type preservation
33+
- Implemented descriptor protocol for cache decorator
34+
- Updated port interfaces with correct type annotations
35+
- Added `TYPE_CHECKING` imports for better type checking
36+
- No `cast()` usage - all types properly inferred
37+
38+
### Changed
39+
40+
#### Development Tools
41+
42+
- **Type Checker Migration** - Migrated from MyPy to Ty type checker
43+
- Replaced MyPy with Ty for Python 3.14 type checking
44+
- Updated all type hints to use Python 3.14 syntax (`|` for unions, lowercase built-ins)
45+
- Updated Makefile to use `ty check` instead of `mypy`
46+
- Changed cache directory from `.mypy_cache/` to `.ty_cache/`
47+
- Updated pre-commit hooks to use Ty
48+
- Updated documentation and contributing guides
49+
50+
#### Dependencies
51+
52+
- **Optional Dependencies**
53+
- Updated `fastapi` from `>=0.124.0` to `>=0.124.2`
54+
- Updated `sqlalchemy` from `>=2.0.44` to `>=2.0.45`
55+
56+
- **Development Dependencies**
57+
- Removed `mypy>=1.19.0`
58+
- Added `ty` (Ty type checker)
59+
- Updated `types-protobuf` from `>=6.32.1.20251105` to `>=6.32.1.20251210`
60+
561
## [v4.0.0] - 2025-12-08
662

763
### Changed

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ elastic-apm = ["elastic-apm>=6.24.1"]
2626
elasticsearch = ["elasticsearch>=9.2.0"]
2727
elasticsearch-async = ["elasticsearch[async]>=9.2.0"]
2828
fakeredis = ["fakeredis>=2.32.1"]
29-
fastapi = ["fastapi[all]>=0.124.0"]
29+
fastapi = ["fastapi[all]>=0.124.2"]
3030
grpc = ["grpcio>=1.76.0", "grpcio-health-checking>=1.76.0", "protobuf>=6.33.1"]
3131
jwt = ["pyjwt>=2.10.1"]
3232
kafka = ["confluent-kafka>=2.12.2"]
@@ -40,7 +40,7 @@ redis = ["redis[hiredis]>=7.1.0"]
4040
scheduler = ["apscheduler>=3.11.1"]
4141
scylladb = ["scylla-driver>=3.29.6", "lz4>=4.4.5", "cachetools>=6.2.2", "async-lru>=2.0.5"]
4242
sentry = ["sentry-sdk>=2.47.0"]
43-
sqlalchemy = ["sqlalchemy>=2.0.44"]
43+
sqlalchemy = ["sqlalchemy>=2.0.45"]
4444
starrocks = ["starrocks>=1.3.1", "pymysql>=1.1.2"]
4545
starrocks-async = ["starrocks>=1.3.1", "aiomysql>=0.3.2"]
4646
temporalio = ["temporalio>=1.20.0"]
@@ -74,7 +74,7 @@ dev = [
7474
"ruff>=0.14.7",
7575
"types-cachetools>=6.2.0.20251022",
7676
"types-grpcio>=1.0.0.20251009",
77-
"types-protobuf>=6.32.1.20251105",
77+
"types-protobuf>=6.32.1.20251210",
7878
"types-pymysql>=1.1.0.20250916",
7979
"types-regex>=2025.11.3.20251106",
8080
"types-requests>=2.32.4.20250913",

0 commit comments

Comments
 (0)