Accepting request 792782 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/792782 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-gunicorn?expand=0&rev=18
This commit is contained in:
commit
208bbc3657
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:f9de24e358b841567063629cd0a656b26792a41e23a24d0dcb40224fc3940081
|
|
||||||
size 406657
|
|
3
gunicorn-20.0.4.tar.gz
Normal file
3
gunicorn-20.0.4.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:1904bb2b8a43658807108d59c3f3d56c2b6121a701161de0ddf9ad140073c626
|
||||||
|
size 373841
|
@ -1,67 +0,0 @@
|
|||||||
From f38f717539b1b7296720805b8ae3969c3509b9c1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Martin=20Ba=C5=A1ti?= <mbasti@redhat.com>
|
|
||||||
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 <mbasti@redhat.com>
|
|
||||||
---
|
|
||||||
tests/test_util.py | 20 ++++++++++----------
|
|
||||||
1 file changed, 10 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
Index: gunicorn-19.9.0/tests/test_util.py
|
|
||||||
===================================================================
|
|
||||||
--- gunicorn-19.9.0.orig/tests/test_util.py
|
|
||||||
+++ gunicorn-19.9.0/tests/test_util.py
|
|
||||||
@@ -24,9 +24,9 @@ def test_parse_address(test_input, expec
|
|
||||||
|
|
||||||
|
|
||||||
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():
|
|
||||||
@@ -52,24 +52,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)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('test_input, expected', [
|
|
@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 8 14:16:12 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||||
|
|
||||||
|
- update to 20.0.4
|
||||||
|
* Ensure WSGI header value is string before conducting regex search on it.
|
||||||
|
* Use importlib instead of __import__ and eval
|
||||||
|
* Use Python default SSL cipher list by default
|
||||||
|
* Support str and bytes for UNIX socket addresses
|
||||||
|
* fixed the way the config module is loaded. __file__ is now available
|
||||||
|
* only support Python >= 3.5
|
||||||
|
* load the WSGI application before the loader to pick up all files
|
||||||
|
- Dropped patch pytest5.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Mar 31 09:59:42 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
Tue Mar 31 09:59:42 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||||
|
|
||||||
|
@ -16,23 +16,24 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define skip_python2 1
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-gunicorn
|
Name: python-gunicorn
|
||||||
Version: 19.10.0
|
Version: 20.0.4
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: WSGI HTTP Server for UNIX
|
Summary: WSGI HTTP Server for UNIX
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: http://gunicorn.org
|
URL: https://gunicorn.org
|
||||||
Source: https://files.pythonhosted.org/packages/source/g/gunicorn/gunicorn-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/g/gunicorn/gunicorn-%{version}.tar.gz
|
||||||
Patch0: pytest5.patch
|
|
||||||
BuildRequires: %{python_module mock}
|
BuildRequires: %{python_module mock}
|
||||||
BuildRequires: %{python_module pytest-cov}
|
BuildRequires: %{python_module pytest-cov}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools >= 3.0}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python3-Sphinx
|
BuildRequires: python3-Sphinx
|
||||||
|
Requires: python-setuptools >= 3.0
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -57,7 +58,6 @@ This package contains the documentation.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n gunicorn-%{version}
|
%setup -q -n gunicorn-%{version}
|
||||||
%patch0 -p1
|
|
||||||
# remove version pinning for test requirements
|
# remove version pinning for test requirements
|
||||||
sed -i 's/==.*//' requirements_test.txt
|
sed -i 's/==.*//' requirements_test.txt
|
||||||
sed -i -e '/cover/d' requirements_test.txt
|
sed -i -e '/cover/d' requirements_test.txt
|
||||||
@ -69,7 +69,6 @@ sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html
|
|||||||
%install
|
%install
|
||||||
%python_install
|
%python_install
|
||||||
%python_clone -a %{buildroot}%{_bindir}/gunicorn
|
%python_clone -a %{buildroot}%{_bindir}/gunicorn
|
||||||
%python_clone -a %{buildroot}%{_bindir}/gunicorn_paster
|
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@ -77,16 +76,13 @@ sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative gunicorn
|
%python_install_alternative gunicorn
|
||||||
%python_install_alternative gunicorn_paster
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%python_uninstall_alternative gunicorn
|
%python_uninstall_alternative gunicorn
|
||||||
%python_uninstall_alternative gunicorn_paster
|
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%python_alternative %{_bindir}/gunicorn
|
%python_alternative %{_bindir}/gunicorn
|
||||||
%python_alternative %{_bindir}/gunicorn_paster
|
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
%files -n python-gunicorn-doc
|
%files -n python-gunicorn-doc
|
||||||
|
Loading…
Reference in New Issue
Block a user