[arch-commits] Commit in python-celery/trunk (PKGBUILD python-3.8.patch)

Evangelos Foutras foutrelis at archlinux.org
Fri Nov 8 12:34:18 UTC 2019


    Date: Friday, November 8, 2019 @ 12:34:18
  Author: foutrelis
Revision: 524606

Fix a test for Python 3.8

Added:
  python-celery/trunk/python-3.8.patch
Modified:
  python-celery/trunk/PKGBUILD

------------------+
 PKGBUILD         |    4 ++++
 python-3.8.patch |   22 ++++++++++++++++++++++
 2 files changed, 26 insertions(+)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-11-08 12:26:57 UTC (rev 524605)
+++ PKGBUILD	2019-11-08 12:34:18 UTC (rev 524606)
@@ -30,15 +30,19 @@
 source=("https://pypi.io/packages/source/c/celery/celery-$pkgver.tar.gz"
         https://github.com/celery/celery/commit/89c4573ac47a1f840ed2d15e2820d0eaed29dc32.patch
         https://github.com/celery/celery/commit/6514fed13ef2f992b2846116f9b2d1237aac8298.patch
+        python-3.8.patch
         celery at .service celery.tmpfiles.d)
 options=('!emptydirs')
 sha512sums=('91dd16bd6c9544c76d84e468872e052bdf5e1737980a1a3baee914c75c88db44b9ac8de7ddc4278988ca6cb159496b6560cecd6bb51d6352725009e97d268afb'
             '691ae1b4bf98317f6bea2d2ae26cd770c5a5242ae6b41d8d5cd0ea0ce3d521d5f3b16a1b1f33429bd777f7f628c84e29a5bada37ecb33e73c0118f9c1f992a12'
             '6c3e6da14c57cad5e26a34c5d5f59977938fbb93ae04b97b88427ca3c67b1f0ff8cf4bbfb42394ac2a6714cf847527275f99a45f6e34fb260686bb80b80d7cc4'
+            '5ad6589684cea159deeb8ca60c1247e24d6cd955b01e36c6a374702166845763b24f8212b18106e2a3b02f5a0012699c1fff78a3a65147376cc45a5f915a48ff'
             '3c6c9dbdacca2de12d49c03526b34797fd867c14d04115af0d1fda64d2848a5d3f64ceb6d284be319a81d932dc86e69c157b6f5f859f2fa213fc2f43a6052c65'
             '67279b75c3b44d065811c9c90aee006296164000912d5bb97c74956b26ee4ad4f0847e846052a896d379848b869c849300367e676d3f689cf29e3a0c7ae5310b')
 
 prepare() {
+  # Fix a test for Python 3.8
+  patch -d celery-$pkgver -p1 -i ../python-3.8.patch
   # Fix for new pymongo
   patch -d celery-$pkgver -p1 -i ../89c4573ac47a1f840ed2d15e2820d0eaed29dc32.patch
   # Fix for new pytest

Added: python-3.8.patch
===================================================================
--- python-3.8.patch	                        (rev 0)
+++ python-3.8.patch	2019-11-08 12:34:18 UTC (rev 524606)
@@ -0,0 +1,22 @@
+From 340ef9d973ffd533b17548e3a9f50418501b0681 Mon Sep 17 00:00:00 2001
+From: Omer Katz <omer.drow at gmail.com>
+Date: Mon, 28 Oct 2019 20:57:59 +0200
+Subject: [PATCH] Add Python 3.8 Support (#5785)
+
+* Workaround patching problem in test.
+
+diff --git a/celery/contrib/testing/app.py b/celery/contrib/testing/app.py
+index 3580c43165..60c6462135 100644
+--- a/celery/contrib/testing/app.py
++++ b/celery/contrib/testing/app.py
+@@ -30,6 +30,10 @@ class Trap(object):
+     """
+ 
+     def __getattr__(self, name):
++        # Workaround to allow unittest.mock to patch this object
++        # in Python 3.8 and above.
++        if name == '_is_coroutine':
++            return None
+         raise RuntimeError('Test depends on current_app')
+ 
+ 



More information about the arch-commits mailing list