Gentoo Archives: gentoo-commits

From: Louis Sautier <sbraz@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/httpauth/files/, dev-python/httpauth/
Date: Sat, 26 Nov 2022 22:19:15
Message-Id: 1669500650.0083001fd7b5dc20f3334b356707b08e016bda16.sbraz@gentoo
1 commit: 0083001fd7b5dc20f3334b356707b08e016bda16
2 Author: Louis Sautier <sbraz <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 26 19:18:05 2022 +0000
4 Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 26 22:10:50 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0083001f
7
8 dev-python/httpauth: enable py3.11, drop nose
9
10 Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>
11
12 .../httpauth-0.3-remove-nose-dependency.patch | 40 ++++++++++++++++++++++
13 dev-python/httpauth/httpauth-0.3-r1.ebuild | 12 +++++--
14 2 files changed, 50 insertions(+), 2 deletions(-)
15
16 diff --git a/dev-python/httpauth/files/httpauth-0.3-remove-nose-dependency.patch b/dev-python/httpauth/files/httpauth-0.3-remove-nose-dependency.patch
17 new file mode 100644
18 index 000000000000..5cb607c2bb4c
19 --- /dev/null
20 +++ b/dev-python/httpauth/files/httpauth-0.3-remove-nose-dependency.patch
21 @@ -0,0 +1,40 @@
22 +commit d57060ebaeca8cd38e03cc64f9ee0996e83b50a9
23 +Author: Jonas Haag <jonas@××××××.org>
24 +Date: Thu Apr 21 08:58:36 2022 +0200
25 +
26 + Move CI to GHA (#3)
27 +
28 +--- a/tests.py
29 ++++ b/tests.py
30 +@@ -10,7 +10,7 @@ except ImportError: # Python 2
31 +
32 + from httpauth import DictHttpAuthMiddleware, DigestFileHttpAuthMiddleware, md5_str
33 +
34 +-from nose.tools import raises
35 ++import pytest
36 +
37 +
38 + def parse_dict_header(value):
39 +@@ -121,16 +121,16 @@ def test_without_realm():
40 + assert 'Digest realm=""' in response.headers['WWW-Authenticate']
41 +
42 +
43 +-@raises(ValueError)
44 + def test_invalid_digestfile_1():
45 +- DigestFileHttpAuthMiddleware(StringIO('u::realm:hash'),
46 +- wsgi_app=wsgi_app)
47 ++ with pytest.raises(ValueError):
48 ++ DigestFileHttpAuthMiddleware(StringIO('u::realm:hash'),
49 ++ wsgi_app=wsgi_app)
50 +
51 +
52 +-@raises(ValueError)
53 + def test_invalid_digestfile_2():
54 +- DigestFileHttpAuthMiddleware(StringIO('u:realm:hash\nu2:realm2:hash2'),
55 +- wsgi_app=wsgi_app)
56 ++ with pytest.raises(ValueError):
57 ++ DigestFileHttpAuthMiddleware(StringIO('u:realm:hash\nu2:realm2:hash2'),
58 ++ wsgi_app=wsgi_app)
59 +
60 +
61 + def test_ticket_1():
62
63 diff --git a/dev-python/httpauth/httpauth-0.3-r1.ebuild b/dev-python/httpauth/httpauth-0.3-r1.ebuild
64 index 703fdd988ecb..ae8ef46058ed 100644
65 --- a/dev-python/httpauth/httpauth-0.3-r1.ebuild
66 +++ b/dev-python/httpauth/httpauth-0.3-r1.ebuild
67 @@ -4,7 +4,7 @@
68 EAPI=8
69
70 DISTUTILS_USE_PEP517=setuptools
71 -PYTHON_COMPAT=( pypy3 python3_{8..10} )
72 +PYTHON_COMPAT=( pypy3 python3_{8..11} )
73
74 inherit distutils-r1
75
76 @@ -16,4 +16,12 @@ LICENSE="ISC"
77 SLOT="0"
78 KEYWORDS="~amd64 ~x86"
79
80 -distutils_enable_tests nose
81 +PATCHES=(
82 + "${FILESDIR}/${P}-remove-nose-dependency.patch"
83 +)
84 +
85 +distutils_enable_tests pytest
86 +
87 +python_test() {
88 + epytest tests.py
89 +}