mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-01 23:28:08 -07:00
dev-python/bleach: Port to py39
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
|
||||
PYTHON_COMPAT=( python2_7 python3_{6..9} pypy3 )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
@@ -24,6 +24,10 @@ RDEPEND="
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-py39.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
# unbundle unpatched broken html5lib
|
||||
rm -r bleach/_vendor || die
|
||||
|
||||
36
dev-python/bleach/files/bleach-3.1.5-py39.patch
Normal file
36
dev-python/bleach/files/bleach-3.1.5-py39.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
diff --git a/tests/test_clean.py b/tests/test_clean.py
|
||||
index 133cd82..4dcb9f4 100644
|
||||
--- a/tests/test_clean.py
|
||||
+++ b/tests/test_clean.py
|
||||
@@ -597,31 +597,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>'
|
||||
- ),
|
||||
|
||||
# Disallow implicit http if disallowed
|
||||
(
|
||||
Reference in New Issue
Block a user