From 4963c29af7ded2eeeeb23473b9b26176e2fb5d57 Mon Sep 17 00:00:00 2001 From: Shuo Wang Date: Mon, 25 Sep 2023 15:43:11 +0800 Subject: [PATCH] update to 7.45.2 Signed-off-by: Shuo Wang --- ...ycurl-7.45.1-curl-7.83-compatibility.patch | 40 ------------------- ...l-7.45.2-disable-test_http_version_3.patch | 29 ++++++++++++++ python-pycurl.spec | 29 ++++++++------ sources | 2 +- 4 files changed, 46 insertions(+), 54 deletions(-) delete mode 100644 0002-python-pycurl-7.45.1-curl-7.83-compatibility.patch create mode 100644 0002-python-pycurl-7.45.2-disable-test_http_version_3.patch diff --git a/0002-python-pycurl-7.45.1-curl-7.83-compatibility.patch b/0002-python-pycurl-7.45.1-curl-7.83-compatibility.patch deleted file mode 100644 index cb9c5ee..0000000 --- a/0002-python-pycurl-7.45.1-curl-7.83-compatibility.patch +++ /dev/null @@ -1,40 +0,0 @@ -From d47c68b1364f8a1a45ab8c584c291d44b762f7b1 Mon Sep 17 00:00:00 2001 -From: Samuel Henrique -Date: Sat, 30 Apr 2022 23:02:34 +0100 -Subject: [PATCH] tests: fix error message on error_test (for curl >= 7.83) - -curl 7.83.0 removed exclamation marks from a few error messages, curl commit: -https://github.com/curl/curl/commit/6968fb9d54dc3a1aaa1b16088f038eaf5dd8b2d7 - -This commit adds support for the new curl release while also supporting the previous ones. ---- - tests/error_test.py | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/tests/error_test.py b/tests/error_test.py -index 01d0ac5ee..f32b693cb 100644 ---- a/tests/error_test.py -+++ b/tests/error_test.py -@@ -29,7 +29,8 @@ def test_pycurl_error_libcurl(self): - err, msg = exc.args - self.assertEqual(pycurl.E_URL_MALFORMAT, err) - # possibly fragile -- self.assertEqual('No URL set!', msg) -+ # curl < 7.83.0 has an exclamation mark in this error message -+ self.assertIn(msg, ['No URL set!', 'No URL set']) - else: - self.fail('Expected pycurl.error to be raised') - -@@ -43,9 +44,10 @@ def test_pycurl_errstr_type(self): - self.curl.perform() - except pycurl.error: - # might be fragile -- self.assertEqual('No URL set!', self.curl.errstr()) -+ # curl < 7.83.0 has an exclamation mark in this error message -+ self.assertIn(self.curl.errstr(), ['No URL set!', 'No URL set']) - # repeated checks do not clear value -- self.assertEqual('No URL set!', self.curl.errstr()) -+ self.assertIn(self.curl.errstr(), ['No URL set!', 'No URL set']) - # check the type - on all python versions - self.assertEqual(str, type(self.curl.errstr())) - else: diff --git a/0002-python-pycurl-7.45.2-disable-test_http_version_3.patch b/0002-python-pycurl-7.45.2-disable-test_http_version_3.patch new file mode 100644 index 0000000..388e48f --- /dev/null +++ b/0002-python-pycurl-7.45.2-disable-test_http_version_3.patch @@ -0,0 +1,29 @@ +From 6c55e6822a064edb8dd6dfe1ee21080f4f30b5cf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= +Date: Tue, 7 Mar 2023 16:32:19 +0100 +Subject: [PATCH] tests: temporarily disable test_http_version_3 + +HTTP3 support in curl is only experimental at the moment and is disabled +in the corresponding Fedora package. +--- + tests/option_constants_test.py | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/tests/option_constants_test.py b/tests/option_constants_test.py +index 7b94164..04dc3da 100644 +--- a/tests/option_constants_test.py ++++ b/tests/option_constants_test.py +@@ -508,10 +508,6 @@ class OptionConstantsSettingTest(unittest.TestCase): + def test_http_version_2prior_knowledge(self): + self.curl.setopt(self.curl.HTTP_VERSION, self.curl.CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE) + +- @util.min_libcurl(7, 66, 0) +- def test_http_version_3(self): +- self.curl.setopt(self.curl.HTTP_VERSION, self.curl.CURL_HTTP_VERSION_3) +- + @util.min_libcurl(7, 21, 5) + def test_sockopt_constants(self): + assert self.curl.SOCKOPT_OK is not None +-- +2.39.2 + diff --git a/python-pycurl.spec b/python-pycurl.spec index 66f6032..941a88f 100644 --- a/python-pycurl.spec +++ b/python-pycurl.spec @@ -1,16 +1,16 @@ -%global modname pycurl +%global srcname pycurl %global libcurl_ver %(sed '/^#define LIBCURL_VERSION "/!d;s/"[^"]*$//;s/.*"//;q'} /usr/include/curl/curlver.h 2>/dev/null || echo 0) Summary: A Python interface to libcurl -Name: python-%{modname} -Version: 7.45.1 -Release: 5%{?dist} +Name: python-%{srcname} +Version: 7.45.2 +Release: 1%{?dist} License: LGPLv2+ or MIT URL: http://pycurl.io/ -Source0: https://files.pythonhosted.org/packages/47/f9/c41d6830f7bd4e70d5726d26f8564538d08ca3a7ac3db98b325f94cdcb7f/pycurl-%{version}.tar.gz +Source0: %{pypi_source} -Patch1: 0001-python-pycurl-7.45.1-tls-backend.patch -Patch2: 0002-python-pycurl-7.45.1-curl-7.83-compatibility.patch +Patch3001: 0001-python-pycurl-7.45.1-tls-backend.patch +Patch3002: 0002-python-pycurl-7.45.2-disable-test_http_version_3.patch BuildRequires: gcc make vsftpd libcurl-devel openssl-devel @@ -19,18 +19,18 @@ PycURL is a Python interface to libcurl, the multiprotocol file transfer library Similarly to the urllib Python module, PycURL can be used to fetch objects identified by a URL from a Python program. -%package -n python3-%{modname} +%package -n python3-%{srcname} Summary: Python interface to libcurl for Python 3 BuildRequires: python3-devel python3-setuptools Requires: libcurl >= %{libcurl_ver} -%description -n python3-%{modname} +%description -n python3-%{srcname} PycURL is a Python interface to libcurl, the multiprotocol file transfer library. Similarly to the urllib Python module, PycURL can be used to fetch objects identified by a URL from a Python program. %prep -%autosetup -n %{modname}-%{version} -p1 +%autosetup -n %{srcname}-%{version} -p1 rm -fv winbuild.py sed -e 's|python |%{python3} |' -i tests/ext/test-suite.sh @@ -59,14 +59,17 @@ make test PYTHON=%{__python3} PYTEST=true PYFLAKES=true rm -fv tests/fake-curl/libcurl/*.so rm -fvr tests/__pycache__ -%files -n python3-%{modname} +%files -n python3-%{srcname} %license COPYING-LGPL COPYING-MIT %doc ChangeLog README.rst examples doc tests %{python3_sitearch}/curl/ -%{python3_sitearch}/%{modname}.*.so -%{python3_sitearch}/%{modname}-%{version}-*.egg-info +%{python3_sitearch}/%{srcname}.*.so +%{python3_sitearch}/%{srcname}-%{version}-*.egg-info %changelog +* Mon Sep 25 2023 Shuo Wang - 7.45.2-1 +- update to 7.45.2 + * Tue Sep 19 2023 OpenCloudOS Release Engineering - 7.45.1-5 - Rebuilt for python 3.11 diff --git a/sources b/sources index 57ae7c1..eb186a8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pycurl-7.45.1.tar.gz) = 05639d484aac6d6688677589e391975158c5ef778456a47df575ad13fb8bd0db67ff8f5a39bdd99d82a67926aca421c01e687eec9d4fd87f32822b492b429635 +SHA512 (pycurl-7.45.2.tar.gz) = 8a82346395acfc0bd37a8c4d8d2b17e5ab4602710308ed50f9ed88c223c73f15f5b1c95fc6191708e3bd9d647e4bc5ec91f740de433dd87e2ae0796ac79879ac -- Gitee