[arch-commits] Commit in gunicorn/repos (3 files)

2020-01-08 Thread Felix Yan via arch-commits
Date: Wednesday, January 8, 2020 @ 19:43:51
  Author: felixonmars
Revision: 550526

archrelease: copy trunk to community-testing-any

Added:
  gunicorn/repos/community-testing-any/
  gunicorn/repos/community-testing-any/PKGBUILD
(from rev 550524, gunicorn/trunk/PKGBUILD)
  gunicorn/repos/community-testing-any/gunicorn-pytest5.patch
(from rev 550524, gunicorn/trunk/gunicorn-pytest5.patch)

+
 PKGBUILD   |   41 
 gunicorn-pytest5.patch |   67 +++
 2 files changed, 108 insertions(+)

Copied: gunicorn/repos/community-testing-any/PKGBUILD (from rev 550524, 
gunicorn/trunk/PKGBUILD)
===
--- community-testing-any/PKGBUILD  (rev 0)
+++ community-testing-any/PKGBUILD  2020-01-08 19:43:51 UTC (rev 550526)
@@ -0,0 +1,41 @@
+# Maintainer: Felix Yan 
+# Contributor: Jeremy "Ichimonji10" Audet 
+# Contributor: pumpkin 
+# Contributor: Vsevolod Balashov 
+
+pkgname=gunicorn
+pkgver=20.0.0
+pkgrel=1
+pkgdesc='WSGI HTTP Server for UNIX'
+arch=('any')
+url='https://gunicorn.org/'
+license=('MIT')
+depends=('python-setuptools')
+optdepends=('python-eventlet: For asynchronous request handling with eventlet.'
+'python-gevent: For asynchronous request handling with gevent.')
+checkdepends=('python-aiohttp' 'python-coverage' 'python-pytest' 
'python-pytest-cov'
+  'python-pytest-runner')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/benoitc/$pkgname/archive/$pkgver.tar.gz;)
+sha512sums=('245d69cc45457516324b2cc18513ff15de623f9af42ffa2471d4fddbbcfd8b6ae8032ca4594abe86ce1c59d21cc0d1f87963d792d13c6f10efe6c0da5e43b2b2')
+
+prepare() {
+  sed -e 's/==/>=/' -e 's/,<.*$//' -i gunicorn-$pkgver/requirements_test.txt
+}
+
+build() {
+  cd gunicorn-$pkgver
+  python setup.py build
+}
+
+check() {
+  cd gunicorn-$pkgver
+  python setup.py pytest
+}
+
+package() {
+  cd gunicorn-$pkgver
+  python setup.py install --root="$pkgdir" --prefix=/usr --optimize=1
+  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:

Copied: gunicorn/repos/community-testing-any/gunicorn-pytest5.patch (from rev 
550524, gunicorn/trunk/gunicorn-pytest5.patch)
===
--- community-testing-any/gunicorn-pytest5.patch
(rev 0)
+++ community-testing-any/gunicorn-pytest5.patch2020-01-08 19:43:51 UTC 
(rev 550526)
@@ -0,0 +1,67 @@
+From f38f717539b1b7296720805b8ae3969c3509b9c1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Ba=C5=A1ti?= 
+Date: Thu, 11 Jul 2019 19:12:16 +0200
+Subject: [PATCH] Fix pytest 5.0.0 compatibility
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+pytest.raises() returns exception info not the exception itself. They
+changed implementation of exception info, so now .value property must be
+used to get the exception instance and have proper output from str()
+method.
+
+https://github.com/pytest-dev/pytest/issues/5412
+
+Signed-off-by: Martin Bašti 
+---
+ tests/test_util.py | 20 ++--
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/tests/test_util.py b/tests/test_util.py
+index 3b8688a21..2494d2c54 100644
+--- a/tests/test_util.py
 b/tests/test_util.py
+@@ -29,9 +29,9 @@ def test_parse_address(test_input, expected):
+ 
+ 
+ def test_parse_address_invalid():
+-with pytest.raises(RuntimeError) as err:
++with pytest.raises(RuntimeError) as exc_info:
+ util.parse_address('127.0.0.1:test')
+-assert "'test' is not a valid port number." in str(err)
++assert "'test' is not a valid port number." in str(exc_info.value)
+ 
+ 
+ def test_http_date():
+@@ -63,24 +63,24 @@ def test_warn(capsys):
+ def test_import_app():
+ assert util.import_app('support:app')
+ 
+-with pytest.raises(ImportError) as err:
++with pytest.raises(ImportError) as exc_info:
+ util.import_app('a:app')
+-assert 'No module' in str(err)
++assert 'No module' in str(exc_info.value)
+ 
+-with pytest.raises(AppImportError) as err:
++with pytest.raises(AppImportError) as exc_info:
+ util.import_app('support:wrong_app')
+ msg = "Failed to find application object 'wrong_app' in 'support'"
+-assert msg in str(err)
++assert msg in str(exc_info.value)
+ 
+ 
+ def test_to_bytestring():
+ assert util.to_bytestring('test_str', 'ascii') == b'test_str'
+ assert util.to_bytestring('test_str®') == b'test_str\xc2\xae'
+ assert util.to_bytestring(b'byte_test_str') == b'byte_test_str'
+-with pytest.raises(TypeError) as err:
++with pytest.raises(TypeError) as exc_info:
+ util.to_bytestring(100)
+ msg = '100 is not a string'
+-assert msg in str(err)
++assert msg in str(exc_info.value)
+ 
+ 
+ 

[arch-commits] Commit in gunicorn/repos (3 files)

2018-07-01 Thread Evangelos Foutras via arch-commits
Date: Sunday, July 1, 2018 @ 18:45:17
  Author: foutrelis
Revision: 349421

archrelease: copy trunk to community-staging-any

Added:
  gunicorn/repos/community-staging-any/
  gunicorn/repos/community-staging-any/PKGBUILD
(from rev 349420, gunicorn/trunk/PKGBUILD)
  gunicorn/repos/community-staging-any/pr1796-python37.patch
(from rev 349420, gunicorn/trunk/pr1796-python37.patch)

---+
 PKGBUILD  |   73 
 pr1796-python37.patch |  281 
 2 files changed, 354 insertions(+)

Copied: gunicorn/repos/community-staging-any/PKGBUILD (from rev 349420, 
gunicorn/trunk/PKGBUILD)
===
--- community-staging-any/PKGBUILD  (rev 0)
+++ community-staging-any/PKGBUILD  2018-07-01 18:45:17 UTC (rev 349421)
@@ -0,0 +1,73 @@
+# $Id$
+# Maintainer: Felix Yan 
+# Contributor: Jeremy "Ichimonji10" Audet 
+# Contributor: pumpkin 
+# Contributor: Vsevolod Balashov 
+
+pkgbase=gunicorn
+pkgname=(gunicorn python2-gunicorn)
+pkgver=19.8.1
+pkgrel=2
+pkgdesc='WSGI HTTP Server for UNIX'
+arch=('any')
+url='http://gunicorn.org/'
+license=('MIT')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python2-mock' 'python-coverage' 'python2-coverage' 
'python-pytest' 'python2-pytest'
+  'python-pytest-cov' 'python2-pytest-cov' 'python-pytest-runner'
+  'python2-pytest-runner')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/benoitc/$pkgbase/archive/$pkgver.tar.gz;
+pr1796-python37.patch)
+sha512sums=('2fbdbc939c08fde2035d88780f97afdcdd9aada9267fefdd9c39e2c8e48f790077ea9e45e7149e93d2f97041d176af8470e0be400775ee775e50573f7de03148'
+
'cae6af688ca47a3b56196e7894f320a360ed60a9542b499dd072218c79c6210852510e7698dd6e3cf7cea7220cba460e3c7c0c48faa3e36366246f2baf90c577')
+
+prepare() {
+  # https://github.com/benoitc/gunicorn/issues/1795
+  patch -d gunicorn-$pkgver -Np1 < pr1796-python37.patch
+  sed -e 's/==/>=/' -e 's/,<.*$//' -i gunicorn-$pkgver/requirements_test.txt
+  cp -a gunicorn-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir"/gunicorn-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/gunicorn-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/gunicorn-$pkgver
+  python setup.py pytest
+
+  cd "$srcdir"/gunicorn-$pkgver-py2
+  python2 setup.py pytest
+}
+
+package_gunicorn() {
+  depends=('python-setuptools')
+  optdepends=('python-eventlet: For asynchronous request handling with 
eventlet.'
+  'python-gevent: For asynchronous request handling with gevent.')
+
+  cd $pkgbase-$pkgver
+  python setup.py install --root="$pkgdir" --prefix=/usr --optimize=1
+  rm -r "$pkgdir"/usr/bin/gunicorn_paster
+  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-gunicorn() {
+  depends=('python2-setuptools')
+  provides=('gunicorn-python2')
+  conflicts=('gunicorn-python2')
+  replaces=('gunicorn-python2')
+  optdepends=('python2-eventlet: For asynchronous request handling with 
eventlet.'
+  'python2-gevent: For asynchronous request handling with gevent.')
+
+  cd $pkgbase-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --prefix=/usr --optimize=1
+  rm -r "$pkgdir"/usr/bin/gunicorn_paster
+  mv "$pkgdir"/usr/bin/gunicorn "$pkgdir"/usr/bin/gunicorn-python2
+  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:

Copied: gunicorn/repos/community-staging-any/pr1796-python37.patch (from rev 
349420, gunicorn/trunk/pr1796-python37.patch)
===
--- community-staging-any/pr1796-python37.patch (rev 0)
+++ community-staging-any/pr1796-python37.patch 2018-07-01 18:45:17 UTC (rev 
349421)
@@ -0,0 +1,281 @@
+From 0a88d19ddf29b461b819b66e49ea313c89ab576c Mon Sep 17 00:00:00 2001
+From: Diego Oliveira 
+Date: Sat, 26 May 2018 10:22:42 -0300
+Subject: [PATCH 1/6] Move the module async to _async
+
+---
+ gunicorn/workers/{async.py => _async.py} | 0
+ gunicorn/workers/geventlet.py| 2 +-
+ gunicorn/workers/ggevent.py  | 2 +-
+ 3 files changed, 2 insertions(+), 2 deletions(-)
+ rename gunicorn/workers/{async.py => _async.py} (100%)
+
+diff --git a/gunicorn/workers/async.py b/gunicorn/workers/_async.py
+similarity index 100%
+rename from gunicorn/workers/async.py
+rename to gunicorn/workers/_async.py
+diff --git a/gunicorn/workers/geventlet.py b/gunicorn/workers/geventlet.py
+index f0bb06495..0c0fa1dcb 100644
+--- a/gunicorn/workers/geventlet.py
 b/gunicorn/workers/geventlet.py
+@@ -24,7 +24,7 @@
+ import greenlet
+ 
+ from gunicorn.http.wsgi import sendfile as o_sendfile
+-from gunicorn.workers.async import AsyncWorker
++from gunicorn.workers._async import AsyncWorker
+ 
+ def _eventlet_sendfile(fdout, fdin, offset, nbytes):
+ while True:
+diff --git