!10 update version to 7.44.1
From: @guo-zhaorui Reviewed-by: @hanxinke Signed-off-by: @hanxinke
This commit is contained in:
commit
28468d7d70
@ -1,46 +0,0 @@
|
|||||||
From a03c4a4ea3fb42b347bada24faae1d31c7d0c90e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
Date: Tue, 1 Jun 2021 16:56:40 +0200
|
|
||||||
Subject: [PATCH] failonerror_test: skip the test with curl-7.75.0+
|
|
||||||
|
|
||||||
libcurl does not provide the reason phrase from HTTP status line
|
|
||||||
in the error buffer any more:
|
|
||||||
|
|
||||||
https://github.com/curl/curl/issues/6615
|
|
||||||
|
|
||||||
Fixes: https://github.com/pycurl/pycurl/issues/679
|
|
||||||
---
|
|
||||||
tests/failonerror_test.py | 6 ++++++
|
|
||||||
1 file changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/tests/failonerror_test.py b/tests/failonerror_test.py
|
|
||||||
index dc4d8cd6b..519aed821 100644
|
|
||||||
--- a/tests/failonerror_test.py
|
|
||||||
+++ b/tests/failonerror_test.py
|
|
||||||
@@ -21,6 +21,8 @@ def tearDown(self):
|
|
||||||
# not sure what the actual min is but 7.26 is too old
|
|
||||||
# and does not include status text, only the status code
|
|
||||||
@util.min_libcurl(7, 38, 0)
|
|
||||||
+ # no longer supported by libcurl: https://github.com/curl/curl/issues/6615
|
|
||||||
+ @util.removed_in_libcurl(7, 75, 0)
|
|
||||||
def test_failonerror(self):
|
|
||||||
self.curl.setopt(pycurl.URL, 'http://%s:8380/status/403' % localhost)
|
|
||||||
sio = util.BytesIO()
|
|
||||||
@@ -41,6 +43,8 @@ def test_failonerror(self):
|
|
||||||
# not sure what the actual min is but 7.26 is too old
|
|
||||||
# and does not include status text, only the status code
|
|
||||||
@util.min_libcurl(7, 38, 0)
|
|
||||||
+ # no longer supported by libcurl: https://github.com/curl/curl/issues/6615
|
|
||||||
+ @util.removed_in_libcurl(7, 75, 0)
|
|
||||||
def test_failonerror_status_line_invalid_utf8_python2(self):
|
|
||||||
self.curl.setopt(pycurl.URL, 'http://%s:8380/status_invalid_utf8' % localhost)
|
|
||||||
sio = util.BytesIO()
|
|
||||||
@@ -61,6 +65,8 @@ def test_failonerror_status_line_invalid_utf8_python2(self):
|
|
||||||
# not sure what the actual min is but 7.26 is too old
|
|
||||||
# and does not include status text, only the status code
|
|
||||||
@util.min_libcurl(7, 38, 0)
|
|
||||||
+ # no longer supported by libcurl: https://github.com/curl/curl/issues/6615
|
|
||||||
+ @util.removed_in_libcurl(7, 75, 0)
|
|
||||||
def test_failonerror_status_line_invalid_utf8_python3(self):
|
|
||||||
self.curl.setopt(pycurl.URL, 'http://%s:8380/status_invalid_utf8' % localhost)
|
|
||||||
sio = util.BytesIO()
|
|
||||||
@ -1,64 +0,0 @@
|
|||||||
From 18f1103fb9c6b4dc2233e323e3df1818db25c209 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
Date: Thu, 27 May 2021 10:52:09 +0200
|
|
||||||
Subject: [PATCH] option_constants_test: skip check of SSLVERSION_SSLv*
|
|
||||||
|
|
||||||
... with curl-7.77.0, where they started to return
|
|
||||||
CURLE_BAD_FUNCTION_ARGUMENT:
|
|
||||||
|
|
||||||
https://github.com/curl/curl/pull/6773
|
|
||||||
|
|
||||||
Closes: https://github.com/pycurl/pycurl/pull/689
|
|
||||||
---
|
|
||||||
tests/option_constants_test.py | 9 ++++++++-
|
|
||||||
tests/util.py | 15 +++++++++++++++
|
|
||||||
2 files changed, 23 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/tests/option_constants_test.py b/tests/option_constants_test.py
|
|
||||||
index 20228c66f..8b3bd9c69 100644
|
|
||||||
--- a/tests/option_constants_test.py
|
|
||||||
+++ b/tests/option_constants_test.py
|
|
||||||
@@ -164,9 +164,16 @@ def test_gssapi_delegation_options(self):
|
|
||||||
def test_sslversion_options(self):
|
|
||||||
curl = pycurl.Curl()
|
|
||||||
curl.setopt(curl.SSLVERSION, curl.SSLVERSION_DEFAULT)
|
|
||||||
+ curl.setopt(curl.SSLVERSION, curl.SSLVERSION_TLSv1)
|
|
||||||
+ curl.close()
|
|
||||||
+
|
|
||||||
+ # SSLVERSION_SSLv* return CURLE_BAD_FUNCTION_ARGUMENT with curl-7.77.0
|
|
||||||
+ @util.removed_in_libcurl(7, 77, 0)
|
|
||||||
+ @util.only_ssl
|
|
||||||
+ def test_legacy_sslversion_options(self):
|
|
||||||
+ curl = pycurl.Curl()
|
|
||||||
curl.setopt(curl.SSLVERSION, curl.SSLVERSION_SSLv2)
|
|
||||||
curl.setopt(curl.SSLVERSION, curl.SSLVERSION_SSLv3)
|
|
||||||
- curl.setopt(curl.SSLVERSION, curl.SSLVERSION_TLSv1)
|
|
||||||
curl.close()
|
|
||||||
|
|
||||||
@util.min_libcurl(7, 34, 0)
|
|
||||||
diff --git a/tests/util.py b/tests/util.py
|
|
||||||
index e12e25152..37ad2f9ab 100644
|
|
||||||
--- a/tests/util.py
|
|
||||||
+++ b/tests/util.py
|
|
||||||
@@ -122,6 +122,21 @@ def decorated(*args, **kwargs):
|
|
||||||
|
|
||||||
return decorator
|
|
||||||
|
|
||||||
+def removed_in_libcurl(major, minor, patch):
|
|
||||||
+ import nose.plugins.skip
|
|
||||||
+
|
|
||||||
+ def decorator(fn):
|
|
||||||
+ @functools.wraps(fn)
|
|
||||||
+ def decorated(*args, **kwargs):
|
|
||||||
+ if not pycurl_version_less_than(major, minor, patch):
|
|
||||||
+ raise nose.plugins.skip.SkipTest('libcurl >= %d.%d.%d' % (major, minor, patch))
|
|
||||||
+
|
|
||||||
+ return fn(*args, **kwargs)
|
|
||||||
+
|
|
||||||
+ return decorated
|
|
||||||
+
|
|
||||||
+ return decorator
|
|
||||||
+
|
|
||||||
def only_ssl(fn):
|
|
||||||
import nose.plugins.skip
|
|
||||||
import pycurl
|
|
||||||
Binary file not shown.
BIN
pycurl-7.44.1.tar.gz
Normal file
BIN
pycurl-7.44.1.tar.gz
Normal file
Binary file not shown.
@ -6,17 +6,14 @@
|
|||||||
%global srcname pycurl
|
%global srcname pycurl
|
||||||
|
|
||||||
Name: python-%{srcname}
|
Name: python-%{srcname}
|
||||||
Version: 7.43.0.6
|
Version: 7.44.1
|
||||||
Release: 2
|
Release: 1
|
||||||
Summary: A Python interface to libcurl
|
Summary: A Python interface to libcurl
|
||||||
License: LGPLv2+ or MIT
|
License: LGPLv2+ or MIT
|
||||||
URL: http://pycurl.sourceforge.net/
|
URL: http://pycurl.sourceforge.net/
|
||||||
Source0: %{pypi_source}
|
Source0: %{pypi_source}
|
||||||
# drop link-time vs. run-time TLS backend check (#1446850)
|
# drop link-time vs. run-time TLS backend check (#1446850)
|
||||||
|
|
||||||
Patch6000: backport-option_constants_test-skip-check-of-SSLVERSION_SSLv*.patch
|
|
||||||
Patch6001: backport-failonerror_test-skip-the-test-with-curl-7.75.0+.patch
|
|
||||||
|
|
||||||
BuildRequires: gcc libcurl-devel openssl-devel vsftpd
|
BuildRequires: gcc libcurl-devel openssl-devel vsftpd
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -25,7 +22,6 @@ objects identified by a URL from a Python program, similar to the
|
|||||||
urllib Python module. PycURL is mature, very fast, and supports a lot
|
urllib Python module. PycURL is mature, very fast, and supports a lot
|
||||||
of features.
|
of features.
|
||||||
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for %{name}
|
Summary: Development files for %{name}
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
@ -38,7 +34,7 @@ This package contains development files for %{name}
|
|||||||
%package -n python3-pycurl
|
%package -n python3-pycurl
|
||||||
Summary: Python interface to libcurl for Python 3
|
Summary: Python interface to libcurl for Python 3
|
||||||
%{?python_provide:%python_provide python3-pycurl}
|
%{?python_provide:%python_provide python3-pycurl}
|
||||||
BuildRequires: python3-devel python3-bottle python3-nose python3-pyflakes
|
BuildRequires: python3-devel python3-bottle python3-pyflakes python3-pytest
|
||||||
Requires: libcurl >= %{libcurl_ver}
|
Requires: libcurl >= %{libcurl_ver}
|
||||||
|
|
||||||
%description -n python3-pycurl
|
%description -n python3-pycurl
|
||||||
@ -74,9 +70,14 @@ export PYCURL_SSL_LIBRARY=openssl
|
|||||||
rm -rf %{buildroot}%{_datadir}/doc/pycurl
|
rm -rf %{buildroot}%{_datadir}/doc/pycurl
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
# relax crypto policy for the test-suite to make it pass again (#1863711)
|
||||||
|
export OPENSSL_SYSTEM_CIPHERS_OVERRIDE=XXX
|
||||||
|
export OPENSSL_CONF=
|
||||||
|
|
||||||
export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
||||||
export PYCURL_SSL_LIBRARY=openssl
|
export PYCURL_SSL_LIBRARY=openssl
|
||||||
export PYCURL_VSFTPD_PATH=vsftpd
|
export PYCURL_VSFTPD_PATH=vsftpd
|
||||||
|
export PYTEST_ADDOPTS="--ignore examples -m 'not online'"
|
||||||
make test PYTHON=%{__python3} NOSETESTS="nosetests-%{python3_version} -v" PYFLAKES=true
|
make test PYTHON=%{__python3} NOSETESTS="nosetests-%{python3_version} -v" PYFLAKES=true
|
||||||
rm -fv tests/fake-curl/libcurl/*.so
|
rm -fv tests/fake-curl/libcurl/*.so
|
||||||
|
|
||||||
@ -96,6 +97,9 @@ rm -fv tests/fake-curl/libcurl/*.so
|
|||||||
%{python3_sitearch}/pycurl-%{version}-*.egg-info
|
%{python3_sitearch}/pycurl-%{version}-*.egg-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 29 2021 guozhaorui <guozhaorui1@huawei.com> - 7.44.1-1
|
||||||
|
- update version to 7.44.1
|
||||||
|
|
||||||
* Sat Jul 24 2021 shixuantong <shixuantong@huawei.com> - 7.43.0.6-2
|
* Sat Jul 24 2021 shixuantong <shixuantong@huawei.com> - 7.43.0.6-2
|
||||||
- fix test fail for test_sslversion_options, test_failonerror and test_failonerror_status_line_invalid_utf8_python3
|
- fix test fail for test_sslversion_options, test_failonerror and test_failonerror_status_line_invalid_utf8_python3
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user