From 8d90a74624631745ea7f4964a4f7b55a5c27ad46 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 2 Nov 2021 15:39:41 +0100 Subject: [PATCH] update werkzeug to 1.x --- core/admin/mailu/debug.py | 4 ++-- core/admin/mailu/utils.py | 4 ++-- core/admin/requirements-prod.txt | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/admin/mailu/debug.py b/core/admin/mailu/debug.py index 7677901b..4d63f3c5 100644 --- a/core/admin/mailu/debug.py +++ b/core/admin/mailu/debug.py @@ -1,6 +1,6 @@ import flask_debugtoolbar -from werkzeug.contrib import profiler as werkzeug_profiler +from werkzeug.middleware.profiler import ProfilerMiddleware # Debugging toolbar @@ -10,7 +10,7 @@ toolbar = flask_debugtoolbar.DebugToolbarExtension() # Profiler class Profiler(object): def init_app(self, app): - app.wsgi_app = werkzeug_profiler.ProfilerMiddleware( + app.wsgi_app = ProfilerMiddleware( app.wsgi_app, restrictions=[30] ) diff --git a/core/admin/mailu/utils.py b/core/admin/mailu/utils.py index dda927b0..eddd6848 100644 --- a/core/admin/mailu/utils.py +++ b/core/admin/mailu/utils.py @@ -28,7 +28,7 @@ import redis from flask.sessions import SessionMixin, SessionInterface from itsdangerous.encoding import want_bytes from werkzeug.datastructures import CallbackDict -from werkzeug.contrib import fixers +from werkzeug.middleware.proxy_fix import ProxyFix # Login configuration login = flask_login.LoginManager() @@ -109,7 +109,7 @@ class PrefixMiddleware(object): return self.app(environ, start_response) def init_app(self, app): - self.app = fixers.ProxyFix(app.wsgi_app, x_for=1, x_proto=1) + self.app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1) app.wsgi_app = self proxy = PrefixMiddleware() diff --git a/core/admin/requirements-prod.txt b/core/admin/requirements-prod.txt index 38717145..673c4445 100644 --- a/core/admin/requirements-prod.txt +++ b/core/admin/requirements-prod.txt @@ -19,7 +19,7 @@ dnspython==1.16.0 dominate==2.3.5 email-validator==1.1.3 Flask==1.0.2 -Flask-Babel==0.12.2 +Flask-Babel==1.0.0 Flask-Bootstrap==3.3.7.1 Flask-DebugToolbar==0.10.1 Flask-Limiter==1.0.1 @@ -28,7 +28,7 @@ flask-marshmallow==0.14.0 Flask-Migrate==2.4.0 Flask-Script==2.0.6 Flask-SQLAlchemy==2.4.0 -Flask-WTF==0.14.2 +Flask-WTF==0.15.1 gunicorn==20.1.0 html5lib==1.1 idna==2.8 @@ -72,6 +72,6 @@ urllib3==1.26.5 validators==0.12.6 visitor==0.1.3 webencodings==0.5.1 -Werkzeug==0.15.5 +Werkzeug==1.0.1 WTForms==2.3.3 WTForms-Components==0.10.5