* [gentoo-commits] repo/gentoo:master commit in: dev-python/redis-py/files/, dev-python/redis-py/
@ 2015-11-03 11:38 Justin Lecher
0 siblings, 0 replies; 2+ messages in thread
From: Justin Lecher @ 2015-11-03 11:38 UTC (permalink / raw
To: gentoo-commits
commit: d85169c4e4bf3400c5d2cd2687a0940cb1326152
Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 3 11:37:36 2015 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Nov 3 11:38:00 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d85169c4
dev-python/redis-py: Version Bump
Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
dev-python/redis-py/Manifest | 1 +
.../files/redis-py-2.10.5-test-backport.patch | 24 ++++++++
.../files/redis-py-2.10.5-test-finalize.patch | 19 +++++++
dev-python/redis-py/redis-py-2.10.5.ebuild | 66 ++++++++++++++++++++++
4 files changed, 110 insertions(+)
diff --git a/dev-python/redis-py/Manifest b/dev-python/redis-py/Manifest
index 30cc386..c30dc91 100644
--- a/dev-python/redis-py/Manifest
+++ b/dev-python/redis-py/Manifest
@@ -1,4 +1,5 @@
DIST redis-py-2.10.1.tar.gz 84143 SHA256 644aaf429e666d2254143a6a02f3b1cca2806d0cd52bb130c8f879d3c8259d62 SHA512 694a687e22654631fcf7b0b5884c2f3b3f804befe8080a1a27f08e212afe2f64c36921e025801d67bac1786b105f23565f52768f5b62ed1d18038be8dba9542c WHIRLPOOL e1b76cf47043d3d5317fc4352c9b52598af119a1501e4d6af1615181006afa658417002fdd8e206e6d5d5556df6dcbdd34a74b89918c513802793bd6ced4cccd
DIST redis-py-2.10.3.tar.gz 86532 SHA256 a4fb37b02860f6b1617f6469487471fd086dd2d38bbce640c2055862b9c4019c SHA512 a6dcb1160f91c444a6fd107761b2701e7d8ab2eed7b9fcc00e8f0bdcefe46c2a626611f36fe6bf520fe3cceeb509562609e6dba263e1508abe285a6eab73963c WHIRLPOOL 2b2fc577ff752f71675cade7c591442526dfbac07495d1cf61b14ac21371e76aec2d008531bb8729eb5e3f3ffd372d6c9bf9f7554e51f8076d2d79c07377d33e
+DIST redis-py-2.10.5.tar.gz 88610 SHA256 5dfbae6acfc54edf0a7a415b99e0b21c0a3c27a7f787b292eea727b1facc5533 SHA512 b2e6cb85c274c8f1c63e27256bbab816d016a68c324bf7092cf53feae819a34fa94f45565b0f209ee981919d793b2963462eb1a6f841e9dde9885802e0ebbe8f WHIRLPOOL af0b92b5ddb69346ff285d959a5052df5d65638e70d8d1b3d4b00adb80755eef41b492bfea432507443883f206a4537faf10e82d4253d7612e74ab7a52df47f1
DIST redis-py-2.7.4.tar.gz 79715 SHA256 623c8d437401314f8ec92f03848638c79c757098b316f0ed40ec2deaad57e082 SHA512 9b8db28c77e9df7a243e510a4f66a021179ab8ff52cfed2cc1b18b20f167eeee138d59a868fc105a32993681551c53e98d45680c16313680e8b4f36b6defa3b9 WHIRLPOOL fa5c754dc83f7d8baea68e21e283435994380e3e7243fa9bdb74ce934f7adacc75a11c6312d4b642606aa817010abc23f8f2a7b9eac1e2c73e50e897085124ad
DIST redis-py-2.9.1.tar.gz 62204 SHA256 af9747ec2727425b1b09252975e21502ee5a3d8d235c7f49869eb13e09ccf4e4 SHA512 6b4912acafb31c87a5bc47b0420834aa9d1eba57feb0bbacdea943b746fe2f24aee4c9f13e7b03ae4edc562043b22c370cc7f53e45be07c5408cfa9852f8ea38 WHIRLPOOL ae38ea63d605f8dd667d9fc548de972bf38d661ae6ef357070ebe7cba3b484febc45d6b7611916d8a1e262e6bbf4754257e727f41af8caa30597954a1fc20cf5
diff --git a/dev-python/redis-py/files/redis-py-2.10.5-test-backport.patch b/dev-python/redis-py/files/redis-py-2.10.5-test-backport.patch
new file mode 100644
index 0000000..74d2d14
--- /dev/null
+++ b/dev-python/redis-py/files/redis-py-2.10.5-test-backport.patch
@@ -0,0 +1,24 @@
+From 550eee8106ca5984f104b3a2a79299d9ae0821af Mon Sep 17 00:00:00 2001
+From: Chris Lamb <chris@chris-lamb.co.uk>
+Date: Tue, 18 Aug 2015 13:28:40 +0200
+Subject: [PATCH] Fix tests under Redis 3.x; we can be of an "embedded string"
+ format now.
+
+Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
+---
+ tests/test_commands.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test_commands.py b/tests/test_commands.py
+index 2e104ed..c0e56b0 100644
+--- a/tests/test_commands.py
++++ b/tests/test_commands.py
+@@ -112,7 +112,7 @@ def test_object(self, r):
+ r['a'] = 'foo'
+ assert isinstance(r.object('refcount', 'a'), int)
+ assert isinstance(r.object('idletime', 'a'), int)
+- assert r.object('encoding', 'a') == b('raw')
++ assert r.object('encoding', 'a') in (b('raw'), b('embstr'))
+ assert r.object('idletime', 'invalid-key') is None
+
+ def test_ping(self, r):
diff --git a/dev-python/redis-py/files/redis-py-2.10.5-test-finalize.patch b/dev-python/redis-py/files/redis-py-2.10.5-test-finalize.patch
new file mode 100644
index 0000000..1a80748
--- /dev/null
+++ b/dev-python/redis-py/files/redis-py-2.10.5-test-finalize.patch
@@ -0,0 +1,19 @@
+ setup.py | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index ed8fd5f..ab648a3 100644
+--- a/setup.py
++++ b/setup.py
+@@ -9,11 +9,6 @@ try:
+ from setuptools.command.test import test as TestCommand
+
+ class PyTest(TestCommand):
+- def finalize_options(self):
+- TestCommand.finalize_options(self)
+- self.test_args = []
+- self.test_suite = True
+-
+ def run_tests(self):
+ # import here, because outside the eggs aren't loaded
+ import pytest
diff --git a/dev-python/redis-py/redis-py-2.10.5.ebuild b/dev-python/redis-py/redis-py-2.10.5.ebuild
new file mode 100644
index 0000000..cfc6a77
--- /dev/null
+++ b/dev-python/redis-py/redis-py-2.10.5.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy pypy3 )
+
+inherit distutils-r1
+
+MY_PN="redis"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Python client for Redis key-value store"
+HOMEPAGE="https://github.com/andymccurdy/redis-py"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND=""
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( dev-db/redis
+ >=dev-python/pytest-2.5.0[${PYTHON_USEDEP}] )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-test-finalize.patch
+)
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+
+ # Make sure that tests will be used from BUILD_DIR rather than cwd.
+ mv tests tests-hidden || die
+
+ # Correct local import patch syntax
+ sed -e 's:from .conftest:from conftest:' \
+ -i tests-hidden/{test_connection_pool.py,test_commands.py,test_encoding.py,test_pubsub.py} \
+ || die
+}
+
+python_compile() {
+ distutils-r1_python_compile
+
+ if use test; then
+ cp -r tests-hidden "${BUILD_DIR}"/tests || die
+ fi
+}
+
+python_test() {
+ local sock="${T}/redis.sock"
+
+ "${EPREFIX}/usr/sbin/redis-server" - <<- EOF
+ daemonize yes
+ pidfile "${T}/redis.pid"
+ unixsocket ${sock}
+ EOF
+
+ PYTHONPATH="${S}:${S}/tests-hidden"
+ esetup.py test --verbose
+ kill $(<"${T}/redis.pid")
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/redis-py/files/, dev-python/redis-py/
@ 2021-12-24 8:34 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2021-12-24 8:34 UTC (permalink / raw
To: gentoo-commits
commit: 07718e1dd14ac33f2a272f2302fed946bdb664b7
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 24 08:10:48 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Dec 24 08:34:27 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07718e1d
dev-python/redis-py: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/redis-py/Manifest | 1 -
.../files/redis-py-3.5.3-fix-user-tests.patch | 72 -------------------
dev-python/redis-py/redis-py-3.5.3.ebuild | 80 ----------------------
3 files changed, 153 deletions(-)
diff --git a/dev-python/redis-py/Manifest b/dev-python/redis-py/Manifest
index 60c1bce0736f..5f684546ee7f 100644
--- a/dev-python/redis-py/Manifest
+++ b/dev-python/redis-py/Manifest
@@ -1,2 +1 @@
-DIST redis-py-3.5.3.tar.gz 141112 BLAKE2B b953d553a3cfa2d6ba6f5aa35dfaf93865acbfad0e901a96082c3b1c027dc23b6ceedde185f24e86772522fbbf4f0a4d18e115a6b40aff6a65450bbe397d5c07 SHA512 eae6ac6b3e0f1366a9c29e5e2d9a5210e4627e62e3006159b1c290f36cd9c1c2c12cafe0944f7a010e04632b517874f230aa9411491993b7ecf2080546217206
DIST redis-py-4.0.2.tar.gz 2262717 BLAKE2B 7db99843b4ee354b0841de1cacca001901b0614868e6cd545edb0f3705b7dc7d7a0ee755e2184ec1fb080a845a2f193ff5ab5a4dd99006eed6b9a1c89fbee131 SHA512 3f73ddd2ceb551fa447cfb4ecdc1d393957bbfd8c184ae3d357f9f47fff860f1c4684ec0fc3cb85fea530454456c17a98a2a56e592bef4cd9ad17bb405c1a0f7
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
deleted file mode 100644
index 36ff4b0bf60a..000000000000
--- a/dev-python/redis-py/files/redis-py-3.5.3-fix-user-tests.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-diff --git a/tests/test_commands.py b/tests/test_commands.py
-index 65e877c..448d30c 100644
---- a/tests/test_commands.py
-+++ b/tests/test_commands.py
-@@ -105,25 +105,24 @@ class TestRedisCommands(object):
-
- # test enabled=False
- assert r.acl_setuser(username, enabled=False, reset=True)
-- assert r.acl_getuser(username) == {
-- 'categories': ['-@all'],
-- 'commands': [],
-- 'enabled': False,
-- 'flags': ['off'],
-- 'keys': [],
-- 'passwords': [],
-- }
-+ acl = r.acl_getuser(username)
-+ assert acl['categories'] == ['-@all']
-+ assert acl['commands'] == []
-+ assert acl['keys'] == []
-+ assert acl['passwords'] == []
-+ assert 'off' in acl['flags']
-+ assert acl['enabled'] is False
-
- # test nopass=True
- assert r.acl_setuser(username, enabled=True, reset=True, nopass=True)
-- assert r.acl_getuser(username) == {
-- 'categories': ['-@all'],
-- 'commands': [],
-- 'enabled': True,
-- 'flags': ['on', 'nopass'],
-- 'keys': [],
-- 'passwords': [],
-- }
-+ acl = r.acl_getuser(username)
-+ assert acl['categories'] == ['-@all']
-+ assert acl['commands'] == []
-+ assert acl['keys'] == []
-+ assert acl['passwords'] == []
-+ assert 'on' in acl['flags']
-+ assert 'nopass' in acl['flags']
-+ assert acl['enabled'] is True
-
- # test all args
- assert r.acl_setuser(username, enabled=True, reset=True,
-@@ -135,7 +134,7 @@ class TestRedisCommands(object):
- assert set(acl['categories']) == set(['-@all', '+@set', '+@hash'])
- assert set(acl['commands']) == set(['+get', '+mget', '-hset'])
- assert acl['enabled'] is True
-- assert acl['flags'] == ['on']
-+ assert 'on' in acl['flags']
- assert set(acl['keys']) == set([b'cache:*', b'objects:*'])
- assert len(acl['passwords']) == 2
-
-@@ -154,7 +153,7 @@ class TestRedisCommands(object):
- assert set(acl['categories']) == set(['-@all', '+@set', '+@hash'])
- assert set(acl['commands']) == set(['+get', '+mget'])
- assert acl['enabled'] is True
-- assert acl['flags'] == ['on']
-+ assert 'on' in acl['flags']
- assert set(acl['keys']) == set([b'cache:*', b'objects:*'])
- assert len(acl['passwords']) == 2
-
-@@ -193,7 +192,7 @@ class TestRedisCommands(object):
-
- assert r.acl_setuser(username, enabled=False, reset=True)
- users = r.acl_list()
-- assert 'user %s off -@all' % username in users
-+ assert len(users) == 2
-
- @skip_if_server_version_lt(REDIS_6_VERSION)
- def test_acl_setuser_categories_without_prefix_fails(self, r, request):
diff --git a/dev-python/redis-py/redis-py-3.5.3.ebuild b/dev-python/redis-py/redis-py-3.5.3.ebuild
deleted file mode 100644
index bd3db6072183..000000000000
--- a/dev-python/redis-py/redis-py-3.5.3.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
-
-inherit distutils-r1
-
-MY_PN="redis"
-MY_P="${MY_PN}-${PV}"
-
-DESCRIPTION="Python client for Redis key-value store"
-HOMEPAGE="https://github.com/andymccurdy/redis-py"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
-
-BDEPEND="
- test? (
- dev-db/redis
- dev-python/mock[${PYTHON_USEDEP}]
- )
-"
-
-PATCHES=(
- # https://github.com/andymccurdy/redis-py/issues/1459
- "${FILESDIR}/${P}-fix-user-tests.patch"
-)
-
-distutils_enable_tests pytest
-
-python_prepare_all() {
- distutils-r1_python_prepare_all
-
- # Make sure that tests will be used from BUILD_DIR rather than cwd.
- mv tests tests-hidden || die
-
- # Correct local import patch syntax
- sed \
- -e 's:from .conftest:from conftest:' \
- -e 's:from .test_pubsub:from test_pubsub:' \
- -i tests-hidden/test_*.py \
- || die
-}
-
-python_compile() {
- distutils-r1_python_compile
-
- if use test; then
- cp -r tests-hidden "${BUILD_DIR}"/tests || die
- fi
-}
-
-src_test() {
- local redis_pid="${T}"/redis.pid
- local redis_port=6379
- local redis_test_config="
- daemonize yes
- pidfile ${redis_pid}
- port ${redis_port}
- bind 127.0.0.1
- "
-
- # Spawn Redis itself for testing purposes
- # NOTE: On sam@'s machine, spawning Redis can hang in the sandbox.
- # I'm not restricting tests yet because this doesn't happen for anyone else AFAICT.
- elog "Spawning Redis"
- elog "NOTE: Port ${redis_port} must be free"
- "${EPREFIX}"/usr/sbin/redis-server - <<< "${redis_test_config}" || die
-
- # Run the tests
- distutils-r1_src_test
-
- # Clean up afterwards
- kill "$(<"${redis_pid}")" || die
-}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-24 8:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-24 8:34 [gentoo-commits] repo/gentoo:master commit in: dev-python/redis-py/files/, dev-python/redis-py/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2015-11-03 11:38 Justin Lecher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox