Drop usage of thread-local request instance

Usage of thread-local request instance was deprecated long ago[1] and
pecan now recommends passing a request instance directly in
the arguments.

[1] https://github.com/pecan/pecan/commit/16e2dd0e26a9e1ed1276faa59ce895bad63849ca

Change-Id: Ie08d78c5b044cdc8208cdc5784fc3f4a7fd365e8
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2026-05-20 08:17:26 +00:00
parent d74cbfa772
commit bc11142e4a
+2 -2
View File
@@ -71,7 +71,7 @@ class V2Controller(rest.RestController):
LOG.debug("Loaded extensions: %s", extensions)
@pecan.expose()
def _route(self, args):
def _route(self, args, request):
"""Overrides the default routing behavior.
It allows to map controller URL with correct controller instance.
@@ -87,4 +87,4 @@ class V2Controller(rest.RestController):
args[0] = route
except IndexError:
LOG.error("No args found on V2 controller")
return super(V2Controller, self)._route(args)
return super(V2Controller, self)._route(args, request)