commit:     e0b063dd3e7005cf0a4ea4ed7b2536270ea71f00
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Mon May 24 19:23:07 2021 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Mon May 24 19:42:35 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0b063dd

dev-python/pytest-localserver-0.5.0: Add py310

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 .../pytest-localserver-0.5.0-py310-tests.patch     | 39 ++++++++++++++++++++++
 .../files/pytest-localserver-0.5.0-setup.patch     |  5 +++
 .../pytest-localserver-0.5.0.ebuild                |  9 +++--
 3 files changed, 51 insertions(+), 2 deletions(-)

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
new file mode 100644
index 00000000000..c9a8fbf0f87
--- /dev/null
+++ 
b/dev-python/pytest-localserver/files/pytest-localserver-0.5.0-py310-tests.patch
@@ -0,0 +1,39 @@
+--- a/tests/test_https.py      2021-05-24 12:10:07.335676451 -0700
++++ b/tests/test_https.py      2021-05-24 12:10:23.966572498 -0700
+@@ -11,17 +11,20 @@
+ httpsserver = plugin.httpsserver
+ 
+ 
++@pytest.mark.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too 
weak for py310")
+ def test_httpsserver_funcarg(httpsserver):
+     assert isinstance(httpsserver, https.SecureContentServer)
+     assert httpsserver.is_alive()
+     assert httpsserver.server_address
+ 
+ 
++@pytest.mark.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too 
weak for py310")
+ def test_server_does_not_serve_file_at_startup(httpsserver):
+     assert httpsserver.code == 204
+     assert httpsserver.content == ''
+ 
+ 
++@pytest.mark.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too 
weak for py310")
+ def test_some_content_retrieval(httpsserver):
+     httpsserver.serve_content('TEST!')
+     resp = requests.get(httpsserver.url, verify=False)
+@@ -29,6 +32,7 @@
+     assert resp.status_code == 200
+ 
+ 
++@pytest.mark.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too 
weak for py310")
+ def test_GET_request(httpsserver):
+     httpsserver.serve_content('TEST!', headers={'Content-type': 'text/plain'})
+     resp = requests.get(httpsserver.url, headers={'User-Agent': 'Test 
method'}, verify=False)
+@@ -37,6 +41,7 @@
+     assert 'text/plain' in resp.headers['Content-type']
+ 
+ 
++@pytest.mark.skipif(sys.hexversion >= 0x30a0000, reason="Example certs too 
weak for py310")
+ def test_HEAD_request(httpsserver):
+     httpsserver.serve_content('TEST!', headers={'Content-type': 'text/plain'})
+     print(httpsserver.url)

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
new file mode 100644
index 00000000000..1cad7643973
--- /dev/null
+++ b/dev-python/pytest-localserver/files/pytest-localserver-0.5.0-setup.patch
@@ -0,0 +1,5 @@
+--- a/setup.cfg        2021-05-24 12:19:38.163108453 -0700
++++ b/setup.cfg        2021-05-24 12:19:58.714979990 -0700
+@@ -2 +2 @@
+-description-file = README
++description_file = README

diff --git a/dev-python/pytest-localserver/pytest-localserver-0.5.0.ebuild 
b/dev-python/pytest-localserver/pytest-localserver-0.5.0.ebuild
index 21a6b9cdda9..b995790ef5d 100644
--- a/dev-python/pytest-localserver/pytest-localserver-0.5.0.ebuild
+++ b/dev-python/pytest-localserver/pytest-localserver-0.5.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{7,8,9} pypy3 )
+PYTHON_COMPAT=( python3_{7..10} pypy3 )
 
 inherit distutils-r1
 
@@ -24,4 +24,9 @@ BDEPEND="
                dev-python/six[${PYTHON_USEDEP}]
        )"
 
+PATCHES=(
+       "${FILESDIR}/pytest-localserver-0.5.0-setup.patch"
+       "${FILESDIR}/pytest-localserver-0.5.0-py310-tests.patch"
+)
+
 distutils_enable_tests pytest

Reply via email to