Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/redis-py/files/, dev-python/redis-py/
Date: Fri, 24 Dec 2021 08:34:35
Message-Id: 1640334867.07718e1dd14ac33f2a272f2302fed946bdb664b7.mgorny@gentoo
1 commit: 07718e1dd14ac33f2a272f2302fed946bdb664b7
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 24 08:10:48 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 24 08:34:27 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07718e1d
7
8 dev-python/redis-py: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/redis-py/Manifest | 1 -
13 .../files/redis-py-3.5.3-fix-user-tests.patch | 72 -------------------
14 dev-python/redis-py/redis-py-3.5.3.ebuild | 80 ----------------------
15 3 files changed, 153 deletions(-)
16
17 diff --git a/dev-python/redis-py/Manifest b/dev-python/redis-py/Manifest
18 index 60c1bce0736f..5f684546ee7f 100644
19 --- a/dev-python/redis-py/Manifest
20 +++ b/dev-python/redis-py/Manifest
21 @@ -1,2 +1 @@
22 -DIST redis-py-3.5.3.tar.gz 141112 BLAKE2B b953d553a3cfa2d6ba6f5aa35dfaf93865acbfad0e901a96082c3b1c027dc23b6ceedde185f24e86772522fbbf4f0a4d18e115a6b40aff6a65450bbe397d5c07 SHA512 eae6ac6b3e0f1366a9c29e5e2d9a5210e4627e62e3006159b1c290f36cd9c1c2c12cafe0944f7a010e04632b517874f230aa9411491993b7ecf2080546217206
23 DIST redis-py-4.0.2.tar.gz 2262717 BLAKE2B 7db99843b4ee354b0841de1cacca001901b0614868e6cd545edb0f3705b7dc7d7a0ee755e2184ec1fb080a845a2f193ff5ab5a4dd99006eed6b9a1c89fbee131 SHA512 3f73ddd2ceb551fa447cfb4ecdc1d393957bbfd8c184ae3d357f9f47fff860f1c4684ec0fc3cb85fea530454456c17a98a2a56e592bef4cd9ad17bb405c1a0f7
24
25 diff --git a/dev-python/redis-py/files/redis-py-3.5.3-fix-user-tests.patch b/dev-python/redis-py/files/redis-py-3.5.3-fix-user-tests.patch
26 deleted file mode 100644
27 index 36ff4b0bf60a..000000000000
28 --- a/dev-python/redis-py/files/redis-py-3.5.3-fix-user-tests.patch
29 +++ /dev/null
30 @@ -1,72 +0,0 @@
31 -diff --git a/tests/test_commands.py b/tests/test_commands.py
32 -index 65e877c..448d30c 100644
33 ---- a/tests/test_commands.py
34 -+++ b/tests/test_commands.py
35 -@@ -105,25 +105,24 @@ class TestRedisCommands(object):
36 -
37 - # test enabled=False
38 - assert r.acl_setuser(username, enabled=False, reset=True)
39 -- assert r.acl_getuser(username) == {
40 -- 'categories': ['-@all'],
41 -- 'commands': [],
42 -- 'enabled': False,
43 -- 'flags': ['off'],
44 -- 'keys': [],
45 -- 'passwords': [],
46 -- }
47 -+ acl = r.acl_getuser(username)
48 -+ assert acl['categories'] == ['-@all']
49 -+ assert acl['commands'] == []
50 -+ assert acl['keys'] == []
51 -+ assert acl['passwords'] == []
52 -+ assert 'off' in acl['flags']
53 -+ assert acl['enabled'] is False
54 -
55 - # test nopass=True
56 - assert r.acl_setuser(username, enabled=True, reset=True, nopass=True)
57 -- assert r.acl_getuser(username) == {
58 -- 'categories': ['-@all'],
59 -- 'commands': [],
60 -- 'enabled': True,
61 -- 'flags': ['on', 'nopass'],
62 -- 'keys': [],
63 -- 'passwords': [],
64 -- }
65 -+ acl = r.acl_getuser(username)
66 -+ assert acl['categories'] == ['-@all']
67 -+ assert acl['commands'] == []
68 -+ assert acl['keys'] == []
69 -+ assert acl['passwords'] == []
70 -+ assert 'on' in acl['flags']
71 -+ assert 'nopass' in acl['flags']
72 -+ assert acl['enabled'] is True
73 -
74 - # test all args
75 - assert r.acl_setuser(username, enabled=True, reset=True,
76 -@@ -135,7 +134,7 @@ class TestRedisCommands(object):
77 - assert set(acl['categories']) == set(['-@all', '+@set', '+@hash'])
78 - assert set(acl['commands']) == set(['+get', '+mget', '-hset'])
79 - assert acl['enabled'] is True
80 -- assert acl['flags'] == ['on']
81 -+ assert 'on' in acl['flags']
82 - assert set(acl['keys']) == set([b'cache:*', b'objects:*'])
83 - assert len(acl['passwords']) == 2
84 -
85 -@@ -154,7 +153,7 @@ class TestRedisCommands(object):
86 - assert set(acl['categories']) == set(['-@all', '+@set', '+@hash'])
87 - assert set(acl['commands']) == set(['+get', '+mget'])
88 - assert acl['enabled'] is True
89 -- assert acl['flags'] == ['on']
90 -+ assert 'on' in acl['flags']
91 - assert set(acl['keys']) == set([b'cache:*', b'objects:*'])
92 - assert len(acl['passwords']) == 2
93 -
94 -@@ -193,7 +192,7 @@ class TestRedisCommands(object):
95 -
96 - assert r.acl_setuser(username, enabled=False, reset=True)
97 - users = r.acl_list()
98 -- assert 'user %s off -@all' % username in users
99 -+ assert len(users) == 2
100 -
101 - @skip_if_server_version_lt(REDIS_6_VERSION)
102 - def test_acl_setuser_categories_without_prefix_fails(self, r, request):
103
104 diff --git a/dev-python/redis-py/redis-py-3.5.3.ebuild b/dev-python/redis-py/redis-py-3.5.3.ebuild
105 deleted file mode 100644
106 index bd3db6072183..000000000000
107 --- a/dev-python/redis-py/redis-py-3.5.3.ebuild
108 +++ /dev/null
109 @@ -1,80 +0,0 @@
110 -# Copyright 1999-2021 Gentoo Authors
111 -# Distributed under the terms of the GNU General Public License v2
112 -
113 -EAPI=7
114 -
115 -PYTHON_COMPAT=( python3_{8..10} pypy3 )
116 -
117 -inherit distutils-r1
118 -
119 -MY_PN="redis"
120 -MY_P="${MY_PN}-${PV}"
121 -
122 -DESCRIPTION="Python client for Redis key-value store"
123 -HOMEPAGE="https://github.com/andymccurdy/redis-py"
124 -SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz"
125 -S="${WORKDIR}/${MY_P}"
126 -
127 -LICENSE="MIT"
128 -SLOT="0"
129 -KEYWORDS="amd64 arm arm64 ~hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
130 -
131 -BDEPEND="
132 - test? (
133 - dev-db/redis
134 - dev-python/mock[${PYTHON_USEDEP}]
135 - )
136 -"
137 -
138 -PATCHES=(
139 - # https://github.com/andymccurdy/redis-py/issues/1459
140 - "${FILESDIR}/${P}-fix-user-tests.patch"
141 -)
142 -
143 -distutils_enable_tests pytest
144 -
145 -python_prepare_all() {
146 - distutils-r1_python_prepare_all
147 -
148 - # Make sure that tests will be used from BUILD_DIR rather than cwd.
149 - mv tests tests-hidden || die
150 -
151 - # Correct local import patch syntax
152 - sed \
153 - -e 's:from .conftest:from conftest:' \
154 - -e 's:from .test_pubsub:from test_pubsub:' \
155 - -i tests-hidden/test_*.py \
156 - || die
157 -}
158 -
159 -python_compile() {
160 - distutils-r1_python_compile
161 -
162 - if use test; then
163 - cp -r tests-hidden "${BUILD_DIR}"/tests || die
164 - fi
165 -}
166 -
167 -src_test() {
168 - local redis_pid="${T}"/redis.pid
169 - local redis_port=6379
170 - local redis_test_config="
171 - daemonize yes
172 - pidfile ${redis_pid}
173 - port ${redis_port}
174 - bind 127.0.0.1
175 - "
176 -
177 - # Spawn Redis itself for testing purposes
178 - # NOTE: On sam@'s machine, spawning Redis can hang in the sandbox.
179 - # I'm not restricting tests yet because this doesn't happen for anyone else AFAICT.
180 - elog "Spawning Redis"
181 - elog "NOTE: Port ${redis_port} must be free"
182 - "${EPREFIX}"/usr/sbin/redis-server - <<< "${redis_test_config}" || die
183 -
184 - # Run the tests
185 - distutils-r1_src_test
186 -
187 - # Clean up afterwards
188 - kill "$(<"${redis_pid}")" || die
189 -}