diff options
author | Leo <thinkabit.ukim@gmail.com> | 2020-08-14 18:09:20 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2020-08-14 18:19:28 -0300 |
commit | 32619339e627edcf8a6143b1cbc81b786200a3b4 (patch) | |
tree | a6ea1f2850669430580ba56a13b281d89c0a6323 | |
parent | 27cb7e541b810c93495d63d50bba616c3636ace6 (diff) |
community/py3-bleach: fix tests
thanks Debian
-rw-r--r-- | community/py3-bleach/0002-no_vendored_html5lib.patch | 63 | ||||
-rw-r--r-- | community/py3-bleach/APKBUILD | 15 |
2 files changed, 72 insertions, 6 deletions
diff --git a/community/py3-bleach/0002-no_vendored_html5lib.patch b/community/py3-bleach/0002-no_vendored_html5lib.patch new file mode 100644 index 00000000000..3d48aab55eb --- /dev/null +++ b/community/py3-bleach/0002-no_vendored_html5lib.patch @@ -0,0 +1,63 @@ +From: Debian Python Modules Team + <python-modules-team@lists.alioth.debian.org> +Date: Tue, 15 Jan 2019 00:39:20 -0500 +Subject: no_vendored_html5lib + +=================================================================== +--- + bleach/html5lib_shim.py | 22 +++++++++++----------- + tests/test_clean.py | 2 +- + 2 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/bleach/html5lib_shim.py b/bleach/html5lib_shim.py +index be06aea..e9d9114 100644 +--- a/bleach/html5lib_shim.py ++++ b/bleach/html5lib_shim.py +@@ -11,23 +11,23 @@ import string + + import six + +-from bleach._vendor.html5lib import ( ++from html5lib import ( + HTMLParser, + getTreeWalker, + ) +-from bleach._vendor.html5lib import constants +-from bleach._vendor.html5lib.constants import ( ++from html5lib import constants ++from html5lib.constants import ( + namespaces, + prefixes, + ) +-from bleach._vendor.html5lib.constants import _ReparseException as ReparseException +-from bleach._vendor.html5lib.filters.base import Filter +-from bleach._vendor.html5lib.filters.sanitizer import allowed_protocols +-from bleach._vendor.html5lib.filters.sanitizer import Filter as SanitizerFilter +-from bleach._vendor.html5lib._inputstream import HTMLInputStream +-from bleach._vendor.html5lib.serializer import HTMLSerializer +-from bleach._vendor.html5lib._tokenizer import HTMLTokenizer +-from bleach._vendor.html5lib._trie import Trie ++from html5lib.constants import _ReparseException as ReparseException ++from html5lib.filters.base import Filter ++from html5lib.filters.sanitizer import allowed_protocols ++from html5lib.filters.sanitizer import Filter as SanitizerFilter ++from html5lib._inputstream import HTMLInputStream ++from html5lib.serializer import HTMLSerializer ++from html5lib._tokenizer import HTMLTokenizer ++from html5lib._trie import Trie + + + #: Map of entity name to expanded entity +diff --git a/tests/test_clean.py b/tests/test_clean.py +index 133cd82..2c0a1b9 100644 +--- a/tests/test_clean.py ++++ b/tests/test_clean.py +@@ -7,7 +7,7 @@ import pytest + from bleach import clean + from bleach.html5lib_shim import Filter + from bleach.sanitizer import Cleaner +-from bleach._vendor.html5lib.constants import rcdataElements ++from html5lib.constants import rcdataElements + + def test_clean_idempotent(): + """Make sure that applying the filter twice doesn't change anything.""" diff --git a/community/py3-bleach/APKBUILD b/community/py3-bleach/APKBUILD index a099c9a6be3..7ac1e6410cb 100644 --- a/community/py3-bleach/APKBUILD +++ b/community/py3-bleach/APKBUILD @@ -2,16 +2,18 @@ # Maintainer: Leo <thinkabit.ukim@gmail.com> pkgname=py3-bleach pkgver=3.1.5 -pkgrel=0 +pkgrel=1 pkgdesc="whitelist-based HTML sanitizing library" -options="!check" # https://github.com/mozilla/bleach/issues/503 url="https://github.com/mozilla/bleach" arch="noarch" license="Apache-2.0" -depends="python3 py3-six py3-webencodings" +depends="python3 py3-six py3-webencodings py3-packaging py3-html5lib" makedepends="py3-setuptools" -checkdepends="py3-pytest" -source="$pkgname-$pkgver.tar.gz::https://github.com/mozilla/bleach/archive/v$pkgver.tar.gz" +# 'lxml' and 'genshi' are optional depedencies of html5lib +checkdepends="py3-pytest py3-lxml py3-genshi" +source="$pkgname-$pkgver.tar.gz::https://github.com/mozilla/bleach/archive/v$pkgver.tar.gz + 0002-no_vendored_html5lib.patch + " builddir="$srcdir/bleach-$pkgver" # secfixes: @@ -32,4 +34,5 @@ package() { python3 setup.py install --prefix=/usr --root="$pkgdir" } -sha512sums="7a391588115e474dde1ba719e0c3decb1a195dd8191e9384f2114c80673da8e5d86f196cd988529f724659b7e4960e417db77458023646f8954bf91ab78eb8c9 py3-bleach-3.1.5.tar.gz" +sha512sums="7a391588115e474dde1ba719e0c3decb1a195dd8191e9384f2114c80673da8e5d86f196cd988529f724659b7e4960e417db77458023646f8954bf91ab78eb8c9 py3-bleach-3.1.5.tar.gz +4ba13bc309c1814e55e21853c8b81bc4933df6258b5cedfa07385aec4311f9ae1aa2cccd29b282fb397013ee8853ccc4005956111c3647dd98638b3f17f75de2 0002-no_vendored_html5lib.patch" |