typing: Fix issue with HealthCheck.app_factory

Change I74ccf0173b6bbc62dd20ef7a13813499e0497fa9 incorrectly modified
the behavior of this method to make it behave like the 'factory' method.
Undo this.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ib375db07eb93b144b6daea86aaa53c3000d35111
This commit is contained in:
Stephen Finucane 2025-05-06 11:21:41 +01:00
parent af169707b7
commit 26dfbfdbec
2 changed files with 11 additions and 15 deletions

View File

@ -31,6 +31,7 @@ import jinja2
from oslo_utils import reflection
from oslo_utils import timeutils
import stevedore
import typing_extensions as ty_ext
import webob.dec
import webob.exc
import webob.response
@ -472,7 +473,7 @@ Reason
cls,
global_conf: dict[str, ty.Any] | None,
**local_conf: ty.Any,
) -> ty.Callable[[WSGIApplication], base.ConfigurableMiddleware]:
) -> ty_ext.Self:
"""Factory method for paste.deploy.
:param global_conf: dict of options for all middlewares
@ -484,15 +485,9 @@ Reason
"""
conf = global_conf.copy() if global_conf else {}
conf.update(local_conf)
def _factory(
app: WSGIApplication,
) -> base.ConfigurableMiddleware:
middleware = cls(app, conf)
middleware._ignore_path = True
return middleware
return _factory
middleware = cls(None, conf) # type: ignore
middleware._ignore_path = True
return middleware
@staticmethod
def _get_threadstacks() -> list[ty.Any]:

View File

@ -2,14 +2,15 @@
# date but we do not test them so no guarantee of having them all correct. If
# you find any incorrect lower bounds, let us know or propose a fix.
pbr>=2.0.0 # Apache-2.0
bcrypt>=3.1.3 # Apache-2.0
debtcollector>=1.2.0 # Apache-2.0
Jinja2>=2.10 # BSD License (3 clause)
oslo.config>=5.2.0 # Apache-2.0
oslo.context>=2.19.2 # Apache-2.0
oslo.i18n>=3.15.3 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0
stevedore>=1.20.0 # Apache-2.0
WebOb>=1.8.0 # MIT
debtcollector>=1.2.0 # Apache-2.0
pbr>=2.0.0 # Apache-2.0
statsd>=3.2.1 # MIT
bcrypt>=3.1.3 # Apache-2.0
stevedore>=1.20.0 # Apache-2.0
typing-extensions>=4.11.0 # PSF-2.0
WebOb>=1.8.0 # MIT