diff options
Diffstat (limited to 'sci-visualization/dash')
-rw-r--r-- | sci-visualization/dash/Manifest | 2 | ||||
-rw-r--r-- | sci-visualization/dash/dash-2.3.1.ebuild (renamed from sci-visualization/dash/dash-2.0.0.ebuild) | 0 | ||||
-rw-r--r-- | sci-visualization/dash/files/0001-Fix-werkzeug-2.1.0-import-dev-tools-error-html-rende.patch | 98 |
3 files changed, 1 insertions, 99 deletions
diff --git a/sci-visualization/dash/Manifest b/sci-visualization/dash/Manifest index 127fd4caabb3..30b71f802b72 100644 --- a/sci-visualization/dash/Manifest +++ b/sci-visualization/dash/Manifest @@ -1 +1 @@ -DIST dash-2.0.0.tar.gz 15269530 BLAKE2B 04a79902ef764341ce1cacc1ae7d01931bf0774712da8451ccf972c56cd235990a6e21410f2ae20a732f91e96e277768c2a8837a4bcaeb1be940a953a9a5156c SHA512 7ab8f2d21475931881025b5933c9975af677cb1d4090875e07d788aba09752433ed531aecf63eaabd7548002224245e8f36b6cfa1e63e04bb322a3d154c0ec2b +DIST dash-2.3.1.tar.gz 17863985 BLAKE2B ce7ecf55ba21d1fe21e39e36c5c01591b2dda5bf16037cd226722acad83eab39d5db248e1015e339eb21eefbd03912c8678e5630cf121576d65c1025dd7886e5 SHA512 2651d2c1cf5f11d76d041291e9d59a8f0416fa683843453592cd6afb742e4dadc33ed80b4b6cfe6a643b36c7d21df87de865cb8eb94975b088777b483e227465 diff --git a/sci-visualization/dash/dash-2.0.0.ebuild b/sci-visualization/dash/dash-2.3.1.ebuild index f8f2e13614d1..f8f2e13614d1 100644 --- a/sci-visualization/dash/dash-2.0.0.ebuild +++ b/sci-visualization/dash/dash-2.3.1.ebuild diff --git a/sci-visualization/dash/files/0001-Fix-werkzeug-2.1.0-import-dev-tools-error-html-rende.patch b/sci-visualization/dash/files/0001-Fix-werkzeug-2.1.0-import-dev-tools-error-html-rende.patch deleted file mode 100644 index 7f19380dc7cb..000000000000 --- a/sci-visualization/dash/files/0001-Fix-werkzeug-2.1.0-import-dev-tools-error-html-rende.patch +++ /dev/null @@ -1,98 +0,0 @@ -From f9079bfd8a9576947655e1fee0dc343171c21e37 Mon Sep 17 00:00:00 2001 -From: philippe <t4rk@outlook.com> -Date: Tue, 29 Mar 2022 12:17:40 -0400 -Subject: [PATCH] Fix werkzeug 2.1.0 import & dev tools error html rendering. - ---- - .../error/FrontEnd/FrontEndError.react.js | 2 +- - dash/dash.py | 42 +++++++++++++++---- - 2 files changed, 34 insertions(+), 10 deletions(-) - -diff --git a/dash/dash-renderer/src/components/error/FrontEnd/FrontEndError.react.js b/dash/dash-renderer/src/components/error/FrontEnd/FrontEndError.react.js -index 5703add4..49939ea1 100644 ---- a/dash/dash-renderer/src/components/error/FrontEnd/FrontEndError.react.js -+++ b/dash/dash-renderer/src/components/error/FrontEnd/FrontEndError.react.js -@@ -110,7 +110,7 @@ function UnconnectedErrorContent({error, base}) { - )} - {/* Backend Error */} - {typeof error.html !== 'string' ? null : error.html.indexOf( -- '<!DOCTYPE HTML' -+ '<!DOCTYPE' - ) === 0 ? ( - <div className='dash-be-error__st'> - <div className='dash-backend-error'> -diff --git a/dash/dash.py b/dash/dash.py -index b4a3adf0..3d5dae25 100644 ---- a/dash/dash.py -+++ b/dash/dash.py -@@ -19,7 +19,10 @@ from future.moves.urllib.parse import urlparse - - import flask - from flask_compress import Compress --from werkzeug.debug.tbtools import get_current_traceback -+ -+from werkzeug.debug import tbtools -+from werkzeug.security import gen_salt -+ - from pkg_resources import get_distribution, parse_version - - import plotly -@@ -91,6 +94,30 @@ _re_index_scripts_id = 'src="[^"]*dash[-_]renderer[^"]*"', "dash-renderer" - _re_renderer_scripts_id = 'id="_dash-renderer', "new DashRenderer" - - -+def _get_traceback(secret, error): -+ def _get_skip(text): -+ skip = 0 -+ for i, line in enumerate(text.splitlines()): -+ if "%% callback invoked %%" in line: -+ skip = int((i + 1) / 2) -+ break -+ return skip -+ -+ # werkzeug<2.1.0 -+ if hasattr(tbtools, "get_current_traceback"): -+ tb = tbtools.get_current_traceback() -+ skip = _get_skip(tb.plaintext) -+ return tbtools.get_current_traceback(skip=skip).render_full() -+ -+ tb = tbtools.DebugTraceback(error) # pylint: disable=no-member -+ skip = _get_skip(tb.render_traceback_text()) -+ -+ # pylint: disable=no-member -+ return tbtools.DebugTraceback(error, skip=skip).render_debugger_html( -+ True, secret, True -+ ) -+ -+ - class _NoUpdate(object): - # pylint: disable=too-few-public-methods - pass -@@ -1463,19 +1490,16 @@ class Dash(object): - - if debug and dev_tools.prune_errors: - -+ secret = gen_salt(20) -+ - @self.server.errorhandler(Exception) -- def _wrap_errors(_): -+ def _wrap_errors(error): - # find the callback invocation, if the error is from a callback - # and skip the traceback up to that point - # if the error didn't come from inside a callback, we won't - # skip anything. -- tb = get_current_traceback() -- skip = 0 -- for i, line in enumerate(tb.plaintext.splitlines()): -- if "%% callback invoked %%" in line: -- skip = int((i + 1) / 2) -- break -- return get_current_traceback(skip=skip).render_full(), 500 -+ tb = _get_traceback(secret, error) -+ return tb, 500 - - if debug and dev_tools.ui: - --- -2.35.1 - |