parent
40c26622a5
commit
e2cc88ff0f
@ -1,98 +0,0 @@
|
||||
From 41728025340a02643085adcbcecf986ad8667209 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Talbert <swt@techie.net>
|
||||
Date: Tue, 17 Aug 2021 20:39:00 -0400
|
||||
Subject: [PATCH] Fix warnings when running tests
|
||||
|
||||
---
|
||||
tests/memory_mgmt_test.py | 4 ++--
|
||||
tests/reload_test.py | 4 ++--
|
||||
tests/setopt_lifecycle_test.py | 1 +
|
||||
tests/setopt_test.py | 8 ++++----
|
||||
4 files changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/tests/memory_mgmt_test.py b/tests/memory_mgmt_test.py
|
||||
index 416fd4c..ec841f2 100644
|
||||
--- a/tests/memory_mgmt_test.py
|
||||
+++ b/tests/memory_mgmt_test.py
|
||||
@@ -297,7 +297,7 @@ class MemoryMgmtTest(unittest.TestCase):
|
||||
|
||||
gc.collect()
|
||||
after_object_count = len(gc.get_objects())
|
||||
- self.assert_(after_object_count <= before_object_count + 1000, 'Grew from %d to %d objects' % (before_object_count, after_object_count))
|
||||
+ self.assertTrue(after_object_count <= before_object_count + 1000, 'Grew from %d to %d objects' % (before_object_count, after_object_count))
|
||||
c.close()
|
||||
|
||||
def test_form_bufferptr_memory_leak_gh267(self):
|
||||
@@ -317,7 +317,7 @@ class MemoryMgmtTest(unittest.TestCase):
|
||||
|
||||
gc.collect()
|
||||
after_object_count = len(gc.get_objects())
|
||||
- self.assert_(after_object_count <= before_object_count + 1000, 'Grew from %d to %d objects' % (before_object_count, after_object_count))
|
||||
+ self.assertTrue(after_object_count <= before_object_count + 1000, 'Grew from %d to %d objects' % (before_object_count, after_object_count))
|
||||
c.close()
|
||||
|
||||
def do_data_refcounting(self, option):
|
||||
diff --git a/tests/reload_test.py b/tests/reload_test.py
|
||||
index 3f037a1..e6c1fbc 100644
|
||||
--- a/tests/reload_test.py
|
||||
+++ b/tests/reload_test.py
|
||||
@@ -14,6 +14,6 @@ class ReloadTest(unittest.TestCase):
|
||||
reload_fn = reload
|
||||
except NameError:
|
||||
# python 3
|
||||
- import imp
|
||||
- reload_fn = imp.reload
|
||||
+ import importlib
|
||||
+ reload_fn = importlib.reload
|
||||
reload_fn(pycurl)
|
||||
diff --git a/tests/setopt_lifecycle_test.py b/tests/setopt_lifecycle_test.py
|
||||
index 1adb70c..eacedc8 100644
|
||||
--- a/tests/setopt_lifecycle_test.py
|
||||
+++ b/tests/setopt_lifecycle_test.py
|
||||
@@ -17,6 +17,7 @@ from . import util
|
||||
setup_module, teardown_module = appmanager.setup(('app', 8380))
|
||||
|
||||
class TestString(str):
|
||||
+ __test__ = False
|
||||
def __del__(self):
|
||||
self.replace('1', '2')
|
||||
#print self
|
||||
diff --git a/tests/setopt_test.py b/tests/setopt_test.py
|
||||
index 29ae2f0..472cf34 100644
|
||||
--- a/tests/setopt_test.py
|
||||
+++ b/tests/setopt_test.py
|
||||
@@ -58,13 +58,13 @@ class SetoptTest(unittest.TestCase):
|
||||
io = util.BytesIO()
|
||||
self.curl.setopt(self.curl.WRITEDATA, io)
|
||||
self.curl.perform()
|
||||
- self.assertEquals(util.b('foo'), io.getvalue())
|
||||
+ self.assertEqual(util.b('foo'), io.getvalue())
|
||||
|
||||
self.curl.unsetopt(self.curl.HTTPHEADER)
|
||||
io = util.BytesIO()
|
||||
self.curl.setopt(self.curl.WRITEDATA, io)
|
||||
self.curl.perform()
|
||||
- self.assertEquals(util.b(''), io.getvalue())
|
||||
+ self.assertEqual(util.b(''), io.getvalue())
|
||||
|
||||
def test_set_httpheader_none(self):
|
||||
self.curl.setopt(self.curl.HTTPHEADER, ('x-test: foo',))
|
||||
@@ -72,13 +72,13 @@ class SetoptTest(unittest.TestCase):
|
||||
io = util.BytesIO()
|
||||
self.curl.setopt(self.curl.WRITEDATA, io)
|
||||
self.curl.perform()
|
||||
- self.assertEquals(util.b('foo'), io.getvalue())
|
||||
+ self.assertEqual(util.b('foo'), io.getvalue())
|
||||
|
||||
self.curl.setopt(self.curl.HTTPHEADER, None)
|
||||
io = util.BytesIO()
|
||||
self.curl.setopt(self.curl.WRITEDATA, io)
|
||||
self.curl.perform()
|
||||
- self.assertEquals(util.b(''), io.getvalue())
|
||||
+ self.assertEqual(util.b(''), io.getvalue())
|
||||
|
||||
@util.min_libcurl(7, 37, 0)
|
||||
def test_proxyheader_list(self):
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 36dcccb94bef72a7c4cf6acf7479f18568e545bb Mon Sep 17 00:00:00 2001
|
||||
From 9a5bfbe011be8d79e4bde1f8db2369beb063eb3a Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Tue, 2 May 2017 17:19:20 +0200
|
||||
Subject: [PATCH] module: drop link-time vs. run-time TLS backend check
|
||||
@ -8,14 +8,14 @@ This effectively reverts the following commit:
|
||||
|
||||
Bug: https://bugzilla.redhat.com/1446850
|
||||
---
|
||||
src/module.c | 62 ----------------------------------------------------
|
||||
1 file changed, 62 deletions(-)
|
||||
src/module.c | 69 ----------------------------------------------------
|
||||
1 file changed, 69 deletions(-)
|
||||
|
||||
diff --git a/src/module.c b/src/module.c
|
||||
index a7108a0..af79875 100644
|
||||
index a81391f..b87d1d5 100644
|
||||
--- a/src/module.c
|
||||
+++ b/src/module.c
|
||||
@@ -328,15 +328,6 @@ initpycurl(void)
|
||||
@@ -336,15 +336,6 @@ initpycurl(void)
|
||||
PyObject *collections_module = NULL;
|
||||
PyObject *named_tuple = NULL;
|
||||
PyObject *arglist = NULL;
|
||||
@ -31,7 +31,7 @@ index a7108a0..af79875 100644
|
||||
|
||||
assert(Curl_Type.tp_weaklistoffset > 0);
|
||||
assert(CurlMulti_Type.tp_weaklistoffset > 0);
|
||||
@@ -354,59 +345,6 @@ initpycurl(void)
|
||||
@@ -362,66 +353,6 @@ initpycurl(void)
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -49,6 +49,11 @@ index a7108a0..af79875 100644
|
||||
- case CURLSSLBACKEND_NSS:
|
||||
- case CURLSSLBACKEND_WOLFSSL:
|
||||
- case CURLSSLBACKEND_MBEDTLS:
|
||||
-#if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 64, 1)
|
||||
- case CURLSSLBACKEND_SECURETRANSPORT:
|
||||
-#else
|
||||
- case CURLSSLBACKEND_DARWINSSL:
|
||||
-#endif
|
||||
- runtime_supported_backend_found = 1;
|
||||
- break;
|
||||
- default:
|
||||
@ -79,6 +84,8 @@ index a7108a0..af79875 100644
|
||||
- runtime_ssl_lib = "nss";
|
||||
- } else if (!strncmp(vi->ssl_version, "mbedTLS/", 8)) {
|
||||
- runtime_ssl_lib = "mbedtls";
|
||||
- } else if (!strncmp(vi->ssl_version, "Secure Transport", 16)) {
|
||||
- runtime_ssl_lib = "secure-transport";
|
||||
- } else {
|
||||
- runtime_ssl_lib = "none/other";
|
||||
- }
|
||||
@ -92,5 +99,5 @@ index a7108a0..af79875 100644
|
||||
* is required for portability to Windows without requiring C++. */
|
||||
p_Curl_Type = &Curl_Type;
|
||||
--
|
||||
2.10.2
|
||||
2.35.1
|
||||
|
||||
@ -22,18 +22,16 @@
|
||||
%global modname pycurl
|
||||
|
||||
Name: python-%{modname}
|
||||
Version: 7.44.1
|
||||
Release: 5%{?dist}
|
||||
Version: 7.45.1
|
||||
Release: 1%{?dist}
|
||||
Summary: A Python interface to libcurl
|
||||
|
||||
License: LGPLv2+ or MIT
|
||||
URL: http://pycurl.io/
|
||||
Source0: https://files.pythonhosted.org/packages/47/f9/c41d6830f7bd4e70d5726d26f8564538d08ca3a7ac3db98b325f94cdcb7f/pycurl-%{version}.tar.gz
|
||||
|
||||
# do not use deprecated unittest features (#2019410)
|
||||
Patch1: 0001-Fix-warnings-when-running-tests.patch
|
||||
# drop link-time vs. run-time TLS backend check (#1446850)
|
||||
Patch2: 0002-python-pycurl-7.43.0-tls-backend.patch
|
||||
Patch1: 0001-python-pycurl-7.45.1-tls-backend.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libcurl-devel
|
||||
@ -107,6 +105,7 @@ rm -fv winbuild.py
|
||||
|
||||
# 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
|
||||
# use %%py3_shebang_fix after EPEL 7 EOL
|
||||
sed -e 's|^#! */usr/bin/env python$|#! /usr/bin/env %{python3}|' \
|
||||
-i tests/*.py setup.py
|
||||
|
||||
@ -140,6 +139,7 @@ export PYCURL_VSFTPD_PATH=vsftpd
|
||||
export PYTEST_ADDOPTS="--ignore examples -m 'not online'"
|
||||
make test PYTHON=%{__python3} PYTEST=%{pytest} PYFLAKES=true
|
||||
rm -fv tests/fake-curl/libcurl/*.so
|
||||
rm -fvr tests/__pycache__
|
||||
%endif
|
||||
|
||||
%if %{with python2}
|
||||
@ -161,6 +161,10 @@ rm -fv tests/fake-curl/libcurl/*.so
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Mar 15 2022 Lukáš Zaoral <lzaoral@redhat.com> - 7.45.1-1
|
||||
- update to 7.45.1 (#2062500)
|
||||
- do not ship tests/__pycache__
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 7.44.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
|
||||
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (pycurl-7.44.1.tar.gz) = e251db332791de07364695b5fd59b3a290486eabbde8be9914b5edeefa8702b4dd9ab678739ad765f76ededeb7192444fefe2a076d3977f454259dfd06731059
|
||||
SHA512 (pycurl-7.45.1.tar.gz) = 05639d484aac6d6688677589e391975158c5ef778456a47df575ad13fb8bd0db67ff8f5a39bdd99d82a67926aca421c01e687eec9d4fd87f32822b492b429635
|
||||
|
||||
Loading…
Reference in New Issue
Block a user