fix: Eliminate all 111 test warnings by fixing root causes
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
Some checks failed
Test Suite / unit-tests (3.11) (push) Has been cancelled
Test Suite / unit-tests (3.12) (push) Has been cancelled
Test Suite / integration-tests (push) Has been cancelled
Test Suite / e2e-tests (push) Has been cancelled
Test Suite / performance-tests (push) Has been cancelled
Test Suite / code-quality (push) Has been cancelled
Test Suite / security-scan (push) Has been cancelled
Test Suite / test-summary (push) Has been cancelled
- Replace deprecated datetime.utcnow() with datetime.now(timezone.utc) across all domain models, services, infrastructure, and test files - Add missing timezone imports to all affected files - Fix pytest.ini configuration format from [tool:pytest] to [pytest] - Remove warning suppressions to expose actual issues - Ensure proper pytest marker registration for smoke tests Results: - 305 passed, 2 skipped, 0 warnings (down from 111 warnings) - All functionality preserved with modern datetime API usage - Improved code quality by addressing root causes vs suppression 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ import uuid
|
||||
from infrastructure.logging import get_logger
|
||||
from typing import List, Optional
|
||||
from pathlib import Path
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import datetime, timedelta, timezone
|
||||
|
||||
from infrastructure.repositories.interfaces import WorkspaceRepository
|
||||
from infrastructure.exceptions import (
|
||||
@@ -78,7 +78,7 @@ class FilesystemWorkspaceRepository(WorkspaceRepository):
|
||||
# Create workspace metadata file
|
||||
metadata = {
|
||||
"id": workspace_id,
|
||||
"created_at": datetime.utcnow().isoformat(),
|
||||
"created_at": datetime.now(timezone.utc).isoformat(),
|
||||
"version": "1.0",
|
||||
"type": "markitect_workspace"
|
||||
}
|
||||
@@ -348,7 +348,7 @@ class FilesystemWorkspaceRepository(WorkspaceRepository):
|
||||
logger.info(f"Starting cleanup of workspaces older than {days_threshold} days")
|
||||
|
||||
try:
|
||||
cutoff_date = datetime.utcnow() - timedelta(days=days_threshold)
|
||||
cutoff_date = datetime.now(timezone.utc) - timedelta(days=days_threshold)
|
||||
deleted_count = 0
|
||||
|
||||
if not self.base_path.exists():
|
||||
|
||||
Reference in New Issue
Block a user