1 |
commit: 248333025c8435114d05fc5de3dc2a71b6fb589d |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 27 20:14:54 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 27 20:45:05 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24833302 |
7 |
|
8 |
dev-python/bleach: Port to py39 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/bleach/bleach-3.1.5.ebuild | 6 ++++- |
13 |
dev-python/bleach/files/bleach-3.1.5-py39.patch | 36 +++++++++++++++++++++++++ |
14 |
2 files changed, 41 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/dev-python/bleach/bleach-3.1.5.ebuild b/dev-python/bleach/bleach-3.1.5.ebuild |
17 |
index 43be3b241c1..db2a844f98f 100644 |
18 |
--- a/dev-python/bleach/bleach-3.1.5.ebuild |
19 |
+++ b/dev-python/bleach/bleach-3.1.5.ebuild |
20 |
@@ -2,7 +2,7 @@ |
21 |
# Distributed under the terms of the GNU General Public License v2 |
22 |
|
23 |
EAPI=7 |
24 |
-PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 ) |
25 |
+PYTHON_COMPAT=( python2_7 python3_{6..9} pypy3 ) |
26 |
|
27 |
inherit distutils-r1 |
28 |
|
29 |
@@ -24,6 +24,10 @@ RDEPEND=" |
30 |
|
31 |
distutils_enable_tests pytest |
32 |
|
33 |
+PATCHES=( |
34 |
+ "${FILESDIR}"/${P}-py39.patch |
35 |
+) |
36 |
+ |
37 |
src_prepare() { |
38 |
# unbundle unpatched broken html5lib |
39 |
rm -r bleach/_vendor || die |
40 |
|
41 |
diff --git a/dev-python/bleach/files/bleach-3.1.5-py39.patch b/dev-python/bleach/files/bleach-3.1.5-py39.patch |
42 |
new file mode 100644 |
43 |
index 00000000000..ce1296236b6 |
44 |
--- /dev/null |
45 |
+++ b/dev-python/bleach/files/bleach-3.1.5-py39.patch |
46 |
@@ -0,0 +1,36 @@ |
47 |
+diff --git a/tests/test_clean.py b/tests/test_clean.py |
48 |
+index 133cd82..4dcb9f4 100644 |
49 |
+--- a/tests/test_clean.py |
50 |
++++ b/tests/test_clean.py |
51 |
+@@ -597,31 +597,16 @@ def test_attributes_list(): |
52 |
+ {'protocols': ['http']}, |
53 |
+ '<a href="example.com">valid</a>' |
54 |
+ ), |
55 |
+- ( |
56 |
+- '<a href="example.com:8000">valid</a>', |
57 |
+- {'protocols': ['http']}, |
58 |
+- '<a href="example.com:8000">valid</a>' |
59 |
+- ), |
60 |
+ ( |
61 |
+ '<a href="localhost">valid</a>', |
62 |
+ {'protocols': ['http']}, |
63 |
+ '<a href="localhost">valid</a>' |
64 |
+ ), |
65 |
+- ( |
66 |
+- '<a href="localhost:8000">valid</a>', |
67 |
+- {'protocols': ['http']}, |
68 |
+- '<a href="localhost:8000">valid</a>' |
69 |
+- ), |
70 |
+ ( |
71 |
+ '<a href="192.168.100.100">valid</a>', |
72 |
+ {'protocols': ['http']}, |
73 |
+ '<a href="192.168.100.100">valid</a>' |
74 |
+ ), |
75 |
+- ( |
76 |
+- '<a href="192.168.100.100:8000">valid</a>', |
77 |
+- {'protocols': ['http']}, |
78 |
+- '<a href="192.168.100.100:8000">valid</a>' |
79 |
+- ), |
80 |
+ |
81 |
+ # Disallow implicit http if disallowed |
82 |
+ ( |