public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/django-celery/files/, dev-python/django-celery/
@ 2015-10-27  9:54 Ian Delaney
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Delaney @ 2015-10-27  9:54 UTC (permalink / raw
  To: gentoo-commits

commit:     919a19fb17521df84f592cf4a7227edf88b2ba76
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 27 09:53:43 2015 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Tue Oct 27 09:54:08 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=919a19fb

dev-python/django-celery: patch to fix broken tests

patch from upstream submitted via the gentoo bug and runtested
by 'wraeth', drop py3.3 support, add missed PYTHON_REQ_USE value
for sqlite, set required bordering to django subsequent to
runtesting, fixes the gentoo bug

Gentoo bug: #564250

Package-Manager: portage-2.2.23

 .../django-celery/django-celery-3.1.16.ebuild      | 14 ++++++--
 .../django-celery-3.1.16-py3-test-failures.patch   | 39 ++++++++++++++++++++++
 2 files changed, 50 insertions(+), 3 deletions(-)

diff --git a/dev-python/django-celery/django-celery-3.1.16.ebuild b/dev-python/django-celery/django-celery-3.1.16.ebuild
index 44b6fe2..872f74f 100644
--- a/dev-python/django-celery/django-celery-3.1.16.ebuild
+++ b/dev-python/django-celery/django-celery-3.1.16.ebuild
@@ -3,9 +3,10 @@
 # $Id$
 
 EAPI=5
-PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_COMPAT=( python{2_7,3_4} )
+PYTHON_REQ_USE="sqlite(+)"
 
-inherit distutils-r1
+inherit distutils-r1 eutils
 
 DESCRIPTION="Celery Integration for Django"
 HOMEPAGE="http://celeryproject.org/"
@@ -16,9 +17,14 @@ SLOT="0"
 KEYWORDS="amd64 x86"
 IUSE="doc examples test"
 
+# Python testsuite fails when built against dev-python/django-1.8.5
+# with ValueError: save() prohibited to prevent data loss due to
+# unsaved related object 'interval'.
+
 PY2_USEDEP=$(python_gen_usedep python2_7)
 RDEPEND=">=dev-python/celery-3.1.15[${PYTHON_USEDEP}]
-	dev-python/django[${PYTHON_USEDEP}]
+	>dev-python/django-1.4[${PYTHON_USEDEP}]
+	<=dev-python/django-1.7.10[${PYTHON_USEDEP}]
 	dev-python/pytz[${PYTHON_USEDEP}]"
 DEPEND="${RDEPEND}
 	dev-python/setuptools[${PYTHON_USEDEP}]
@@ -37,6 +43,8 @@ PY27_REQUSE="$(python_gen_useflags 'python2.7')"
 REQUIRED_USE="
 	doc? ( ${PY27_REQUSE} )"
 
+PATCHES=( "${FILESDIR}/${P}-py3-test-failures.patch" )
+
 python_compile_all() {
 	use doc && emake -C docs html
 }

diff --git a/dev-python/django-celery/files/django-celery-3.1.16-py3-test-failures.patch b/dev-python/django-celery/files/django-celery-3.1.16-py3-test-failures.patch
new file mode 100644
index 0000000..4b44b66
--- /dev/null
+++ b/dev-python/django-celery/files/django-celery-3.1.16-py3-test-failures.patch
@@ -0,0 +1,39 @@
+https://github.com/brianmay/django-celery/commit/8c4449f2a1b65f16eb405ecb3a2ef98ea7a8bf4f
+diff --git a/djcelery/loaders.py b/djcelery/loaders.py
+index c86455a..61c6d04 100644
+--- a/djcelery/loaders.py
++++ b/djcelery/loaders.py
+# Patch to fix failing tests test_list_registered_tasks and
+# test_apply with python3. Patch sourced from upstream
+# https://github.com/celery/django-celery/issues/342
+@@ -201,7 +201,8 @@ def find_related_module(app, related_name):
+         return
+
+     try:
+-        imp.find_module(related_name, app_path)
++        file, _, _ = imp.find_module(related_name, app_path)
++        file.close()
+     except ImportError:
+         return
+
+diff --git a/djcelery/views.py b/djcelery/views.py
+index 34cb307..4d07e0a 100644
+--- a/djcelery/views.py
++++ b/djcelery/views.py
+@@ -34,7 +34,7 @@ def task_view(task):
+         kwargs = kwdict(request.method == 'POST' and
+                         request.POST or request.GET)
+         # no multivalue
+-        kwargs = dict(((k, v) for k, v in kwargs.iteritems()), **options)
++        kwargs = dict(((k, v) for k, v in kwargs.items()), **options)
+         result = task.apply_async(kwargs=kwargs)
+         return JsonResponse({'ok': 'true', 'task_id': result.task_id})
+
+@@ -78,8 +78,8 @@ def task_status(request, task_id):
+
+ def registered_tasks(request):
+     """View returning all defined tasks as a JSON object."""
+-    return JsonResponse({'regular': tasks.regular().keys(),
+-                         'periodic': tasks.periodic().keys()})
++    return JsonResponse({'regular': list(tasks.regular().keys()),
++                         'periodic': list(tasks.periodic().keys())})


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/django-celery/files/, dev-python/django-celery/
@ 2017-06-04  7:30 Justin Lecher
  0 siblings, 0 replies; 2+ messages in thread
From: Justin Lecher @ 2017-06-04  7:30 UTC (permalink / raw
  To: gentoo-commits

commit:     49dd29f47a6f6f2eedf1d9502bbad11fe0a5144c
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  4 06:47:26 2017 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Jun  4 07:30:20 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49dd29f4

dev-python/django-celery: Drop old, bump EAPI

Package-Manager: Portage-2.3.6, Repoman-2.3.2
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 dev-python/django-celery/Manifest                  |  1 -
 .../django-celery/django-celery-3.1.16.ebuild      | 60 ----------------------
 .../django-celery/django-celery-3.1.17.ebuild      | 15 +++---
 .../django-celery-3.1.16-py3-test-failures.patch   | 39 --------------
 4 files changed, 9 insertions(+), 106 deletions(-)

diff --git a/dev-python/django-celery/Manifest b/dev-python/django-celery/Manifest
index 0ae1d789087..f7af4997ca8 100644
--- a/dev-python/django-celery/Manifest
+++ b/dev-python/django-celery/Manifest
@@ -1,2 +1 @@
-DIST django-celery-3.1.16.tar.gz 77411 SHA256 07a9c650a1f20e040cf5fffd0bcd920a81d0734915130d898c0325c5fafb2ec4 SHA512 8bada03237f2b6f45484fe15e985d4763944fe19b3ac7271a6b9d53058c13d903b0aba070cd813741e2a1a2c6c1d17b335f8712ca70c377d45892471ef7a59bc WHIRLPOOL a707ce0e31407e9a452d4930e93207dea31f22365a1c827dc917d9dc34d6a5c48f2bfc0aab41ce3b5a92877200265630e6fc17f7e7c80e0aac2ceb76a272a483
 DIST django-celery-3.1.17.tar.gz 79615 SHA256 254a95b0a4386df1fd949823942f6312c80fba3c88c5efad79cad8648bc5feb5 SHA512 fa68c85ee0eea778c5921c0373f3e7547bc644cd11d83e659fdf9bf4a80e317faca12ad3941225b073609a4716c5b9574d85c5c7063cff0fdb3deb0f1b86d225 WHIRLPOOL 6f01ab8aa28723720cd2ba516c9b2ecc30c28efe69fbdc72ddb18ed0fd2cfdaede6146133ec4a59f311e223a7146a7a190eaf8d9a6d8d831e46cafe668699fff

diff --git a/dev-python/django-celery/django-celery-3.1.16.ebuild b/dev-python/django-celery/django-celery-3.1.16.ebuild
deleted file mode 100644
index 897bfad0778..00000000000
--- a/dev-python/django-celery/django-celery-3.1.16.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-PYTHON_COMPAT=( python{2_7,3_4} )
-PYTHON_REQ_USE="sqlite(+)"
-
-inherit distutils-r1 eutils
-
-DESCRIPTION="Celery Integration for Django"
-HOMEPAGE="http://celeryproject.org/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE="doc examples test"
-
-# Python testsuite fails when built against dev-python/django-1.8.5
-# with ValueError: save() prohibited to prevent data loss due to
-# unsaved related object 'interval'.
-
-PY2_USEDEP=$(python_gen_usedep 'python2*')
-RDEPEND=">=dev-python/celery-3.1.15[${PYTHON_USEDEP}]
-	>dev-python/django-1.4[${PYTHON_USEDEP}]
-	<=dev-python/django-1.7.11[${PYTHON_USEDEP}]
-	dev-python/pytz[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? (
-		dev-python/django-nose[${PYTHON_USEDEP}]
-		>=dev-python/coverage-3.0[${PYTHON_USEDEP}]
-		dev-python/nose-cover3[${PYTHON_USEDEP}]
-		dev-python/mock[${PY2_USEDEP}]
-		dev-python/python-memcached[${PY2_USEDEP}] )
-	doc? ( dev-python/sphinx[${PYTHON_USEDEP}]
-		dev-python/sphinxcontrib-issuetracker[${PY2_USEDEP}]
-		dev-python/python-memcached[${PY2_USEDEP}]
-	)"
-
-PY27_REQUSE="$(python_gen_useflags 'python2*')"
-REQUIRED_USE="
-	doc? ( ${PY27_REQUSE} )"
-
-PATCHES=( "${FILESDIR}/${P}-py3-test-failures.patch" )
-
-python_compile_all() {
-	use doc && emake -C docs html
-}
-
-python_test() {
-	# https://github.com/celery/django-celery/issues/342
-	"${PYTHON}" tests/manage.py test
-}
-
-python_install_all() {
-	use doc && local HTML_DOCS=( docs/.build/html/. )
-	use examples && local EXAMPLES=( examples/. )
-	distutils-r1_python_install_all
-}

diff --git a/dev-python/django-celery/django-celery-3.1.17.ebuild b/dev-python/django-celery/django-celery-3.1.17.ebuild
index 3f4179fc30d..3092cb13fc8 100644
--- a/dev-python/django-celery/django-celery-3.1.17.ebuild
+++ b/dev-python/django-celery/django-celery-3.1.17.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
-PYTHON_COMPAT=( python{2_7,3_4} )
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
 PYTHON_REQ_USE="sqlite(+)"
 
 inherit distutils-r1 eutils
@@ -20,7 +21,8 @@ IUSE="doc examples test"
 # with ValueError: save() prohibited to prevent data loss due to
 # unsaved related object 'interval'.
 
-RDEPEND=">=dev-python/celery-3.1.15[${PYTHON_USEDEP}]
+RDEPEND="
+	>=dev-python/celery-3.1.15[${PYTHON_USEDEP}]
 	>dev-python/django-1.4[${PYTHON_USEDEP}]
 	<dev-python/django-1.9[${PYTHON_USEDEP}]
 	dev-python/pytz[${PYTHON_USEDEP}]"
@@ -32,7 +34,8 @@ DEPEND="${RDEPEND}
 		dev-python/nose-cover3[${PYTHON_USEDEP}]
 		dev-python/mock[${PYTHON_USEDEP}]
 		dev-python/python-memcached[${PYTHON_USEDEP}] )
-	doc? ( dev-python/sphinx[${PYTHON_USEDEP}]
+	doc? (
+		dev-python/sphinx[${PYTHON_USEDEP}]
 		dev-python/sphinxcontrib-issuetracker[${PYTHON_USEDEP}]
 		dev-python/python-memcached[${PYTHON_USEDEP}]
 	)"
@@ -43,7 +46,7 @@ python_compile_all() {
 
 python_test() {
 	# https://github.com/celery/django-celery/issues/342
-	"${PYTHON}" tests/manage.py test
+	"${PYTHON}" tests/manage.py test || die
 }
 
 python_install_all() {

diff --git a/dev-python/django-celery/files/django-celery-3.1.16-py3-test-failures.patch b/dev-python/django-celery/files/django-celery-3.1.16-py3-test-failures.patch
deleted file mode 100644
index 4b44b664c02..00000000000
--- a/dev-python/django-celery/files/django-celery-3.1.16-py3-test-failures.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-https://github.com/brianmay/django-celery/commit/8c4449f2a1b65f16eb405ecb3a2ef98ea7a8bf4f
-diff --git a/djcelery/loaders.py b/djcelery/loaders.py
-index c86455a..61c6d04 100644
---- a/djcelery/loaders.py
-+++ b/djcelery/loaders.py
-# Patch to fix failing tests test_list_registered_tasks and
-# test_apply with python3. Patch sourced from upstream
-# https://github.com/celery/django-celery/issues/342
-@@ -201,7 +201,8 @@ def find_related_module(app, related_name):
-         return
-
-     try:
--        imp.find_module(related_name, app_path)
-+        file, _, _ = imp.find_module(related_name, app_path)
-+        file.close()
-     except ImportError:
-         return
-
-diff --git a/djcelery/views.py b/djcelery/views.py
-index 34cb307..4d07e0a 100644
---- a/djcelery/views.py
-+++ b/djcelery/views.py
-@@ -34,7 +34,7 @@ def task_view(task):
-         kwargs = kwdict(request.method == 'POST' and
-                         request.POST or request.GET)
-         # no multivalue
--        kwargs = dict(((k, v) for k, v in kwargs.iteritems()), **options)
-+        kwargs = dict(((k, v) for k, v in kwargs.items()), **options)
-         result = task.apply_async(kwargs=kwargs)
-         return JsonResponse({'ok': 'true', 'task_id': result.task_id})
-
-@@ -78,8 +78,8 @@ def task_status(request, task_id):
-
- def registered_tasks(request):
-     """View returning all defined tasks as a JSON object."""
--    return JsonResponse({'regular': tasks.regular().keys(),
--                         'periodic': tasks.periodic().keys()})
-+    return JsonResponse({'regular': list(tasks.regular().keys()),
-+                         'periodic': list(tasks.periodic().keys())})


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-04  7:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-27  9:54 [gentoo-commits] repo/gentoo:master commit in: dev-python/django-celery/files/, dev-python/django-celery/ Ian Delaney
  -- strict thread matches above, loose matches on Subject: below --
2017-06-04  7:30 Justin Lecher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox