update to 7.44.0
This commit is contained in:
parent
714857eb7c
commit
73039231bf
@ -1,56 +0,0 @@
|
|||||||
From b3a1ff559c28f71702248cae317fa83baaa086a0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
Date: Mon, 26 Oct 2020 17:26:23 +0100
|
|
||||||
Subject: [PATCH] src/module.c: make the code compile against python-3.10.0a1
|
|
||||||
|
|
||||||
src/module.c:353:25: error: lvalue required as left operand of assignment
|
|
||||||
353 | Py_TYPE(&Curl_Type) = &PyType_Type;
|
|
||||||
| ^
|
|
||||||
src/module.c:354:30: error: lvalue required as left operand of assignment
|
|
||||||
354 | Py_TYPE(&CurlMulti_Type) = &PyType_Type;
|
|
||||||
| ^
|
|
||||||
src/module.c:355:30: error: lvalue required as left operand of assignment
|
|
||||||
355 | Py_TYPE(&CurlShare_Type) = &PyType_Type;
|
|
||||||
| ^
|
|
||||||
|
|
||||||
Bug: https://bugzilla.redhat.com/1890442
|
|
||||||
|
|
||||||
Upstream-commit: c4036bdcb5dd01420a451cf02efac7c3fdf9e41f
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
src/module.c | 12 +++++++++---
|
|
||||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/module.c b/src/module.c
|
|
||||||
index 65e8c3a..9204ee0 100644
|
|
||||||
--- a/src/module.c
|
|
||||||
+++ b/src/module.c
|
|
||||||
@@ -11,6 +11,12 @@
|
|
||||||
|
|
||||||
#define PYCURL_VERSION_PREFIX "PycURL/" PYCURL_VERSION_STRING
|
|
||||||
|
|
||||||
+/* needed for compatibility with python < 3.10, as suggested at:
|
|
||||||
+ * https://docs.python.org/3.10/whatsnew/3.10.html#id2 */
|
|
||||||
+#if PY_VERSION_HEX < 0x030900A4
|
|
||||||
+# define Py_SET_TYPE(obj, type) ((Py_TYPE(obj) = (type)), (void)0)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
PYCURL_INTERNAL char *empty_keywords[] = { NULL };
|
|
||||||
|
|
||||||
PYCURL_INTERNAL PyObject *bytesio = NULL;
|
|
||||||
@@ -412,9 +418,9 @@ initpycurl(void)
|
|
||||||
p_Curl_Type = &Curl_Type;
|
|
||||||
p_CurlMulti_Type = &CurlMulti_Type;
|
|
||||||
p_CurlShare_Type = &CurlShare_Type;
|
|
||||||
- Py_TYPE(&Curl_Type) = &PyType_Type;
|
|
||||||
- Py_TYPE(&CurlMulti_Type) = &PyType_Type;
|
|
||||||
- Py_TYPE(&CurlShare_Type) = &PyType_Type;
|
|
||||||
+ Py_SET_TYPE(&Curl_Type, &PyType_Type);
|
|
||||||
+ Py_SET_TYPE(&CurlMulti_Type, &PyType_Type);
|
|
||||||
+ Py_SET_TYPE(&CurlShare_Type, &PyType_Type);
|
|
||||||
|
|
||||||
/* Create the module and add the functions */
|
|
||||||
if (PyType_Ready(&Curl_Type) < 0)
|
|
||||||
--
|
|
||||||
2.25.4
|
|
||||||
|
|
||||||
@ -1,123 +0,0 @@
|
|||||||
From bffb28426a6fd2ebdec6223b271fc1d636d6ee8f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
Date: Thu, 27 May 2021 10:52:09 +0200
|
|
||||||
Subject: [PATCH 1/2] 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
|
|
||||||
|
|
||||||
Upstream-commit: 18f1103fb9c6b4dc2233e323e3df1818db25c209
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
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 bd0d62d..2f66e7b 100644
|
|
||||||
--- a/tests/option_constants_test.py
|
|
||||||
+++ b/tests/option_constants_test.py
|
|
||||||
@@ -164,9 +164,16 @@ class OptionConstantsTest(unittest.TestCase):
|
|
||||||
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 e12e251..37ad2f9 100644
|
|
||||||
--- a/tests/util.py
|
|
||||||
+++ b/tests/util.py
|
|
||||||
@@ -122,6 +122,21 @@ def min_libcurl(major, minor, patch):
|
|
||||||
|
|
||||||
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
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
||||||
|
|
||||||
From 3d0cec1e21e4edd204204e2498828b1241c08bfe Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
Date: Tue, 1 Jun 2021 16:56:40 +0200
|
|
||||||
Subject: [PATCH 2/2] 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
|
|
||||||
|
|
||||||
Upstream-commit: a03c4a4ea3fb42b347bada24faae1d31c7d0c90e
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
tests/failonerror_test.py | 6 ++++++
|
|
||||||
1 file changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/tests/failonerror_test.py b/tests/failonerror_test.py
|
|
||||||
index 607c21d..777f575 100644
|
|
||||||
--- a/tests/failonerror_test.py
|
|
||||||
+++ b/tests/failonerror_test.py
|
|
||||||
@@ -21,6 +21,8 @@ class FailonerrorTest(unittest.TestCase):
|
|
||||||
# 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 @@ class FailonerrorTest(unittest.TestCase):
|
|
||||||
# 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 @@ class FailonerrorTest(unittest.TestCase):
|
|
||||||
# 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()
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
||||||
@ -22,27 +22,21 @@
|
|||||||
%global modname pycurl
|
%global modname pycurl
|
||||||
|
|
||||||
Name: python-%{modname}
|
Name: python-%{modname}
|
||||||
Version: 7.43.0.6
|
Version: 7.44.0
|
||||||
Release: 10%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A Python interface to libcurl
|
Summary: A Python interface to libcurl
|
||||||
|
|
||||||
License: LGPLv2+ or MIT
|
License: LGPLv2+ or MIT
|
||||||
URL: http://pycurl.io/
|
URL: http://pycurl.io/
|
||||||
Source0: https://files.pythonhosted.org/packages/50/1a/35b1d8b8e4e23a234f1b17a8a40299fd550940b16866c9a1f2d47a04b969/pycurl-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/0f/db/856a430445d6cd631a7c97f028e3a9d947f84a1a27c42b5d47245eae920e/pycurl-%{version}.tar.gz
|
||||||
|
|
||||||
# make the code compile against python-3.10.0a1 (#1890442)
|
|
||||||
Patch1: 0001-python-pycurl-7.43.0.6-python-3.10.patch
|
|
||||||
|
|
||||||
# drop link-time vs. run-time TLS backend check (#1446850)
|
# drop link-time vs. run-time TLS backend check (#1446850)
|
||||||
Patch2: 0002-python-pycurl-7.43.0-tls-backend.patch
|
Patch2: 0002-python-pycurl-7.43.0-tls-backend.patch
|
||||||
|
|
||||||
# skip tests which are incompatible with recent releases of libcurl (#1965235)
|
|
||||||
Patch3: 0003-python-pycurl-7.43.0.6-tests.patch
|
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: libcurl-devel
|
BuildRequires: libcurl-devel
|
||||||
BuildRequires: openssl-devel
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
|
BuildRequires: openssl-devel
|
||||||
BuildRequires: vsftpd
|
BuildRequires: vsftpd
|
||||||
|
|
||||||
# During its initialization, PycURL checks that the actual libcurl version
|
# During its initialization, PycURL checks that the actual libcurl version
|
||||||
@ -85,10 +79,10 @@ Summary: Python interface to libcurl for Python 3
|
|||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
BuildRequires: python3-bottle
|
BuildRequires: python3-bottle
|
||||||
BuildRequires: python3-nose
|
BuildRequires: python3-pytest
|
||||||
%global nosetests nosetests-%{python3_version} -v
|
%global pytest pytest
|
||||||
%else
|
%else
|
||||||
%global nosetests true
|
%global pytest true
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
Requires: libcurl%{?_isa} >= %{libcurl_ver}
|
Requires: libcurl%{?_isa} >= %{libcurl_ver}
|
||||||
@ -106,26 +100,27 @@ Python 3 version.
|
|||||||
%autosetup -n %{modname}-%{version} -p1
|
%autosetup -n %{modname}-%{version} -p1
|
||||||
|
|
||||||
# remove windows-specific build script
|
# remove windows-specific build script
|
||||||
rm -f winbuild.py
|
rm -fv winbuild.py
|
||||||
sed -e 's| winbuild.py||' -i Makefile
|
sed -e 's| winbuild.py||' -i Makefile
|
||||||
|
|
||||||
# remove binaries packaged by upstream
|
# remove binaries packaged by upstream
|
||||||
rm -f tests/fake-curl/libcurl/*.so
|
rm -fv tests/fake-curl/libcurl/*.so
|
||||||
|
|
||||||
# remove a test-case that relies on sftp://web.sourceforge.net being available
|
# remove a test-case that relies on sftp://web.sourceforge.net being available
|
||||||
rm -f tests/ssh_key_cb_test.py
|
rm -fv tests/ssh_key_cb_test.py
|
||||||
|
|
||||||
# remove a test-case that fails in Koji
|
# remove a test-case that fails in Koji
|
||||||
rm -f tests/seek_cb_test.py
|
rm -fv tests/seek_cb_test.py
|
||||||
|
|
||||||
# remove tests depending on the 'flaky' nose plug-in (not available in Fedora)
|
# remove test-cases that depend on external network
|
||||||
|
rm -fv examples/tests/test_{build_config,xmlrpc}.py
|
||||||
|
|
||||||
|
# remove a test-case that depends on pygtk
|
||||||
|
rm -fv examples/tests/test_gtk.py
|
||||||
|
|
||||||
|
# remove tests depending on the 'flaky' python module
|
||||||
grep '^import flaky' -r tests | cut -d: -f1 | xargs rm -fv
|
grep '^import flaky' -r tests | cut -d: -f1 | xargs rm -fv
|
||||||
|
|
||||||
# drop options that are not supported by nose in Fedora
|
|
||||||
sed -e 's/ --show-skipped//' \
|
|
||||||
-e 's/ --with-flaky//' \
|
|
||||||
-i tests/run.sh
|
|
||||||
|
|
||||||
# use %%{python3} instead of python to invoke tests, to make them work on f34
|
# use %%{python3} instead of python to invoke tests, to make them work on f34
|
||||||
sed -e 's|python |%{python3} |' -i tests/ext/test-suite.sh
|
sed -e 's|python |%{python3} |' -i tests/ext/test-suite.sh
|
||||||
sed -e 's|^#! */usr/bin/env python$|#! /usr/bin/env %{python3}|' \
|
sed -e 's|^#! */usr/bin/env python$|#! /usr/bin/env %{python3}|' \
|
||||||
@ -158,7 +153,7 @@ 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
|
||||||
make test PYTHON=%{__python3} NOSETESTS="%{nosetests}" PYFLAKES=true
|
make test PYTHON=%{__python3} PYTEST=%{pytest} PYFLAKES=true
|
||||||
rm -fv tests/fake-curl/libcurl/*.so
|
rm -fv tests/fake-curl/libcurl/*.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -181,6 +176,9 @@ rm -fv tests/fake-curl/libcurl/*.so
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 10 2021 Kamil Dudka <kdudka@redhat.com> - 7.44.0-1
|
||||||
|
- update to 7.44.0
|
||||||
|
|
||||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7.43.0.6-10
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7.43.0.6-10
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
|||||||
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (pycurl-7.43.0.6.tar.gz) = 5625d9e38159fb785afaf539372a8ac658d9118fb25f581f11629859fde400b6fccf65e03a19e182534a78169531304639b1e6f1bfdd2cb09bce95d581b52850
|
SHA512 (pycurl-7.44.0.tar.gz) = 9e371796650cd698ec50236714cba203782d793154f8325c8b2f106d2ce9b1a60766d7641b84702ec32dc83fa6e3ffe16cb774cb9ccba9747cfb089d9caec8e6
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user