From 7b5243fa8d18bdcab66b64f3d3cac167a38161d5 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 18 Aug 2025 20:33:50 +0900 Subject: [PATCH] Resolve deprecation warning from pecan Resolve the following warning raised from pecan. ``` DeprecationWarning: The function signature for watcher.api.controllers.root.RootController._route is changing in the next version of pecan. Please update to: `def _route(self, args, request)`. ``` Change-Id: I7081cf956a8baa05cd70ced0496ca8192fff979e Signed-off-by: Takashi Kajinami --- watcher/api/controllers/root.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/watcher/api/controllers/root.py b/watcher/api/controllers/root.py index 835b33c65..a2706edbd 100644 --- a/watcher/api/controllers/root.py +++ b/watcher/api/controllers/root.py @@ -109,7 +109,7 @@ class RootController(rest.RestController): return Root.convert() @pecan.expose() - def _route(self, args): + def _route(self, args, request=None): """Overrides the default routing behavior. It redirects the request to the default version of the watcher API @@ -118,4 +118,4 @@ class RootController(rest.RestController): if args[0] and args[0] not in self._versions: args = [self._default_version] + args - return super(RootController, self)._route(args) + return super(RootController, self)._route(args, request)