1 |
commit: e0b063dd3e7005cf0a4ea4ed7b2536270ea71f00 |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 24 19:23:07 2021 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 24 19:42:35 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0b063dd |
7 |
|
8 |
dev-python/pytest-localserver-0.5.0: Add py310 |
9 |
|
10 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
11 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
12 |
|
13 |
.../pytest-localserver-0.5.0-py310-tests.patch | 39 ++++++++++++++++++++++ |
14 |
.../files/pytest-localserver-0.5.0-setup.patch | 5 +++ |
15 |
.../pytest-localserver-0.5.0.ebuild | 9 +++-- |
16 |
3 files changed, 51 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/dev-python/pytest-localserver/files/pytest-localserver-0.5.0-py310-tests.patch b/dev-python/pytest-localserver/files/pytest-localserver-0.5.0-py310-tests.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..c9a8fbf0f87 |
21 |
--- /dev/null |
22 |
+++ b/dev-python/pytest-localserver/files/pytest-localserver-0.5.0-py310-tests.patch |
23 |
@@ -0,0 +1,39 @@ |
24 |
+--- a/tests/test_https.py 2021-05-24 12:10:07.335676451 -0700 |
25 |
++++ b/tests/test_https.py 2021-05-24 12:10:23.966572498 -0700 |
26 |
+@@ -11,17 +11,20 @@ |
27 |
+ httpsserver = plugin.httpsserver |
28 |
+ |
29 |
+ |
30 |
++@×××××××××××.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too weak for py310") |
31 |
+ def test_httpsserver_funcarg(httpsserver): |
32 |
+ assert isinstance(httpsserver, https.SecureContentServer) |
33 |
+ assert httpsserver.is_alive() |
34 |
+ assert httpsserver.server_address |
35 |
+ |
36 |
+ |
37 |
++@×××××××××××.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too weak for py310") |
38 |
+ def test_server_does_not_serve_file_at_startup(httpsserver): |
39 |
+ assert httpsserver.code == 204 |
40 |
+ assert httpsserver.content == '' |
41 |
+ |
42 |
+ |
43 |
++@×××××××××××.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too weak for py310") |
44 |
+ def test_some_content_retrieval(httpsserver): |
45 |
+ httpsserver.serve_content('TEST!') |
46 |
+ resp = requests.get(httpsserver.url, verify=False) |
47 |
+@@ -29,6 +32,7 @@ |
48 |
+ assert resp.status_code == 200 |
49 |
+ |
50 |
+ |
51 |
++@×××××××××××.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too weak for py310") |
52 |
+ def test_GET_request(httpsserver): |
53 |
+ httpsserver.serve_content('TEST!', headers={'Content-type': 'text/plain'}) |
54 |
+ resp = requests.get(httpsserver.url, headers={'User-Agent': 'Test method'}, verify=False) |
55 |
+@@ -37,6 +41,7 @@ |
56 |
+ assert 'text/plain' in resp.headers['Content-type'] |
57 |
+ |
58 |
+ |
59 |
++@×××××××××××.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too weak for py310") |
60 |
+ def test_HEAD_request(httpsserver): |
61 |
+ httpsserver.serve_content('TEST!', headers={'Content-type': 'text/plain'}) |
62 |
+ print(httpsserver.url) |
63 |
|
64 |
diff --git a/dev-python/pytest-localserver/files/pytest-localserver-0.5.0-setup.patch b/dev-python/pytest-localserver/files/pytest-localserver-0.5.0-setup.patch |
65 |
new file mode 100644 |
66 |
index 00000000000..1cad7643973 |
67 |
--- /dev/null |
68 |
+++ b/dev-python/pytest-localserver/files/pytest-localserver-0.5.0-setup.patch |
69 |
@@ -0,0 +1,5 @@ |
70 |
+--- a/setup.cfg 2021-05-24 12:19:38.163108453 -0700 |
71 |
++++ b/setup.cfg 2021-05-24 12:19:58.714979990 -0700 |
72 |
+@@ -2 +2 @@ |
73 |
+-description-file = README |
74 |
++description_file = README |
75 |
|
76 |
diff --git a/dev-python/pytest-localserver/pytest-localserver-0.5.0.ebuild b/dev-python/pytest-localserver/pytest-localserver-0.5.0.ebuild |
77 |
index 21a6b9cdda9..b995790ef5d 100644 |
78 |
--- a/dev-python/pytest-localserver/pytest-localserver-0.5.0.ebuild |
79 |
+++ b/dev-python/pytest-localserver/pytest-localserver-0.5.0.ebuild |
80 |
@@ -1,9 +1,9 @@ |
81 |
-# Copyright 1999-2020 Gentoo Authors |
82 |
+# Copyright 1999-2021 Gentoo Authors |
83 |
# Distributed under the terms of the GNU General Public License v2 |
84 |
|
85 |
EAPI=7 |
86 |
|
87 |
-PYTHON_COMPAT=( python3_{7,8,9} pypy3 ) |
88 |
+PYTHON_COMPAT=( python3_{7..10} pypy3 ) |
89 |
|
90 |
inherit distutils-r1 |
91 |
|
92 |
@@ -24,4 +24,9 @@ BDEPEND=" |
93 |
dev-python/six[${PYTHON_USEDEP}] |
94 |
)" |
95 |
|
96 |
+PATCHES=( |
97 |
+ "${FILESDIR}/pytest-localserver-0.5.0-setup.patch" |
98 |
+ "${FILESDIR}/pytest-localserver-0.5.0-py310-tests.patch" |
99 |
+) |
100 |
+ |
101 |
distutils_enable_tests pytest |