[arch-commits] Commit in python-distributed/trunk (PKGBUILD py39.patch)

Evangelos Foutras foutrelis at archlinux.org
Wed Nov 18 08:17:43 UTC 2020


    Date: Wednesday, November 18, 2020 @ 08:17:43
  Author: foutrelis
Revision: 757095

upgpkg: python-distributed 2.30.1-3: add WIP fix for Python 3.9

Fixes a spyder-kernels test failure (test_dask_multiprocessing).

Added:
  python-distributed/trunk/py39.patch
Modified:
  python-distributed/trunk/PKGBUILD

------------+
 PKGBUILD   |   15 ++++++++++++---
 py39.patch |   24 ++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-18 05:17:20 UTC (rev 757094)
+++ PKGBUILD	2020-11-18 08:17:43 UTC (rev 757095)
@@ -3,7 +3,7 @@
 _pkg=distributed
 pkgname=python-${_pkg}
 pkgver=2.30.1
-pkgrel=2
+pkgrel=3
 pkgdesc="Distributed task scheduler for Dask"
 arch=(any)
 url="https://distributed.dask.org/"
@@ -29,10 +29,19 @@
     python-numpy
     python-pandas
 )
-source=(https://files.pythonhosted.org/packages/source/${_pkg::1}/${_pkg}/${_pkg}-${pkgver}.tar.gz)
+source=(https://files.pythonhosted.org/packages/source/${_pkg::1}/${_pkg}/${_pkg}-${pkgver}.tar.gz
+        py39.patch)
 #source=(https://github.com/dask/distributed/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
-sha256sums=('1421d3b84a0885aeb2c4bdc9e8896729c0f053a9375596c9de8864e055e2ac8e')
+sha256sums=('1421d3b84a0885aeb2c4bdc9e8896729c0f053a9375596c9de8864e055e2ac8e'
+            'e872d3655fc634f226b178d579377ed862c14ff488058586e61c82fd903ed680')
 
+prepare() {
+  cd ${_pkg}-${pkgver}
+  # https://github.com/spyder-ide/spyder-kernels/issues/258
+  # https://github.com/dask/distributed/pull/4234
+  patch -Np1 -i ../py39.patch
+}
+
 build() {
   cd ${_pkg}-${pkgver}
   python setup.py build

Added: py39.patch
===================================================================
--- py39.patch	                        (rev 0)
+++ py39.patch	2020-11-18 08:17:43 UTC (rev 757095)
@@ -0,0 +1,24 @@
+From 2c482276ed39112c650ed886c66d2c7b7d5e3783 Mon Sep 17 00:00:00 2001
+From: Jim Crist-Harif <jcristharif at gmail.com>
+Date: Tue, 10 Nov 2020 16:29:57 -0600
+Subject: [PATCH] Python 3.9 compatibility
+
+---
+ distributed/utils.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/distributed/utils.py b/distributed/utils.py
+index 77487f8ce..c1a0d2caa 100644
+--- a/distributed/utils.py
++++ b/distributed/utils.py
+@@ -72,6 +72,10 @@
+ 
+ 
+ def _initialize_mp_context():
++    if not WINDOWS:
++        # For some reason this is required in python >= 3.9
++        import multiprocessing.popen_spawn_posix
++
+     if WINDOWS or PYPY:
+         return multiprocessing
+     else:



More information about the arch-commits mailing list