fix: Code quality improvements for v5.2.2 release

- Fix pagination bug using continuation_token instead of start_after
- Add stats caching to prevent blocking web apps
- Improve code formatting and type checking
- Add comprehensive unit tests for new features
- Fix test mock usage in object_listing tests
This commit is contained in:
Simone Scarduzio
2025-10-14 23:54:49 +02:00
parent ff05e77c24
commit e1259b7ea8
26 changed files with 2581 additions and 369 deletions

View File

@@ -57,9 +57,10 @@ while response.get('IsTruncated'):
# Get detailed compression stats only when needed
response = client.list_objects(Bucket='releases', FetchMetadata=True) # Slower but detailed
# Quick bucket statistics
stats = client.get_bucket_stats('releases') # Fast overview
stats = client.get_bucket_stats('releases', detailed_stats=True) # With compression metrics
# Bucket statistics with intelligent S3-based caching (NEW!)
stats = client.get_bucket_stats('releases') # Fast (~100ms with cache)
stats = client.get_bucket_stats('releases', mode='detailed') # Accurate compression metrics
stats = client.get_bucket_stats('releases', refresh_cache=True) # Force fresh computation
client.delete_object(Bucket='releases', Key='old-version.zip')
```