Sync from SUSE:ALP:Source:Standard:1.0 saltbundlepy-pycurl revision 7c5b66f199becacdf14867ae6363c133

This commit is contained in:
Adrian Schröter 2024-07-15 12:57:03 +02:00
commit 662119c664
9 changed files with 974 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -0,0 +1,67 @@
Index: pycurl-7.45.1/tests/memory_mgmt_test.py
===================================================================
--- pycurl-7.45.1.orig/tests/memory_mgmt_test.py
+++ pycurl-7.45.1/tests/memory_mgmt_test.py
@@ -9,6 +9,7 @@ import unittest
import gc
import flaky
from . import util
+import pytest
debug = False
@@ -17,6 +18,7 @@ if sys.platform == 'win32':
else:
devnull = '/dev/null'
+@pytest.mark.occasionally_failing
@flaky.flaky(max_runs=3)
class MemoryMgmtTest(unittest.TestCase):
def maybe_enable_debug(self):
Index: pycurl-7.45.1/tests/multi_memory_mgmt_test.py
===================================================================
--- pycurl-7.45.1.orig/tests/multi_memory_mgmt_test.py
+++ pycurl-7.45.1/tests/multi_memory_mgmt_test.py
@@ -7,11 +7,13 @@ import unittest
import gc
import flaky
import weakref
+import pytest
from . import util
debug = False
+@pytest.mark.occasionally_failing
@flaky.flaky(max_runs=3)
class MultiMemoryMgmtTest(unittest.TestCase):
def test_opensocketfunction_collection(self):
Index: pycurl-7.45.1/tests/multi_timer_test.py
===================================================================
--- pycurl-7.45.1.orig/tests/multi_timer_test.py
+++ pycurl-7.45.1/tests/multi_timer_test.py
@@ -5,6 +5,7 @@
from . import localhost
import pycurl
import unittest
+import pytest
from . import appmanager
from . import util
@@ -23,6 +24,7 @@ def teardown_module(mod):
teardown_module_2(mod)
teardown_module_1(mod)
+@pytest.mark.occasionally_failing
class MultiSocketTest(unittest.TestCase):
def test_multi_timer(self):
urls = [
Index: pycurl-7.45.1/pytest.ini
===================================================================
--- pycurl-7.45.1.orig/pytest.ini
+++ pycurl-7.45.1/pytest.ini
@@ -7,3 +7,4 @@ markers =
gssapi: mark a test as requiring GSSAPI
http2: mark a test as requiring HTTP/2
standalone: mark a test as being standalone
+ occasionally_failing: mark a test as occasionally failing

View File

@ -0,0 +1,17 @@
Index: pycurl-7.43.0/tests/runwsgi.py
===================================================================
--- pycurl-7.43.0.orig/tests/runwsgi.py
+++ pycurl-7.43.0/tests/runwsgi.py
@@ -48,10 +48,10 @@ def start_bottle_server(app, port, serve
server_thread.daemon = True
server_thread.start()
- ok = util.wait_for_network_service(('127.0.0.1', port), 0.1, 10)
+ ok = util.wait_for_network_service(('127.0.0.1', port), 0.1, 30)
if not ok:
import warnings
- warnings.warn('Server did not start after 1 second')
+ warnings.warn('Server did not start after 3 seconds')
return server_thread.server

22
make-leap15-compat.patch Normal file
View File

@ -0,0 +1,22 @@
---
tests/curl_object_test.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/tests/curl_object_test.py
+++ b/tests/curl_object_test.py
@@ -143,11 +143,11 @@ class CurlObjectTest(unittest.TestCase):
# change does not affect objects created later
obj3 = cls()
self.assertEqual(old_value, getattr(obj3, name))
-
+
def test_bogus_attribute_access(self):
- with pytest.raises(AttributeError, match='trying to obtain.*'):
- self.curl.foo
-
+ with pytest.raises(AttributeError):
+ self.curl.foo
+
def test_bogus_attribute_delete(self):
with pytest.raises(AttributeError, match='trying to delete.*'):
del self.curl.foo

BIN
pycurl-7.45.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

62
pycurl-libssh.patch Normal file
View File

@ -0,0 +1,62 @@
--- a/tests/ssh_key_cb_test.py
+++ b/tests/ssh_key_cb_test.py
@@ -33,8 +33,11 @@ class SshKeyCbTest(unittest.TestCase):
def keyfunction(known_key, found_key, match):
return pycurl.KHSTAT_FINE
- self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts')
- self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction)
+ try:
+ self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts')
+ self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction)
+ except pycurl.error as e:
+ self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0])
try:
self.curl.perform()
@@ -47,8 +50,11 @@ class SshKeyCbTest(unittest.TestCase):
def keyfunction(known_key, found_key, match):
return pycurl.KHSTAT_REJECT
- self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts')
- self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction)
+ try:
+ self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts')
+ self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction)
+ except pycurl.error as e:
+ self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0])
try:
self.curl.perform()
@@ -62,8 +68,11 @@ class SshKeyCbTest(unittest.TestCase):
def keyfunction(known_key, found_key, match):
return 'bogus'
- self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts')
- self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction)
+ try:
+ self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts')
+ self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction)
+ except pycurl.error as e:
+ self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0])
try:
self.curl.perform()
@@ -82,9 +91,15 @@ class SshKeyCbUnsetTest(unittest.TestCas
@util.min_libcurl(7, 19, 6)
@util.guard_unknown_libcurl_option
def test_keyfunction_none(self):
- self.curl.setopt(pycurl.SSH_KEYFUNCTION, None)
+ try:
+ self.curl.setopt(pycurl.SSH_KEYFUNCTION, None)
+ except pycurl.error as e:
+ self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0])
@util.min_libcurl(7, 19, 6)
@util.guard_unknown_libcurl_option
def test_keyfunction_unset(self):
- self.curl.unsetopt(pycurl.SSH_KEYFUNCTION)
+ try:
+ self.curl.unsetopt(pycurl.SSH_KEYFUNCTION)
+ except pycurl.error as e:
+ self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0])

634
saltbundlepy-pycurl.changes Normal file
View File

@ -0,0 +1,634 @@
-------------------------------------------------------------------
Tue Aug 22 14:59:25 UTC 2023 - Victor Zhestkov <vzhestkov@suse.com>
- update to 7.45.2:
* Python 3.9 compatibility for Py_TRASHCAN_SAFE_BEGIN
* Add support for CURL_HTTP_VERSION_3
* Add CURLOPT_TLS13_CIPHERS and CURLOPT_PROXY_TLS13_CIPHERS options
* Added HTTP09_ALLOWED option
* Removed use of distutils
- Update to 7.45.1:
* Fixed build against libcurl < 7.64.1 (patch by Scott Talbert).
* Add CURLOPT_MAXLIFETIME_CONN (patch by fsbs).
* Easy handle duplication support (patch by fsbs).
* Support for unsetting a number of multi options (patch by fsbs).
* pycurl classes can now be subclassed (patch by fsbs).
* Multi callbacks' thread state management fixed (patch by fsbs).
* Add CURL_LOCK_DATA_PSL (patch by fsbs).
* Add support for SecureTransport SSL backend (MacOS)
(patch by Scott Talbert).
* Fixed Python thread initialization causing hangs on operations
(patch by Scott Talbert).
* getinfo(CURLINFO_FTP_ENTRY_PATH) now handles NULL return from
libcurl, returning None in this case.
* Python 3.9 is now officially supported (patch by Bill Collins).
* Added CURLOPT_DOH_URL (patch by resokou).
* Best effort Python 2 support has been reinstated.
* Added missing fields to curl_version_info struct (patch by Hasan).
* Added CURLINFO_CONDITION_UNMET (patch by Dima Tisnek).
* Exposed MAX_CONCURRENT_STREAMS in CurlMulti (patch by Alexandre Pion).
* Compilation fixed against Python 3.10 alpha (patch by Kamil Dudka).
- update to 7.43.0.6:
* Fixed offset parameter usage in seek callback
* Added support for libcurl SSL backend detection via
`curl-config --ssl-backends`
* Added support for libcurl MultiSSL
* Added ability to unset CURLOPT_PROXY.
* Added support for CURLOPT_UPLOAD_BUFFERSIZE
* Added support for CURLOPT_MAXAGE_CONN
* Added support for sharing connection cache in libcurl
* Added support for CURLOPT_HAPROXYPROTOCOL
* CC and CFLAGS environment variables are now respected when building
* Fixed OpenSSL detection on CentOS 7 and 8
* surrogateescape error handler is used in multi_info_read to handle
invalid UTF-8.
- drop python-pycurl-7.43.0-tls-backend.patch (upstream)
- Add make-leap15-compat.patch to pass tests on Leap 15.2
- update to 7.43.0.5
- refresh python-pycurl-7.43.0-tls-backend.patch
* added python 3.8 support
* officialy ended support for python 2
- Update to 7.43.0.3:
* This release primarily fixes an OpenSSL-related installation issue, and
repairs the ability to use PycURL with newer libcurls compiled without
FTP support.
- Added:
* make-leap15-compat.patch
- Updated:
* disable_randomly_failing_tests.patch
- Removed:
* python-pycurl-7.43.0-tls-backend.patch
-------------------------------------------------------------------
Mon Apr 4 11:52:35 UTC 2022 - Victor Zhestkov <victor.zhestkov@suse.com>
- Strictly require Python 3.10 with saltbundlepy requrement
- Use openssl from the Salt Bundle for SLE 15 as build time dependency
-------------------------------------------------------------------
Thu Jan 20 10:59:47 UTC 2022 - Victor Zhestkov <victor.zhestkov@suse.com>
- Require saltbundle-openssl-devel instead of openssl-devel
for building on SLE12 to prevent fails
-------------------------------------------------------------------
Thu Mar 7 15:17:02 UTC 2019 - Matej Cepl <mcepl@suse.com>
- bsc#1128355: update to the Factory package to get multibuild and
better working tests.
- Refreshed patch against the new minor release tarball:
- pycurl-libssh.patch
- Added patches:
- disable_randomly_failing_tests.patch
- python-pycurl-7.43.0-tls-backend.patch (from
https://src.fedoraproject.org/rpms/python-pycurl/blob/master/f/0002-python-pycurl-7.43.0-tls-backend.patch)
-------------------------------------------------------------------
Wed Feb 6 15:24:44 UTC 2019 - alarrosa@suse.com
- Set LANG to en_US.UTF8 to fix the tests
-------------------------------------------------------------------
Wed Dec 19 14:18:26 CET 2018 - mcepl@suse.com
- Add missing setuptools BR
-------------------------------------------------------------------
Fri Nov 2 11:14:22 UTC 2018 - Vítězslav Čížek <vcizek@suse.com>
- Don't run tests that fail randomly or under load
* add disable_randomly_failing_tests.patch
-------------------------------------------------------------------
Thu Sep 6 12:53:06 UTC 2018 - Matěj Cepl <mcepl@suse.com>
- Switch to multibuild, so that we don't need testing BuildRequires
always.
-------------------------------------------------------------------
Thu Aug 30 12:36:12 UTC 2018 - Tomáš Chvátal <tchvatal@suse.com>
- Add patch to match up Fedora on how we detect tls backend on runtime
* python-pycurl-7.43.0-tls-backend.patch
-------------------------------------------------------------------
Wed Aug 29 08:33:02 UTC 2018 - tchvatal@suse.com
- Make sure we build on Leap 42.3
-------------------------------------------------------------------
Thu Aug 9 11:15:17 UTC 2018 - tchvatal@suse.com
- Start excluding flaky tests
-------------------------------------------------------------------
Tue Jul 10 11:06:40 UTC 2018 - mcepl@suse.com
- Update to 7.43.0.2:
* Added perform_rb and perform_rs methods to Curl objects to
return response body as byte string and string, respectively.
* Added OPT_COOKIELIST constant for consistency with other
option constants.
* PycURL is now able to report errors triggered by libcurl
via CURLOPT_FAILONERROR mechanism when the error messages are
not decodable in Python's default encoding (GitHub issue #259).
* Added getinfo_raw method to Curl objects to return byte strings
as is from libcurl without attempting to decode them
(GitHub issue #493).
* When adding a Curl easy object to CurlMulti via add_handle,
the easy objects now have their reference counts increased so that
the application is no longer required to keep references to them
to keep them from being garbage collected (GitHub issue #171).
* PycURL easy, multi and share objects can now be weak referenced.
* set_ca_certs now accepts byte strings as it should have been
all along.
* Use OpenSSL 1.1 and 1.0 specific APIs for controlling thread locks
depending on OpenSSL version (patch by Vitaly Murashev).
* Fixed a crash when closesocket callback failed (patch by
Gisle Vanem and toddrme2178).
* Added CURLOPT_PROXY_SSLCERT, CURLOPT_PROXY_SSLCERTTYPE,
CURLOPT_PROXY_SSLKEY, CURLOPT_PROXY_SSLKEYTYPE,
CURLOPT_PROXY_SSL_VERIFYPEER (libcurl 7.52.0+,
patch by Casey Miller).
* Added CURLOPT_PRE_PROXY (libcurl 7.52.0+, patch by ziggy).
* Added SOCKET_BAD constant and it is now recognized as a valid
return value from OPENSOCKET callback.
-------------------------------------------------------------------
Fri Feb 2 13:17:14 UTC 2018 - tchvatal@suse.com
- Disable tests on arm platforms as they are very flaky there,
on multiple runs always different failures
-------------------------------------------------------------------
Fri Feb 2 13:00:02 UTC 2018 - tchvatal@suse.com
- Disable strict aliasing as reported by the rpm checks
-------------------------------------------------------------------
Tue Jan 30 16:01:27 UTC 2018 - vcizek@suse.com
- Since version 7.58.0, curl may be compiled with libssh instead of
libssh2 which differ in supported functionality (bsc#1078329)
* add pycurl-libssh.patch
- update license
-------------------------------------------------------------------
Fri Dec 8 18:06:28 UTC 2017 - arun@gmx.de
- refreshed patch increase_test_timeout.diff (updated line number)
- removed patch pycurl-no-runtime-curlvercheck.patch (included upstream)
- update to version 7.43.0.1:
* This release collects fixes and improvements made over the past
two years,notably updating Windows dependencies to address DNS
resolution andTLS connection issues.
-------------------------------------------------------------------
Tue Aug 8 19:16:32 UTC 2017 - tbechtold@suse.com
- Cleanup Requires and BuildRequires
-------------------------------------------------------------------
Wed Jun 21 09:51:22 UTC 2017 - alarrosa@suse.com
- Add increase_test_timeout.diff so tests don't fail when obs is
overloaded and it takes more than 1 second to start a service.
-------------------------------------------------------------------
Thu Jun 8 16:15:49 UTC 2017 - lnussel@suse.de
- exclude http2 and ssh tests if curl(-mini) doesn't support it
-------------------------------------------------------------------
Tue Dec 20 15:55:00 UTC 2016 - jmatejek@suse.com
- update for multipython build
- merge python3 project
- update and apply pycurl-no-runtime-curlvercheck.patch
- run test suite
- single doc package for all pythons
-------------------------------------------------------------------
Sat Feb 6 04:43:19 UTC 2016 - arun@gmx.de
- update to version 7.43.0:
* Highlights of this release:
+ Binary wheels are now built for Windows systems.
+ setopt_string method added to Curl objects to permit setting
string libcurl options that PycURL does not know about.
+ curl module can now be imported on Windows again.
+ OPENSOCKETFUNCTION callback is now invoked with the address as
bytes on Python 3 as was documented.
+ Support for many libcurl options and constants was added.
-------------------------------------------------------------------
Sat Jan 30 17:57:48 UTC 2016 - arun@gmx.de
- specfile:
* update copyright year
* update patch
- update to version 7.21.5:
* Highlights of this release:
+ Socket callbacks are now fully implemented
("CURLOPT_OPENSOCKETFUNCTION", "CURLOPT_SOCKOPTFUNCTION",
"CURLOPT_CLOSESOCKETFUNCTION"). Unfortunately this required
changing "OPENSOCKETFUNCTION" API once again in a
backwards-incompatible manner. Support for "SOCKOPTFUNCTION" and
"CLOSESOCKETFUNCTION" was added in this
release. "OPENSOCKETFUNCTION" now supports Unix sockets.
+ Many other libcurl options and constants have been added to
PycURL.
+ When "pycurl" module initialization fails, "ImportError" is
raised instead of a fatal error terminating the process.
+ Usability of official Windows builds has been greatly improved
-------------------------------------------------------------------
Tue Nov 3 16:59:19 UTC 2015 - arun@gmx.de
- update to version 7.19.5.3:
* python and nosetests binaries can now be overridden when running
the test suite (patch by Kamil Dudka).
* Files needed to run the test suite are distributed in sdist
(patch by Kamil Dudka).
-------------------------------------------------------------------
Mon Nov 2 17:03:47 UTC 2015 - arun@gmx.de
- update to version 7.19.5.2:
* C sources made 64-bit clean on Windows.
* Support for building against Python 3.5 added to winbuild.py.
* Fixed build on Windows when using MS SDK 8.1+ or MSVC 14/2015
(patch by Gisle Vanem).
* Added automatic SSL library detection on CentOS 6 by loading
libcurl shared library in setup.py. This automatic detection is
meant to permit installing pycurl seamlessly via `pip install pycurl`
on CentOS; as such, it is only employed when no other configuration
options or configuration environment variables are given to setup.py
(original patch by Francisco Alves).
* Added --libcurl-dll option to setup.py to take SSL library
information out of libcurl shared library (original patch by
Francisco Alves). This option is only usable
with Python 2.5 or higher.
* --with-ssl, --with-gnutls and --with-nss options to setup.py now
result in PycURL explicitly linking against the respective SSL
library. Previously setup.py relied on curl-config to supply the
needed libraries in this case.
* List and tuples are now accepted in all positions of HTTPPOST
option values.
* Tuples are now accepted for options taking list values (e.g.
HTTPHEADER).
* Fixed a use after free in HTTPPOST when using FORM_BUFFERPTR with
a Unicode string (patch by Clint Clayton).
* Fixed a memory leak in HTTPPOST for multiple FORM_BUFFERPTR
(patch by Clint Clayton).
* CURLMOPT_* option constants were mistakenly defined on Curl
instances but not on CurlMulti instances. These option constants
are now defined on CurlMulti instances and on pycurl module,
but not on Curl instances.
* Fixed several memory leaks when setting string options to
Unicode values failed.
* Fixed a memory leak when using POSTFIELDS with unicode objects
on Python 2 (patch by Clint Clayton).
* Official support for Python 2.4 and 2.5 dropped. PycURL is no
longer tested against these Python versions on Travis.
* Added CURLAUTH_NEGOTIATE (libcurl 7.38.0+), CURLAUTH_NTLM_WB
(libcurl 7.22.0+), CURLAUTH_ONLY (libcurl 7.21.3+),
* Added CURLOPT_SERVICE_NAME (libcurl 7.43.0+).
* Added CURLOPT_PROXY_SERVICE_NAME (libcurl 7.43.0+).
* Added CURLE_SSL_CRL_BADFILE, CURLE_SSL_INVALIDCERTSTATUS
(libcurl 7.41.0+), CURLE_SSL_ISSUER_ERROR and
CURLE_SSL_PINNEDPUBKEYNOTMATCH (libcurl 7.39.0+).
* Added CURLOPT_SSL_VERIFYSTATUS (libcurl 7.41.0+).
* Added CURL_SSLVERSION_TLSv1_0, CURL_SSLVERSION_TLSv1_1
and CURL_SSLVERSION_TLSv1_2 (libcurl 7.34.0+).
* The second argument of DEBUGFUNCTION callback is now of type bytes on
Python 3. When response body contains non-ASCII data and
DEBUGFUNCTION is enabled, this argument would receive non-ASCII data.
Which encoding this data is in is unknown by PycURL, and e.g. in
the case of HTTP requires parsing response headers. GitHub issue
#210, patch by Barry Warsaw with help from Gregory Petukhov.
* Fixed build on GCC 4.4.5 (patch by Travis Jensen).
* Added CURLOPT_GSSAPI_DELEGATION, CURLGSSAPI_DELEGATION_FLAG,
CURLGSSAPI_DELEGATION_NONE and CURLGSSAPI_DELEGATION_POLICY_FLAG
(libcurl 7.22.0+, patch by Dmitry Ketov).
-------------------------------------------------------------------
Wed Mar 25 13:54:46 UTC 2015 - mcihar@suse.cz
- Run testsuite during build
-------------------------------------------------------------------
Wed Mar 25 13:51:16 UTC 2015 - mcihar@suse.cz
- Update to 7.19.5.1:
* Added CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5_HOSTNAME.
* setup.py now prints PycURL-specific option help when -h is used.
* LibreSSL is now supported (patch by JiCiT.)
* Fixed an oversight that broke PycURL building against libcurl 7.19.4
through 7.21.1. The bug was introduced in PycURL 7.19.5.
* Tests are now included in source distributions again, thanks to
Kamil Dudka and Johan Bergstroem.
* Added CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT (libcurl 7.20.0+)
and CURLOPT_MAIL_AUTH (libcurl 7.25.0+).
* Tests removed from source and binary distributions.
* Documentation greatly improved. Quickstart guide added.
* pycurl.Curl, pycurl.CurlMulti and pycurl.CurlShare are now classes
rather than factory functions. Previously, the classes were "hidden"
(they were accessible as e.g. type(pycurl.Curl()), but could not be
instantiated, nor could class methods be obtained from the classes.
Please see this mailing list post for further information:
http://curl.haxx.se/mail/curlpython-2014-06/0004.html
* When passing a file-like object to READDATA option, PycURL was
mistakenly looking for write method on this object. Now read method
is looked up, as would be expected.
* Python 3.4 is now officially supported.
* Windows packages now build libcurl against zlib.
* CherryPy is no longer required for the test suite, ssl module from
the Python standard library is used instead.
* Fixed a reference leak of SOCKET and TIMER callbacks on
CurlMulti instances, thanks to Ben Darnell.
* Fixed build against openssl on cygwin, where pycurl needs to link
against libcrypto rather than libssl.
* Added CURLOPT_SSH_KNOWNHOSTS (libcurl 7.19.6+).
* Added CURLE_FTP_ACCEPT_FAILED (libcurl 7.24.0+).
-------------------------------------------------------------------
Mon May 26 14:17:15 UTC 2014 - toddrme2178@gmail.com
- Removed part of patch that breaks now necessary things:
pycurl-no-runtime-curlvercheck.patch
- Specify ssl type since it is not automatically detected.
-------------------------------------------------------------------
Wed May 21 15:41:00 UTC 2014 - toddrme2178@gmail.com
- Removed patch specific to python3-pycurl: pycurl-python3.patch
- Rebase patch: pycurl-no-runtime-curlvercheck.patch
-------------------------------------------------------------------
Tue May 20 12:13:23 UTC 2014 - toddrme2178@gmail.com
- Update to version 7.19.3.1
* Added --avoid-stdio setup.py option to avoid passing FILE
pointers from Python to libcurl. Applies to Python 2 only.
* Added CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE,
CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, CURLMOPT_MAX_HOST_CONNECTIONS
CURLMOPT_MAX_PIPELINE_LENGTH, CURLMOPT_MAX_TOTAL_CONNECTIONS
multi options (patch by Jakob Truelsen).
* SSL detection logic changed to consult `curl-config --static-libs`
even if `curl-config --libs` succeeded. This should achieve
pre-7.19.3 behavior with respect to automatic SSL detection
(patch by Andjelko Horvat).
- Update to version 7.19.3
* Added CURLOPT_NOPROXY.
* Added CURLINFO_LOCAL_PORT, CURLINFO_PRIMARY_PORT and
CURLINFO_LOCAL_IP (patch by Adam Jacob Muller).
* When running on Python 2.x, for compatibility with Python 3.x,
Unicode strings containing ASCII code points only are now accepted
in setopt() calls.
* PycURL now requires that compile time SSL backend used by libcurl
is the same as the one used at runtime. setup.py supports
--with-ssl, --with-gnutls and --with-nss options like libcurl does,
to specify which backend libcurl uses. On some systems PycURL can
automatically figure out libcurl's backend.
If the backend is not one for which PycURL provides crypto locks
(i.e., any of the other backends supported by libcurl),
no runtime SSL backend check is performed.
* Default PycURL user agent string is now built at runtime, and will
include the user agent string of libcurl loaded at runtime rather
than the one present at compile time.
* PycURL will now use WSAduplicateSocket rather than dup on Windows
to duplicate sockets obtained from OPENSOCKETFUNCTION.
Using dup may have caused crashes, OPENSOCKETFUNCTION should
now be usable on Windows.
* A new script, winbuild.py, was added to build PycURL on Windows
against Python 2.6, 2.7, 3.2 and 3.3.
* Added CURL_LOCK_DATA_SSL_SESSION (patch by Tom Pierce).
* Added E_OPERATION_TIMEDOUT (patch by Romuald Brunet).
* setup.py now handles --help argument and will print PycURL-specific
configuration options in addition to distutils help.
* Windows build configuration has been redone:
PYCURL_USE_LIBCURL_DLL #define is gone, use --use-libcurl-dll
argument to setup.py to build against a libcurl DLL.
CURL_STATICLIB is now #defined only when --use-libcurl-dll is not
given to setup.py, and PycURL is built against libcurl statically.
--libcurl-lib-name option can be used to override libcurl import
library name.
* Added CURLAUTH_DIGEST_IE as pycurl.HTTPAUTH_DIGEST_IE.
* Added CURLOPT_POSTREDIR option and CURL_REDIR_POST_301,
CURL_REDIR_POST_302, CURL_REDIR_POST_303 and CURL_REDIR_POST_ALL
constants. CURL_REDIR_POST_303 requires libcurl 7.26.0 or higher,
all others require libcurl 7.19.1 or higher.
* PycURL now supports Python 3.1 through 3.3. Python 3.0 might
work but it appears to ship with broken distutils, making virtualenv
not function on it.
* PycURL multi objects now have the multi constants defined on them.
Previously the constants were only available on pycurl module.
The new behavior matches that of curl and share objects.
* PycURL share objects can now be closed via the close() method.
* PycURL will no longer call `curl-config --static-libs` if
`curl-config --libs` succeeds and returns output.
Systems on which neither `curl-config --libs` nor
`curl-config --static-libs` do the right thing should provide
a `curl-config` wrapper that is sane.
* Added CURLFORM_BUFFER and CURLFORM_BUFFERPTR.
* pycurl.version and user agent string now include both
PycURL version and libcurl version as separate items.
* Added CURLOPT_DNS_SERVERS.
* PycURL can now be dynamically linked against libcurl on Windows
if PYCURL_USE_LIBCURL_DLL is #defined during compilation.
* Breaking change: opensocket callback now takes an additional
(address, port) tuple argument. Existing callbacks will need to
be modified to accept this new argument.
https://github.com/pycurl/pycurl/pull/18
- Update to version 7.19.0.3
* Re-release of 7.19.0.2 with minor changes to build Windows packages
due to botched 7.19.0.2 files on PyPi.
http://curl.haxx.se/mail/curlpython-2013-12/0021.html
- Update to version 7.19.0.2 [requires libcurl-7.19.0 or better] - 2013-10-08
* Fixed a bug in a commit made in 2008 but not released until 7.19.0.1
which caused CURLOPT_POSTFIELDS to not correctly increment reference
count of the object being given as its argument, despite libcurl not
copying the data provided by said object.
* Added support for libcurl pause/unpause functionality,
via curl_easy_pause call and returning READFUNC_PAUSE from
read callback function.
- Update to version 7.19.0.1 [requires libcurl-7.19.0 or better] - 2013-09-23
* Test matrix tool added to test against all supported Python and
libcurl versions.
* Python 2.4 is now the minimum required version.
* Source code, bugs and patches are now kept on GitHub.
* Added CURLINFO_CERTINFO and CURLOPT_CERTINFO.
* Added CURLOPT_RESOLVE.
* PycURL can now be used with Python binaries without thread
support.
* gcrypt is no longer initialized when a newer version of gnutls
is used.
* Marked NSS as supported.
* Fixed relative URL request logic.
* Fixed a memory leak in util_curl_init.
* Added CURLOPT_USERNAME and CURLOPT_PASSWORD.
* Fixed handling of big timeout values.
* Added GLOBAL_ACK_EINTR.
* setopt(..., None) can be used as unsetopt().
* CURLOPT_RANGE can now be unset.
* Write callback can return -1 to signal user abort.
* Reorganized tests into an automated test suite.
* Added CURLOPT_SEEKFUNCTION and CURLOPT_SEEKDATA.
* Cleaned up website.
* Fix pycurl.reset() (patch by <johansen at sun.com>).
* Fix install routine in setup.py where
certain platforms (Solaris, Mac OSX, etc)
would search for a static copy of libcurl (dbp).
* Fixed build on OpenSolaris 0906 and other platforms on which
curl-config does not have a --static-libs option.
* No longer keep string options copies in the
Curl Python objects, since string options are
now managed by libcurl.
- Add additional dependencies
- Remove no longer necessary patch:
* pycurl-7.18.1-nostaticlibs.patch
-------------------------------------------------------------------
Fri Aug 30 18:07:30 UTC 2013 - crrodriguez@opensuse.org
- remove runtime curl version check and __DATE__ __TIME__ usage
(pycurl-no-runtime-curlvercheck.patch)
-------------------------------------------------------------------
Fri Apr 5 13:16:51 UTC 2013 - idonmez@suse.com
- Add Source URL, see https://en.opensuse.org/SourceUrls
-------------------------------------------------------------------
Sat Apr 28 06:42:57 UTC 2012 - highwaystar.ru@gmail.com
- added python3 package
- spec file slighly cleaned (old buildroot macro replaced)
-------------------------------------------------------------------
Thu Jan 12 11:31:10 UTC 2012 - coolo@suse.com
- change license to be in spdx.org format
-------------------------------------------------------------------
Tue Sep 20 11:54:25 UTC 2011 - saschpe@suse.de
- Renamed package to 'python-pycurl' to match upstream name
- Removed authors from description
-------------------------------------------------------------------
Wed Feb 10 11:45:01 UTC 2010 - jfunk@funktronics.ca
- Update to 7.19.0:
* Added CURLFILE, ADDRESS_SCOPE and ISSUERCERT options,
as well as the APPCONNECT_TIME info.
* Added PRIMARY_IP info (patch by
Yuhui H <eyecat at gmail.com>).
* Added support for curl_easy_reset through a
new 'reset' method on curl objects
(patch by Nick Pilon <npilon at oreilly.com>).
* Added support for OPENSOCKET callbacks.
See 'tests/test_opensocket.py' for example
usage (patch by Thomas Hunger <teh at camvine.com>).
- Version 7.18.2:
* Added REDIRECT_URL info and M_MAXCONNECTS option
(patch by Yuhui H <eyecat at gmail.com>).
* Added socket_action() method to CurlMulti objects.
See 'tests/test_multi_socket_select.py' for example
usage (patch by Yuhui H <eyecat at gmail.com>).
* Added AUTOREFERER option.
* Allow resetting some list operations (HTTPHEADER,
QUOTE, POSTQUOTE, PREQUOTE) by passing an empty
list to setopt (patch by Jim Patterson).
- Split off doc subpackage
-------------------------------------------------------------------
Fri Apr 25 16:45:35 ADT 2008 - jfunk@funktronics.ca
- Update to 7.18.1:
* Added POST301, SSH_HOST_PUBLIC_KEY_MD5,
COPYPOSTFIELDS and PROXY_TRANSFER_MODE options.
* Check for static libs in setup.py to better detect
whether libcurl was linked with OpenSSL or GNUTLS.
* PycURL is now dual licensed under the LGPL and
a license similar to the cURL license (an MIT/X
derivate).
- Version 7.16.4:
* Allow any callable object as the callback function.
This change comes handy when you would like to use objects
which are callable but are not functions or methods, for
example those objects created by the functions in the functools
module (patch by Daniel Pena Arteaga <dpena at ph.tum.de>).
* Added NEW_DIRECTORY_PERMS and NEW_FILE_PERMS options.
- Version 7.16.2.1:
* Added IOCMD_NOP and IOCMD_RESTARTREAD for ioctl callback
handling (patch by Mark Eichin).
* Use Py_ssize_t where appropriate for Python 2.5 and 64-bit
compatibility. This fixes the problem reported by Aaron
Hill, where the exception "pycurl.error: (2, '')" is thrown
when calling setopt(pycurl.POSTFIELDS,...) on 64-bit
platforms.
- Version 7.16.2:
* Added options HTTP_TRANSFER_DECODING, HTTP_CONTENT_DECODING,
TIMEOUT_MS, CONNECTTIMEOUT_MS from libcurl 7.16.2.
* Right-strip URLs read from files in the test scripts
to avoid sending requests with '\n' at the end.
- Version 7.16.1:
* Added constants for all libcurl (error) return codes. They
are named the same as the macro constants in curl.h but prefixed
with E_ instead of CURLE. Return codes for the multi API are
prefixed with M_ instead of CURLM.
* Added CURLOPT_FTP_SSL_CCC, CURLOPT_SSH_PUBLIC_KEYFILE,
CURLOPT_SSH_PRIVATE_KEYFILE, CURLOPT_SSH_AUTH_TYPES.
* Removed CLOSEPOLICY and friends since this option is now
deprecated in libcurl.
* Set the _use_datetime attribute on the CURLTransport class
to unbreak xmlrpc_curl.py on Python 2.5.
- Version 7.16.0 [no public release]:
* Added CURLOPT_SSL_SESSIONID_CACHE.
* Removed SOURCE_* options since they are no longer
supported by libcurl.
-------------------------------------------------------------------
Mon Oct 2 13:51:57 CEST 2006 - cthiel@suse.de
- fix build on older distributions
-------------------------------------------------------------------
Sun Oct 1 15:14:26 CEST 2006 - cthiel@suse.de
- update to version 7.15.5.1
* Added test for basic ftp usage (tests/test_ftp.py).
* Fix broken ssl mutex lock funcction when using GNU TLS
-------------------------------------------------------------------
Thu Sep 21 14:28:54 CEST 2006 - cthiel@suse.de
- fix build with python 2.5
-------------------------------------------------------------------
Mon Aug 14 10:01:34 CEST 2006 - cthiel@suse.de
- update to version 7.15.5
* Added CURLOPT_FTP_ALTERNATIVE_TO_USER, CURLOPT_MAX_SEND_SPEED_LARGE, and
CURLOPT_MAX_RECV_SPEED_LARGE.
- requires curl >= 7.15.5
-------------------------------------------------------------------
Sat Aug 5 16:52:04 CEST 2006 - cthiel@suse.de
- initial package (version 7.15.4.2)

143
saltbundlepy-pycurl.spec Normal file
View File

@ -0,0 +1,143 @@
#
# spec file for package saltbundlepy-pycurl
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!saltbundlepy_module:%define saltbundlepy_module() saltbundlepy-%{**}}
%define pythons saltbundlepy
# Disable python bytecompile for all distros
# It's called explicitly in the spec
%global __brp_python_bytecompile %{nil}
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
ExclusiveArch: do-not-build
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: saltbundlepy-pycurl%{psuffix}
Version: 7.45.2
Release: 0
Summary: PycURL -- cURL library module
License: LGPL-2.1-or-later AND MIT
Group: Development/Languages/Python
URL: http://pycurl.sourceforge.net/
Source: https://files.pythonhosted.org/packages/source/p/pycurl/pycurl-%{version}.tar.gz
# PATCH-FIX-OPENSUSE increase_test_timeout.diff -- Increase the timeout in a test so it doesn't fail when obs is overloaded
Patch0: increase_test_timeout.diff
# PATCH-FIX-UPSTREAM handle difference between libssh and libssh2
Patch1: pycurl-libssh.patch
Patch2: disable_randomly_failing_tests.patch
# PATCH-FIX-OPENSUSE make-leap15-compat.patch mcepl@suse.com
# Make tests passing with Leap 15.2
Patch3: make-leap15-compat.patch
BuildRequires: %{saltbundlepy_module devel >= 3.10}
BuildRequires: %{saltbundlepy_module setuptools}
BuildRequires: fdupes
BuildRequires: libcurl-devel >= 7.19.0
%if 0%{?suse_version} == 1315
BuildRequires: saltbundle-openssl-devel
%else
BuildRequires: openssl-devel
%endif
BuildRequires: saltbundlepy-rpm-macros
%if %{with test}
BuildRequires: %{saltbundlepy_module bottle}
BuildRequires: %{saltbundlepy_module flaky}
BuildRequires: %{saltbundlepy_module nose}
%endif
Requires: saltbundlepy-base
%python_subpackages
%description
This module provides bindings for the cURL library.
%package -n %{name}-doc
Summary: Documentation for python-curl
Group: Development/Libraries/Python
Requires: %{name} = %{version}
Provides: %{python_module pycurl-doc = %{version}}
BuildArch: noarch
%description -n %{name}-doc
This module provides bindings for the cURL library.
This package contains documentation and examples.
%prep
%autosetup -p1 -n pycurl-%{version}
# temporarily remove a failing test-case until the issue is
# fixed in curl: https://github.com/curl/curl/issues/6615
rm -f tests/failonerror_test.py
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
export PYCURL_SSL_LIBRARY=openssl
%python_build --with-openssl
%install
export PYCURL_SSL_LIBRARY=openssl
%python_install --with-openssl
rm -rf %{buildroot}%{_datadir}/doc # Remove wrongly installed junk
%{python_expand \
$python -m compileall -d %{$python_sitearch} %{buildroot}%{$python_sitearch}
$python -O -m compileall -d %{$python_sitearch} %{buildroot}%{$python_sitearch}
%fdupes %{buildroot}%{$python_sitearch}
}
%check
%if %{with test}
export LANG=en_US.UTF-8
export PYCURL_SSL_LIBRARY=openssl
# taken from "make test" because we only need to run nosetests,
# not the rest of the mess in the upstream runner
pushd tests/fake-curl/libcurl
rm -f *.so
make %{?_smp_mflags}
popd
# exclude certain tests
test_flags='online or occasionally_failing'
if ! pkg-config --variable=supported_features libcurl|grep -qw HTTP2; then
test_flags="$test_flags or http2"
fi
if ! pkg-config --variable=supported_protocols libcurl|grep -qw SCP; then
test_flags="$test_flags or ssh"
fi
# test_getinfo are failing with new bottle
%pytest_arch -s -k "not ($test_flags or test_getinfo)"
rm -rf %{buildroot}%{_prefix}/lib/debug %{buildroot}%{_libdir}/python*
# test
%endif
%if ! %{with test}
%files %{python_files}
%license COPYING-LGPL COPYING-MIT
%doc AUTHORS ChangeLog README.rst
%{python_sitearch}/*
%files -n %{name}-doc
%doc examples doc/*.rst
%endif
%changelog