allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [allura] 01/02: Switch web debugger from Backlash (fork of werkzeug) to current werkzeug
Date Wed, 10 Feb 2021 20:06:48 GMT
This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/nicer_debug_errors
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 386a1bfb79f5ef5e1e2da9a2beec08a6efcf09fe
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
AuthorDate: Wed Feb 10 15:06:24 2021 -0500

    Switch web debugger from Backlash (fork of werkzeug) to current werkzeug
---
 Allura/allura/config/middleware.py | 5 ++---
 requirements.in                    | 2 +-
 requirements.txt                   | 4 ++--
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/Allura/allura/config/middleware.py b/Allura/allura/config/middleware.py
index a4f8132..3a87b88 100644
--- a/Allura/allura/config/middleware.py
+++ b/Allura/allura/config/middleware.py
@@ -36,6 +36,7 @@ from tg.support.middlewares import StatusCodeRedirect
 from beaker.middleware import SessionMiddleware
 from beaker.util import PickleSerializer
 from paste.exceptions.errormiddleware import ErrorMiddleware
+from werkzeug.debug import DebuggedApplication
 
 import activitystream
 import ew
@@ -203,9 +204,7 @@ def _make_core_app(root, global_conf, full_stack=True, **app_conf):
     if config.get('override_root') not in ('task', 'basetest_project_root'):
         if asbool(config['debug']):
             # Converts exceptions to HTTP errors, shows traceback in debug mode
-            # don't use TG footer with extra CSS & images that take time to load
-            tg.error.footer_html = '<!-- %s %s -->'
-            app = tg.error.ErrorHandler(app, global_conf, **config['tg.errorware'])
+            app = DebuggedApplication(app, evalex=True)
         else:
             app = ErrorMiddleware(app, config, **config['tg.errorware'])
 
diff --git a/requirements.in b/requirements.in
index 16c75c9..dc4e223 100644
--- a/requirements.in
+++ b/requirements.in
@@ -1,7 +1,6 @@
 ActivityStream==0.3.0
 beautifulsoup4
 Beaker
-backlash==0.1.4
 chardet
 colander==1.7.0
 cryptography
@@ -50,6 +49,7 @@ TimerMiddleware==0.5.1
 TurboGears2==2.3.12
 WebHelpers2
 WebOb==1.7.4
+werkzeug
 wrapt==1.11.2
 
 # testing
diff --git a/requirements.txt b/requirements.txt
index 0177650..14651d5 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -5,7 +5,6 @@
 #    pip-compile
 #
 activitystream==0.3.0     # via -r requirements.in
-backlash==0.1.4           # via -r requirements.in
 backports.functools-lru-cache==1.5  # via soupsieve
 backports.shutil-get-terminal-size==1.0.0  # via ipython
 beaker==1.10.1            # via -r requirements.in
@@ -95,8 +94,9 @@ waitress==1.4.3           # via webtest
 wcwidth==0.1.7            # via prompt-toolkit
 webencodings==0.5.1       # via bleach, html5lib
 webhelpers2==2.0          # via -r requirements.in
-webob==1.7.4              # via -r requirements.in, backlash, easywidgets, timermiddleware,
turbogears2, webtest
+webob==1.7.4              # via -r requirements.in, easywidgets, timermiddleware, turbogears2,
webtest
 webtest==2.0.33           # via -r requirements.in
+werkzeug==1.0.1           # via -r requirements.in
 wrapt==1.11.2             # via -r requirements.in
 
 # The following packages are considered to be unsafe in a requirements file:


Mime
View raw message