From b84075043dbe9303cd26f0dd7901a897bad5f4bb Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 25 Jan 2021 10:40:10 -0800 Subject: [PATCH] performance: Fix failure to start due to lru_cache in stable Ability to use lru_cache(user_function) was only introduced in Python 3.8. Buster has Python 3.7. This causes startup failure in Buster. Fix this by using the older API for lru_cache instead of the new one. Tests: - On stable and testing, starting the Plinth daemon and visiting the performance page should work. - Adding a print statement in the _get_url() method shows that it is only called once, ever. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/performance/manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/modules/performance/manifest.py b/plinth/modules/performance/manifest.py index 43ac3a92d..907e33a14 100644 --- a/plinth/modules/performance/manifest.py +++ b/plinth/modules/performance/manifest.py @@ -12,7 +12,7 @@ from django.utils.translation import ugettext_lazy as _ from plinth.utils import Version -@lru_cache +@lru_cache() def _get_url(): """Return the web client URL based on Cockpit version.""" process = subprocess.run(