From 82d873b325d4d5302550851d4eb5b2524e08ebedb81ae8d3bbca56084d1b12ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 9 Apr 2020 17:32:48 +0000 Subject: [PATCH] Accepting request 792774 from home:mcalabkova:branches:devel:languages:python - 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 OBS-URL: https://build.opensuse.org/request/show/792774 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gunicorn?expand=0&rev=44 --- gunicorn-19.10.0.tar.gz | 3 -- gunicorn-20.0.4.tar.gz | 3 ++ pytest5.patch | 67 ----------------------------------------- python-gunicorn.changes | 13 ++++++++ python-gunicorn.spec | 14 +++------ 5 files changed, 21 insertions(+), 79 deletions(-) delete mode 100644 gunicorn-19.10.0.tar.gz create mode 100644 gunicorn-20.0.4.tar.gz delete mode 100644 pytest5.patch diff --git a/gunicorn-19.10.0.tar.gz b/gunicorn-19.10.0.tar.gz deleted file mode 100644 index b97cf3b..0000000 --- a/gunicorn-19.10.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f9de24e358b841567063629cd0a656b26792a41e23a24d0dcb40224fc3940081 -size 406657 diff --git a/gunicorn-20.0.4.tar.gz b/gunicorn-20.0.4.tar.gz new file mode 100644 index 0000000..6061abb --- /dev/null +++ b/gunicorn-20.0.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1904bb2b8a43658807108d59c3f3d56c2b6121a701161de0ddf9ad140073c626 +size 373841 diff --git a/pytest5.patch b/pytest5.patch deleted file mode 100644 index e22b1f7..0000000 --- a/pytest5.patch +++ /dev/null @@ -1,67 +0,0 @@ -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(-) - -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', [ diff --git a/python-gunicorn.changes b/python-gunicorn.changes index 3ee9eb1..3de24cc 100644 --- a/python-gunicorn.changes +++ b/python-gunicorn.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Apr 8 14:16:12 UTC 2020 - Marketa Calabkova + +- 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 diff --git a/python-gunicorn.spec b/python-gunicorn.spec index 212da98..1b2c0ef 100644 --- a/python-gunicorn.spec +++ b/python-gunicorn.spec @@ -16,23 +16,24 @@ # +%define skip_python2 1 %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-gunicorn -Version: 19.10.0 +Version: 20.0.4 Release: 0 Summary: WSGI HTTP Server for UNIX License: MIT 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 -Patch0: pytest5.patch BuildRequires: %{python_module mock} BuildRequires: %{python_module pytest-cov} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module setuptools >= 3.0} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-Sphinx +Requires: python-setuptools >= 3.0 Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch @@ -57,7 +58,6 @@ This package contains the documentation. %prep %setup -q -n gunicorn-%{version} -%patch0 -p1 # remove version pinning for test requirements sed -i 's/==.*//' 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 %python_install %python_clone -a %{buildroot}%{_bindir}/gunicorn -%python_clone -a %{buildroot}%{_bindir}/gunicorn_paster %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -77,16 +76,13 @@ sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html %post %python_install_alternative gunicorn -%python_install_alternative gunicorn_paster %postun %python_uninstall_alternative gunicorn -%python_uninstall_alternative gunicorn_paster %files %{python_files} %license LICENSE %python_alternative %{_bindir}/gunicorn -%python_alternative %{_bindir}/gunicorn_paster %{python_sitelib}/* %files -n python-gunicorn-doc