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:
@@ -15,7 +15,6 @@ from app.modules.cms.services.media_service import (
|
||||
)
|
||||
from app.modules.cms.services.store_email_settings_service import (
|
||||
StoreEmailSettingsService,
|
||||
get_store_email_settings_service, # Deprecated: use store_email_settings_service
|
||||
store_email_settings_service,
|
||||
)
|
||||
from app.modules.cms.services.store_theme_service import (
|
||||
@@ -32,5 +31,4 @@ __all__ = [
|
||||
"store_theme_service",
|
||||
"StoreEmailSettingsService",
|
||||
"store_email_settings_service",
|
||||
"get_store_email_settings_service", # Deprecated
|
||||
]
|
||||
|
||||
@@ -481,14 +481,3 @@ class StoreEmailSettingsService:
|
||||
|
||||
# Module-level service instance (singleton pattern)
|
||||
store_email_settings_service = StoreEmailSettingsService()
|
||||
|
||||
|
||||
# Deprecated: Factory function for backwards compatibility
|
||||
def get_store_email_settings_service(db: Session) -> StoreEmailSettingsService:
|
||||
"""
|
||||
Factory function to get a StoreEmailSettingsService instance.
|
||||
|
||||
Deprecated: Use the singleton `store_email_settings_service` instead and pass
|
||||
`db` to individual methods.
|
||||
"""
|
||||
return store_email_settings_service
|
||||
|
||||
Reference in New Issue
Block a user