Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

fix(services): drop @classmethod stacked on @staticmethod

Juan Denis5ecc0a86bbf2
diff --git a/backend/app/services/cron_service.py b/backend/app/services/cron_service.py
index 6363534a..33e7a40c 100644
--- a/backend/app/services/cron_service.py
+++ b/backend/app/services/cron_service.py
@@ -793,7 +793,9 @@ class CronService:
# Application attribution (member-facing surface)
# ------------------------------------------------------------------ #
- @classmethod
+ # Plain @staticmethod — see the note on SystemService._is_iana_timezone.
+ # @classmethod stacked on @staticmethod breaks on Python 3.13, which removed
+ # classmethod descriptor chaining; cls then leaks in as the first argument.
@staticmethod
def _same_application(candidate, application_id) -> bool:
"""Do these two ids name the same app? Ids arrive as int or str."""
diff --git a/backend/app/services/system_service.py b/backend/app/services/system_service.py
index c56af33a..5364baf6 100644
--- a/backend/app/services/system_service.py
+++ b/backend/app/services/system_service.py
@@ -272,7 +272,12 @@ class SystemService:
return ' '.join(parts) if parts else '0m'
- @classmethod
+ # Plain @staticmethod. It was @classmethod stacked on @staticmethod, which
+ # only ever worked because 3.9 let classmethod chain to another descriptor —
+ # deprecated in 3.11, REMOVED in 3.13, where the chain stops collapsing and
+ # `cls._is_iana_timezone(tz)` starts passing cls as the first argument:
+ # "takes 1 positional argument but 2 were given". Calling a staticmethod
+ # through `cls.` is fine, so the call sites need no change.
@staticmethod
def _is_iana_timezone(value):
"""True if `value` looks like an IANA zone key (Area/Location or a small