refactor: remove backward compatibility code for pre-launch baseline
Clean up accumulated backward-compat shims, deprecated wrappers, unused aliases, and legacy code across the codebase. Since the platform is not live yet, this establishes a clean baseline. Changes: - Delete deprecated middleware/context.py (RequestContext, get_request_context) - Remove unused factory get_store_email_settings_service() - Remove deprecated pagination_full macro, /admin/platform-homepage route - Remove ConversationResponse, InvoiceSettings* unprefixed aliases - Simplify celery_config.py (remove empty LEGACY_TASK_MODULES) - Standardize billing exceptions: *Error aliases → *Exception names - Consolidate duplicate TierNotFoundError/FeatureNotFoundError classes - Remove deprecated is_admin_request() from Store/PlatformContextManager - Remove is_platform_default field, MediaUploadResponse legacy flat fields - Remove MediaItemResponse.url alias, update JS to use file_url - Update all affected tests and documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,10 +21,6 @@ from app.modules.orders.schemas.invoice import (
|
||||
InvoiceResponse,
|
||||
# Address schemas
|
||||
InvoiceSellerDetails,
|
||||
# Backward compatibility
|
||||
InvoiceSettingsCreate,
|
||||
InvoiceSettingsResponse,
|
||||
InvoiceSettingsUpdate,
|
||||
InvoiceStatsResponse,
|
||||
InvoiceStatusUpdate,
|
||||
# Invoice settings schemas
|
||||
@@ -148,8 +144,4 @@ __all__ = [
|
||||
# PDF
|
||||
"InvoicePDFGeneratedResponse",
|
||||
"InvoiceStatsResponse",
|
||||
# Backward compatibility
|
||||
"InvoiceSettingsCreate",
|
||||
"InvoiceSettingsUpdate",
|
||||
"InvoiceSettingsResponse",
|
||||
]
|
||||
|
||||
@@ -308,9 +308,3 @@ class InvoiceStatsResponse(BaseModel):
|
||||
@property
|
||||
def total_revenue(self) -> float:
|
||||
return self.total_revenue_cents / 100
|
||||
|
||||
|
||||
# Backward compatibility re-exports
|
||||
InvoiceSettingsCreate = StoreInvoiceSettingsCreate
|
||||
InvoiceSettingsUpdate = StoreInvoiceSettingsUpdate
|
||||
InvoiceSettingsResponse = StoreInvoiceSettingsResponse
|
||||
|
||||
Reference in New Issue
Block a user