summaryrefslogtreecommitdiff
path: root/sci-visualization/dash
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /sci-visualization/dash
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'sci-visualization/dash')
-rw-r--r--sci-visualization/dash/Manifest5
-rw-r--r--sci-visualization/dash/dash-1.20.0-r1.ebuild50
-rw-r--r--sci-visualization/dash/dash-1.21.0-r1.ebuild (renamed from sci-visualization/dash/dash-1.21.0.ebuild)4
-rw-r--r--sci-visualization/dash/files/0001-Fix-werkzeug-2.1.0-import-dev-tools-error-html-rende.patch98
4 files changed, 104 insertions, 53 deletions
diff --git a/sci-visualization/dash/Manifest b/sci-visualization/dash/Manifest
index dd1af6ca56ec..2132f99e3767 100644
--- a/sci-visualization/dash/Manifest
+++ b/sci-visualization/dash/Manifest
@@ -1,5 +1,4 @@
-DIST dash-1.20.0.tar.gz 1786368 BLAKE2B 2826336f72b9bea80be6ef77df49109b7b68ed93678b606c998a1906907551551a3228e1140d20c6e1b5bf5e53fb9cebd0c0a4d7ab5cc1a590e47ef351558a40 SHA512 670cf593068370c70f1db25c70c7a76ce98c696efbff1146cc90f90a99b8b48bf80cf47688504d173ef253ccb9f1170c2067b3af9414eacb226f7ef25149ffff
+AUX 0001-Fix-werkzeug-2.1.0-import-dev-tools-error-html-rende.patch 3611 BLAKE2B 2b659570a48d282a818db5614cf3103bdd958057d499198d5e540fa1d5e366e214d564c5b6caa21592a1561bc54dfc2d7dbaafc1b1711fbe0b94e82be0cc3ef5 SHA512 a748163f48b4578499a8e4d5be3017aa4c75fc23cf5ad00197c8ba2c79c702e580f1f4a5e3199de76da1ff00a8d134259883f5aad85af425523c9bc7365b0919
DIST dash-1.21.0.tar.gz 1753608 BLAKE2B 07530da9e39065e80f653f97eda5ae8840a05cbc90969640910e1788daea8c5227841fd7de74b90bbb763e3c4b027442eb9e35f52d8ea57a0e8bae4dcab87ce0 SHA512 8254a918f60de9dc329af53f8ff15841be39b130c56c6c6037a2fe4d699fa71f565d7cb0a14d1405f0a1d32cfe886e1531558158596ea1a2b69fd7c62af5a8ce
-EBUILD dash-1.20.0-r1.ebuild 1106 BLAKE2B d91fdb01507b04792bb4bcba1ce57bd3aeeaa69572ba0a006fdf107e6f4b4e1861acff3fd32ec75e90d2436c98f94030c776b354fcfae086d98003c8c4774569 SHA512 f208552fce4e6b8f4ce4b633fe9e986e1caf78e92678cd33ff67c80eaaeac5dcee4c9af2664f4cca8765ca6be6fb1d549f0aa80ea5c14d7d174d161a995b1e9b
-EBUILD dash-1.21.0.ebuild 906 BLAKE2B b9793a68ff45a16c8dd4a9f1d720358a26ebc14ecc2d13ba51ac906aca2e33b370ce20f3b63f7feaac14559ab455f1258b683982042de558ba2919e30ede892d SHA512 104642c926fe6ba6563f7d08ebed8d38fbb2d5b7d0c1907e70aeb3cc767691dbccdc757696d563cafe13708112ed823b6bdf54f0bd842a11b0c096d04a503268
+EBUILD dash-1.21.0-r1.ebuild 998 BLAKE2B c954b9833bc25a206b27265b039b50af2427aada2ff6c54670656ffb5192c66c83da67ff77bd379734727a0460e429700f4574f38ba06b0bf67c8bffef25c6a7 SHA512 fe026de22dab44bdd973b7f67789de1bbd0e7144390cca9dfbeab3a6e7d23d1a8348c10d6be502327a7e5cdaa56ececac96d2cc5f627680d5558234ae48e2232
MISC metadata.xml 1362 BLAKE2B 476d401a89b61e6f3351eb372460651ca969ec7ce0e93610f446f502a37ff29b40cd16108f0b38a9d2639e76b8845d0da6eb313367c8b1d248b6d41c266f57e8 SHA512 beb967cce5f39ae8af1aa1e123ee901cc2a3683a820d61e9daf21ce8363e35236d97b1896229cecc7a605092a9ba189d848af0d0b31c515b1c02e2f1094b2eb5
diff --git a/sci-visualization/dash/dash-1.20.0-r1.ebuild b/sci-visualization/dash/dash-1.20.0-r1.ebuild
deleted file mode 100644
index 0b2685f17351..000000000000
--- a/sci-visualization/dash/dash-1.20.0-r1.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 2021-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-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"
-
-DEPEND=""
-RDEPEND="${DEPEND}
- dev-python/future[${PYTHON_USEDEP}]
- sci-visualization/dash-table[${PYTHON_USEDEP}]
- sci-visualization/dash-html-components[${PYTHON_USEDEP}]
- sci-visualization/dash-core-components[${PYTHON_USEDEP}]
- dev-python/plotly[${PYTHON_USEDEP}]
- dev-python/flask-compress[${PYTHON_USEDEP}]"
-BDEPEND=""
-
-src_prepare() {
- distutils-r1_src_prepare
- cd dash-renderer
- distutils-r1_src_prepare
-}
-
-src_configure() {
- distutils-r1_src_configure
- cd dash-renderer
- distutils-r1_src_configure
-}
-
-src_compile() {
- distutils-r1_src_compile
- cd dash-renderer
- distutils-r1_src_compile
-}
-
-src_install() {
- distutils-r1_src_install
- cd dash-renderer
- distutils-r1_src_install
-}
diff --git a/sci-visualization/dash/dash-1.21.0.ebuild b/sci-visualization/dash/dash-1.21.0-r1.ebuild
index 0c622cae63c1..9d388cb84220 100644
--- a/sci-visualization/dash/dash-1.21.0.ebuild
+++ b/sci-visualization/dash/dash-1.21.0-r1.ebuild
@@ -32,3 +32,7 @@ DEPEND="${RDEPEND}
BDEPEND=""
distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}"/0001-Fix-werkzeug-2.1.0-import-dev-tools-error-html-rende.patch
+)
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
new file mode 100644
index 000000000000..7f19380dc7cb
--- /dev/null
+++ b/sci-visualization/dash/files/0001-Fix-werkzeug-2.1.0-import-dev-tools-error-html-rende.patch
@@ -0,0 +1,98 @@
+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
+