From 058bdf0e666bcc29c0d9f232ddb414ceb248dacb Mon Sep 17 00:00:00 2001 From: Jennifer Taylor Date: Thu, 26 Sep 2024 00:42:02 +0000 Subject: [PATCH] Fix profiling middleware hooks. --- bemani/utils/api.py | 2 +- bemani/utils/frontend.py | 2 +- bemani/utils/services.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bemani/utils/api.py b/bemani/utils/api.py index f2ccc67..fd05bd6 100644 --- a/bemani/utils/api.py +++ b/bemani/utils/api.py @@ -50,7 +50,7 @@ def main() -> None: config["database"]["read_only"] = True if args.profile: - from werkzeug.contrib.profiler import ProfilerMiddleware + from werkzeug.middleware.profiler import ProfilerMiddleware app.wsgi_app = ProfilerMiddleware(app.wsgi_app, profile_dir=".") # type: ignore diff --git a/bemani/utils/frontend.py b/bemani/utils/frontend.py index 5fd3a92..f7220a0 100644 --- a/bemani/utils/frontend.py +++ b/bemani/utils/frontend.py @@ -103,7 +103,7 @@ def main() -> None: register_games() if args.profile: - from werkzeug.contrib.profiler import ProfilerMiddleware + from werkzeug.middleware.profiler import ProfilerMiddleware app.wsgi_app = ProfilerMiddleware(app.wsgi_app, profile_dir=".") # type: ignore diff --git a/bemani/utils/services.py b/bemani/utils/services.py index f2a9a24..ebf416b 100644 --- a/bemani/utils/services.py +++ b/bemani/utils/services.py @@ -170,7 +170,7 @@ if __name__ == "__main__": register_games() if args.profile: - from werkzeug.contrib.profiler import ProfilerMiddleware + from werkzeug.middleware.profiler import ProfilerMiddleware app.wsgi_app = ProfilerMiddleware(app.wsgi_app, profile_dir=".") # type: ignore