diff options
Diffstat (limited to 'dev-python/bleach')
-rw-r--r-- | dev-python/bleach/Manifest | 3 | ||||
-rw-r--r-- | dev-python/bleach/bleach-6.0.0.ebuild | 46 | ||||
-rw-r--r-- | dev-python/bleach/files/bleach-6.0.0-py39.patch | 48 |
3 files changed, 97 insertions, 0 deletions
diff --git a/dev-python/bleach/Manifest b/dev-python/bleach/Manifest index 611e007792f7..ce94b55642e2 100644 --- a/dev-python/bleach/Manifest +++ b/dev-python/bleach/Manifest @@ -1,4 +1,7 @@ AUX bleach-4.1.0-py39.patch 1216 BLAKE2B 15bd8b862610ca68b5a2d6d7569bb72a6293c85c0dd0a2b9dda58ab50a25c021fd8306219c47d851a738e57acee3e0ddd43a55dc5a30a789010a3d385cb8ba69 SHA512 10d2aff6c5f62a56589f8f129df1f5f3b514a57a8518669b909491b801d6994b548ec4f7f7c04f161bf06c82aee397a5610787682e07aa40e0d469242bd2c5bd +AUX bleach-6.0.0-py39.patch 1527 BLAKE2B 07bfabe99b5185398d85a5320f88286363562db4afd129186322efe66881f76f0517726a19d0df627064d9e011ee3e2e621c145e183eb179f148ec0c9b6b9309 SHA512 a6d0ccdda4425e1700d8113ee4d60bae48568b78279e303ecc051f803ac3aa693eb18ada5ce6dc224262f4a614972d793e400f4b1b585a18a29c11d4d402abd8 DIST bleach-5.0.1.tar.gz 199642 BLAKE2B 8d06dd38e89b91bf48f3481b5337b8d9700d8cc88faf3a260898b2b8f15ecf5c5160f96bff2c5ce02f361b773b0ce9a51322d9836dcc99b7878921846e8da182 SHA512 6c8e80eaf6db6f0e6d9066f3443192f44c489e079945b6d11b11e7eb270ea865011019e05d43c7896262dc11ca168e697630d9da8dca9f5bb48f0e2161fda6c8 +DIST bleach-6.0.0.tar.gz 201298 BLAKE2B e4af5da351fdb63bc75b935f70f40434bd81c49cde4f584901397e5fd4ac4507d2e29eb283ff28a764018dbd795021e2edf1f43385ff8a2d7d8affd358fc0e31 SHA512 95900e4347c1f7d0aa5b2e8fbf43fac6410dd6bbbac988fb3f407a964d0aa1dc51fe3cf17459e6ce762a02b45bb3d20b539ca05727278d120aee9500cf0d208a EBUILD bleach-5.0.1.ebuild 1119 BLAKE2B 5c236c5adc4040c6e792a4e45759c3bc2efa18d77010936dc4547476d738de4849977c4cf55f07e6f2c2b7088c6609542475cb0df6bc018e45ec1a107615ac7d SHA512 ae5cf5c23b2f902ab76f99f95147ef235371514bf02c805c5183112de855d3798fdc8b0b14bac4dc485a0db43455d7194a0ab747c9fb8e498073af404c866e42 +EBUILD bleach-6.0.0.ebuild 1127 BLAKE2B 322e1d27d68628f5cc11ce9692f60d54a91aad0e019a6587c5f3041bc9357235745071283dcda979ee7e58fe8ab6fdfcc21db05009a372e69efb90c4f8fc07a6 SHA512 841ff51b69494e11235493add3fb920ff32874b35d57b21aa0cf23d385626ee8df1b479697f3d6a64d6846ba2e29d0abec2c3d406ff170b7c08becc3287c0c8a MISC metadata.xml 401 BLAKE2B 9250e95731d3269e92b401f17d066e70838fa4009e9b62e6ec88420ada2b4695179fad49a8b010eab162ed0af2e2398fa987e04cd8ad34813dfb1ed1ad1208e4 SHA512 e5ba74a86efa4450b9181fb5f32dfd63ac5d3e34b8e1c447b21acb4cb615d77711761352a8e1e4807bde17b1b2e688eded99d8a9785cd42a915d470084b98a04 diff --git a/dev-python/bleach/bleach-6.0.0.ebuild b/dev-python/bleach/bleach-6.0.0.ebuild new file mode 100644 index 000000000000..350261336111 --- /dev/null +++ b/dev-python/bleach/bleach-6.0.0.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="An easy whitelist-based HTML-sanitizing tool" +HOMEPAGE=" + https://github.com/mozilla/bleach/ + https://pypi.org/project/bleach/ +" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" + +RDEPEND=" + dev-python/packaging[${PYTHON_USEDEP}] + >=dev-python/html5lib-1.0.1-r1[${PYTHON_USEDEP}] +" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/bleach-6.0.0-py39.patch +) + +src_prepare() { + # unbundle unpatched broken html5lib + rm -r bleach/_vendor || die + sed -i -e 's:bleach\._vendor\.parse:urllib.parse:' \ + bleach/parse_shim.py || die + sed -i -e 's:bleach\._vendor\.::' \ + bleach/html5lib_shim.py \ + bleach/sanitizer.py \ + tests/test_clean.py || die + # indirect html5lib deps + sed -i -e '/six/d' -e '/webencodings/d' setup.py || die + + distutils-r1_src_prepare +} diff --git a/dev-python/bleach/files/bleach-6.0.0-py39.patch b/dev-python/bleach/files/bleach-6.0.0-py39.patch new file mode 100644 index 000000000000..02ecb614c8b9 --- /dev/null +++ b/dev-python/bleach/files/bleach-6.0.0-py39.patch @@ -0,0 +1,48 @@ +From d6d734f6fbeee2c091212d42e3ea730a1230aad5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Tue, 24 Jan 2023 07:35:45 +0100 +Subject: [PATCH] Remove tests broken by py3.9 + +--- + tests/test_clean.py | 15 --------------- + 1 file changed, 15 deletions(-) + +diff --git a/tests/test_clean.py b/tests/test_clean.py +index 73946a1..f798a15 100644 +--- a/tests/test_clean.py ++++ b/tests/test_clean.py +@@ -551,31 +551,16 @@ def test_attributes_list(): + {"protocols": {"http"}}, + '<a href="example.com">valid</a>', + ), +- ( +- '<a href="example.com:8000">valid</a>', +- {"protocols": {"http"}}, +- '<a href="example.com:8000">valid</a>', +- ), + ( + '<a href="localhost">valid</a>', + {"protocols": {"http"}}, + '<a href="localhost">valid</a>', + ), +- ( +- '<a href="localhost:8000">valid</a>', +- {"protocols": {"http"}}, +- '<a href="localhost:8000">valid</a>', +- ), + ( + '<a href="192.168.100.100">valid</a>', + {"protocols": {"http"}}, + '<a href="192.168.100.100">valid</a>', + ), +- ( +- '<a href="192.168.100.100:8000">valid</a>', +- {"protocols": {"http"}}, +- '<a href="192.168.100.100:8000">valid</a>', +- ), + pytest.param( + *( + '<a href="192.168.100.100:8000/foo#bar">valid</a>', +-- +2.39.1 + |