You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by di...@apache.org on 2021/02/25 18:22:08 UTC

[allura] branch master updated (8c14791 -> e3fe8c8)

This is an automated email from the ASF dual-hosted git repository.

dill0wn pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git.


    from 8c14791  SF-5746 use project icon file hash for cache busting
     new 07ec7ff  Switch web debugger from Backlash (fork of werkzeug) to current werkzeug
     new e3fe8c8  shorter tracebacks on error debug pages

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Allura/allura/config/middleware.py | 5 ++---
 Allura/allura/lib/patches.py       | 3 +++
 requirements.in                    | 2 +-
 requirements.txt                   | 4 ++--
 4 files changed, 8 insertions(+), 6 deletions(-)


[allura] 02/02: shorter tracebacks on error debug pages

Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dill0wn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit e3fe8c8a881f62e00e2bc8df896cbc67eec52917
Author: Dave Brondsema <db...@slashdotmedia.com>
AuthorDate: Wed Feb 10 15:06:39 2021 -0500

    shorter tracebacks on error debug pages
---
 Allura/allura/lib/patches.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Allura/allura/lib/patches.py b/Allura/allura/lib/patches.py
index 5eefc39..7f77ba8 100644
--- a/Allura/allura/lib/patches.py
+++ b/Allura/allura/lib/patches.py
@@ -74,6 +74,7 @@ def apply():
     @decorator
     def without_trailing_slash(func, *args, **kwargs):
         '''Monkey-patched to use 301 redirects for SEO, and handle query strings'''
+        __traceback_hide__ = 'before_and_this'  # for paste/werkzeug shorter traces
         response_type = getattr(request, 'response_type', None)
         if (request.method == 'GET' and request.path.endswith('/') and not response_type):
             location = request.path_url[:-1]
@@ -86,6 +87,7 @@ def apply():
     @decorator
     def with_trailing_slash(func, *args, **kwargs):
         '''Monkey-patched to use 301 redirects for SEO, and handle query strings'''
+        __traceback_hide__ = 'before_and_this'  # for paste/werkzeug shorter traces
         response_type = getattr(request, 'response_type', None)
         if (request.method == 'GET' and not request.path.endswith('/') and not response_type):
             location = request.path_url + '/'
@@ -113,6 +115,7 @@ def newrelic():
                    tg.controllers.decoratedcontroller.DecoratedController)
     def _call(self, controller, *args, **kwargs):
         '''Set NewRelic transaction name to actual controller name'''
+        __traceback_hide__ = 'before_and_this'  # for paste/werkzeug shorter traces
         import newrelic.agent
         newrelic.agent.set_transaction_name(
             newrelic.agent.callable_name(controller))


[allura] 01/02: Switch web debugger from Backlash (fork of werkzeug) to current werkzeug

Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dill0wn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 07ec7ff636db276f27915663b658314b55dce737
Author: Dave Brondsema <db...@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 410a16a..a80f22f 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 c050cea..f526ef4 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: