Date: Tuesday, July 3, 2018 @ 10:00:07 Author: foutrelis Revision: 350724
Add patch for Python 3.7 support Added: python-paste/trunk/python3.7.patch Modified: python-paste/trunk/PKGBUILD -----------------+ PKGBUILD | 16 ++++++++++++---- python3.7.patch | 22 ++++++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-07-03 09:57:59 UTC (rev 350723) +++ PKGBUILD 2018-07-03 10:00:07 UTC (rev 350724) @@ -15,12 +15,17 @@ checkdepends=('python-nose' 'python2-nose') optdepends=('python2-flup: WSGI utilities' 'python-openid: Support for OpenID') -source=("https://files.pythonhosted.org/packages/source/P/Paste/Paste-${pkgver}.tar.gz") -md5sums=('1231e14eae62fa7ed76e9130b04bc61e') +source=("https://files.pythonhosted.org/packages/source/P/Paste/Paste-${pkgver}.tar.gz" + python3.7.patch) +md5sums=('1231e14eae62fa7ed76e9130b04bc61e' + 'eaec86c9ff3da59a784163d6252bb18f') prepare() { rm Paste-${pkgver}/paste/httpserver.py.orig + # https://bitbucket.org/ianb/paste/pull-requests/41 + patch -d Paste-${pkgver} -Np1 < python3.7.patch + cp -a Paste-${pkgver}{,-py2} cd Paste-${pkgver}-py2 @@ -38,11 +43,14 @@ } check() { + # Excluding 'test_paste_website' because pythonpaste.org + # redirects to web.archive.org, and thus breaks the test + cd "$srcdir"/Paste-$pkgver - PYTHONPATH="$PWD/build/lib:$PYTHONPATH" nosetests3 + PYTHONPATH="$PWD/build/lib:$PYTHONPATH" nosetests3 -e '.*test_paste_website' cd "$srcdir"/Paste-$pkgver-py2 - PYTHONPATH="$PWD/build/lib:$PYTHONPATH" nosetests2 + PYTHONPATH="$PWD/build/lib:$PYTHONPATH" nosetests2 -e '.*test_paste_website' } package_python-paste() { Added: python3.7.patch =================================================================== --- python3.7.patch (rev 0) +++ python3.7.patch 2018-07-03 10:00:07 UTC (rev 350724) @@ -0,0 +1,22 @@ +# HG changeset patch +# User Miro HronĨok <m...@hroncok.cz> +# Date 1528476582 -7200 +# Branch py37 +# Node ID c5a2c7e3191cdcebf3fa5f0e52f55910ed2120b9 +# Parent 0e5a48796ab969d874c6b772c5c33561ac2d1b0d +Don't raise StopIteration from generator, return instead + +See https://www.python.org/dev/peps/pep-0479/ + +diff --git a/paste/auth/digest.py b/paste/auth/digest.py +--- a/paste/auth/digest.py ++++ b/paste/auth/digest.py +@@ -57,7 +57,7 @@ + prev = item + + yield prev.strip() +- raise StopIteration ++ return + + def _auth_to_kv_pairs(auth_string): + """ split a digest auth string into key, value pairs """