From 4429be000a778f363162554d59d903a725283d7d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 27 Dec 2022 14:10:06 +0000 Subject: gentoo auto-resync : 27:12:2022 - 14:10:05 --- sci-visualization/dash/Manifest | 5 +- sci-visualization/dash/dash-2.0.0.ebuild | 31 ------- sci-visualization/dash/dash-2.3.1.ebuild | 31 +++++++ ...g-2.1.0-import-dev-tools-error-html-rende.patch | 98 ---------------------- 4 files changed, 33 insertions(+), 132 deletions(-) delete mode 100644 sci-visualization/dash/dash-2.0.0.ebuild create mode 100644 sci-visualization/dash/dash-2.3.1.ebuild delete mode 100644 sci-visualization/dash/files/0001-Fix-werkzeug-2.1.0-import-dev-tools-error-html-rende.patch (limited to 'sci-visualization/dash') diff --git a/sci-visualization/dash/Manifest b/sci-visualization/dash/Manifest index c2f07c99dea9..c2c34daf6314 100644 --- a/sci-visualization/dash/Manifest +++ b/sci-visualization/dash/Manifest @@ -1,4 +1,3 @@ -AUX 0001-Fix-werkzeug-2.1.0-import-dev-tools-error-html-rende.patch 3611 BLAKE2B 2b659570a48d282a818db5614cf3103bdd958057d499198d5e540fa1d5e366e214d564c5b6caa21592a1561bc54dfc2d7dbaafc1b1711fbe0b94e82be0cc3ef5 SHA512 a748163f48b4578499a8e4d5be3017aa4c75fc23cf5ad00197c8ba2c79c702e580f1f4a5e3199de76da1ff00a8d134259883f5aad85af425523c9bc7365b0919 -DIST dash-2.0.0.tar.gz 15269530 BLAKE2B 04a79902ef764341ce1cacc1ae7d01931bf0774712da8451ccf972c56cd235990a6e21410f2ae20a732f91e96e277768c2a8837a4bcaeb1be940a953a9a5156c SHA512 7ab8f2d21475931881025b5933c9975af677cb1d4090875e07d788aba09752433ed531aecf63eaabd7548002224245e8f36b6cfa1e63e04bb322a3d154c0ec2b -EBUILD dash-2.0.0.ebuild 737 BLAKE2B 7326a7e3c1529e1de389aed99ff0b994a72105604ab625611b98c53cb6f4b4c6393c410b84e34f6760c3885f55c84230a4e908dfea1da244b9e38d8cf8e799d1 SHA512 1ca034dc6157cc3f3dc68c975200d1bceed15a583c6713b02ddbaad17a77a04a1fd73fe03b72e20b452146095f3663eee6623216ba0059515903e7bb0778eeed +DIST dash-2.3.1.tar.gz 17863985 BLAKE2B ce7ecf55ba21d1fe21e39e36c5c01591b2dda5bf16037cd226722acad83eab39d5db248e1015e339eb21eefbd03912c8678e5630cf121576d65c1025dd7886e5 SHA512 2651d2c1cf5f11d76d041291e9d59a8f0416fa683843453592cd6afb742e4dadc33ed80b4b6cfe6a643b36c7d21df87de865cb8eb94975b088777b483e227465 +EBUILD dash-2.3.1.ebuild 737 BLAKE2B 7326a7e3c1529e1de389aed99ff0b994a72105604ab625611b98c53cb6f4b4c6393c410b84e34f6760c3885f55c84230a4e908dfea1da244b9e38d8cf8e799d1 SHA512 1ca034dc6157cc3f3dc68c975200d1bceed15a583c6713b02ddbaad17a77a04a1fd73fe03b72e20b452146095f3663eee6623216ba0059515903e7bb0778eeed MISC metadata.xml 1362 BLAKE2B 476d401a89b61e6f3351eb372460651ca969ec7ce0e93610f446f502a37ff29b40cd16108f0b38a9d2639e76b8845d0da6eb313367c8b1d248b6d41c266f57e8 SHA512 beb967cce5f39ae8af1aa1e123ee901cc2a3683a820d61e9daf21ce8363e35236d97b1896229cecc7a605092a9ba189d848af0d0b31c515b1c02e2f1094b2eb5 diff --git a/sci-visualization/dash/dash-2.0.0.ebuild b/sci-visualization/dash/dash-2.0.0.ebuild deleted file mode 100644 index f8f2e13614d1..000000000000 --- a/sci-visualization/dash/dash-2.0.0.ebuild +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2021-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{8..10} ) -DISTUTILS_USE_PEP517=setuptools -inherit distutils-r1 - -DESCRIPTION="Python framework for building ML & data science web apps" -HOMEPAGE="https://github.com/plotly/dash" -SRC_URI="https://github.com/plotly/${PN}/archive/refs/tags/v${PV}.tar.gz - -> ${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86" -# Test need some packages not yet in the tree -# flask_talisman -# percy -# ... -RESTRICT="test" - -RDEPEND=" - dev-python/plotly[${PYTHON_USEDEP}] - dev-python/flask-compress[${PYTHON_USEDEP}]" -DEPEND="${RDEPEND} - test? ( dev-python/beautifulsoup4 )" -BDEPEND="" - -distutils_enable_tests pytest diff --git a/sci-visualization/dash/dash-2.3.1.ebuild b/sci-visualization/dash/dash-2.3.1.ebuild new file mode 100644 index 000000000000..f8f2e13614d1 --- /dev/null +++ b/sci-visualization/dash/dash-2.3.1.ebuild @@ -0,0 +1,31 @@ +# Copyright 2021-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +DISTUTILS_USE_PEP517=setuptools +inherit distutils-r1 + +DESCRIPTION="Python framework for building ML & data science web apps" +HOMEPAGE="https://github.com/plotly/dash" +SRC_URI="https://github.com/plotly/${PN}/archive/refs/tags/v${PV}.tar.gz + -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +# Test need some packages not yet in the tree +# flask_talisman +# percy +# ... +RESTRICT="test" + +RDEPEND=" + dev-python/plotly[${PYTHON_USEDEP}] + dev-python/flask-compress[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + test? ( dev-python/beautifulsoup4 )" +BDEPEND="" + +distutils_enable_tests pytest 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 -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( -- ' -
-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 - -- cgit v1.2.3