[Python-modules-commits] [pycurl] 01/06: Import pycurl_7.43.0.orig.tar.gz
Barry Warsaw
barry at moszumanska.debian.org
Thu Mar 10 15:09:57 UTC 2016
This is an automated email from the git hooks/post-receive script.
barry pushed a commit to branch master
in repository pycurl.
commit 81834bfdd6e021247c5ca0c6ec4abe55cc246ca5
Author: Barry Warsaw <barry at python.org>
Date: Thu Mar 10 09:46:32 2016 -0500
Import pycurl_7.43.0.orig.tar.gz
---
AUTHORS | 1 +
COPYING-LGPL | 6 +-
ChangeLog | 77 ++
INSTALL.rst | 113 ++-
Makefile | 2 +
PKG-INFO | 91 +-
README.rst | 98 +-
RELEASE-NOTES.rst | 18 +
doc/callbacks.rst | 36 +-
doc/conf.py | 4 +-
doc/curlobject.rst | 2 +
doc/docstrings/curl_setopt.rst | 5 +-
doc/docstrings/curl_setopt_string.rst | 31 +
doc/docstrings/curl_unsetopt.rst | 2 +-
doc/index.rst | 127 ++-
doc/quickstart.rst | 50 +-
doc/release-process.rst | 11 +-
doc/unicode.rst | 10 +-
doc/unimplemented.rst | 65 ++
examples/quickstart/get.py | 2 +-
examples/quickstart/get_python2.py | 2 +-
examples/quickstart/get_python3.py | 2 +-
examples/quickstart/response_headers.py | 12 +-
examples/quickstart/response_info.py | 2 +-
examples/tests/test_build_config.py | 4 +-
python/curl/__init__.py | 3 +-
requirements-dev-3.1.txt | 1 +
requirements-dev.txt | 1 +
setup.py | 92 +-
src/docstrings.c | 39 +-
src/docstrings.h | 1 +
src/easy.c | 1575 ++++++++++++++++++-------------
src/module.c | 126 ++-
src/multi.c | 199 +++-
src/pycurl.h | 37 +-
src/threadsupport.c | 34 +-
tests/app.py | 12 +-
tests/getinfo_test.py | 11 +-
tests/memory_mgmt_test.py | 66 +-
tests/multi_option_constants_test.py | 59 +-
tests/open_socket_cb_test.py | 3 +-
tests/option_constants_test.py | 105 +++
tests/post_test.py | 32 +-
tests/run.sh | 4 +-
tests/setopt_string_test.py | 30 +
tests/setopt_test.py | 80 +-
tests/util.py | 9 +-
tests/xferinfo_cb_test.py | 74 ++
winbuild.py | 100 +-
49 files changed, 2460 insertions(+), 1006 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index 85e0ff3..053aea4 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -23,6 +23,7 @@ Domenico Andreoli <cavok at libero.it>
Dominique <curl-and-python at d242.net>
Eric S. Raymond <esr at thyrsus.com>
Francisco Alves <chico at corp.globo.com>
+Gabi Davar <grizzly.nyo at gmail.com>
Gisle Vanem <gvanem at yahoo.no>
Gregory Petukhov <lorien at lorien.name>
Jakob Truelsen <jakob at scalgo.com>
diff --git a/COPYING-LGPL b/COPYING-LGPL
index 99dce33..4362b49 100644
--- a/COPYING-LGPL
+++ b/COPYING-LGPL
@@ -2,7 +2,7 @@
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -485,7 +485,7 @@ convey the exclusion of warranty; and each file should have at least the
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
@@ -500,5 +500,3 @@ necessary. Here is a sample; alter the names:
Ty Coon, President of Vice
That's all there is to it!
-
-
diff --git a/ChangeLog b/ChangeLog
index ae3ed63..7754f60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,80 @@
+Version 7.43.0 [requires libcurl-7.19.0 or better] - 2016-02-02
+---------------------------------------------------------------
+
+ * Added CURLINFO_RTSP_* constants (libcurl 7.20.0+).
+
+ * Added CURLOPT_XOAUTH2_BEARER (libcurl 7.33.0+).
+
+ * Added CURLOPT_SASL_IR (libcurl 7.31.0+).
+
+ * Added CURLOPT_LOGIN_OPTIONS (libcurl 7.34.0+).
+
+ * Added CURLOPT_FTP_USE_PRET (libcurl 7.20.0+).
+
+ * Added setopt_string method to Curl objects to set arbitrary
+ string options.
+
+ * Switched to Bintray for hosting release distributions.
+
+ * Added CURLOPT_DEFAULT_PROTOCOL (libcurl 7.45.0+).
+
+ * Added CURLOPT_TLSAUTH_* options (libcurl 7.21.4+).
+
+ * Added CURLPROTO_SMB and CURLPROTO_SMBS constants (libcurl 7.40.0+).
+
+ * Added CURL_SOCKOPT_* constants (libcurl 7.21.5+).
+
+ * Added CURL_HTTP_VERSION_2_0, CURL_HTTP_VERSION_2 and
+ CURL_HTTP_VERSION_2TLS constants for CURLOPT_HTTP_VERSION
+ (various libcurl versions required for these).
+
+ * winbuild.py can now build binary wheels on Windows.
+
+ * Added failed memory allocation handling during SSL lock initialization.
+
+ * CURLOPT_IOCTLDATA option support has been removed.
+ This option is used internally by PycURL and is not settable by
+ applications.
+
+ * HTTPHEADER and PROXYHEADER options can now be unset.
+
+ * Added CURLPIPE_* constants (libcurl 7.43.0+).
+
+ * Added CURLOPT_PIPEWAIT (libcurl 7.43.0+).
+
+ * Added CURLOPT_PATH_AS_IS (libcurl 7.42.0+).
+
+ * Added CURLOPT_PROXYHEADER and CURLOPT_HEADEROPT as well as
+ CURLHEADER_UNIFIED and CURLHEADER_SEPARATE (libcurl 7.37.0+).
+
+ * Added CURLOPT_EXPECT_100_TIMEOUT_MS (libcurl 7.36.0+).
+
+ * Added CURLOPT_XFERINFOFUNCTION (libcurl 7.32.0+).
+
+ * Added CURLM_ADDED_ALREADY error constant (libcurl 7.32.1+).
+
+ * Added remaining CURLE_* constants through libcurl 7.46.0.
+
+ * Unbroken `curl' module import on Windows - apparently Windows now
+ has a `signal' Python module but no `SIGPIPE' (patch by Gabi Davar).
+
+ * Added CURLMOPT_PIPELINING_SITE_BL and CURLMOPT_PIPELINING_SERVER_BL
+ options (libcurl 7.30.0+).
+
+ * Added CURLOPT_TCP_KEEPALIVE, CURLOPT_TCP_KEEPIDLE and
+ CURLOPT_TCP_KEEPINTVL options (libcurl 7.25.0+).
+
+ * Added CURLOPT_ACCEPTTIMEOUT_MS (libcurl 7.24.0+).
+
+ * Added CURLOPT_ACCEPT_ENCODING and CURLOPT_TRANSFER_ENCODING
+ options (libcurl 7.21.6+).
+
+ * OPENSOCKETFUNCTION callback for AF_UNIX sockets was mistakenly
+ invoked with the address as a `string' rather than `bytes' on
+ Python 3. The callback now receives a `bytes' instance as was
+ documented.
+
+
Version 7.21.5 [requires libcurl-7.19.0 or better] - 2016-01-05
---------------------------------------------------------------
diff --git a/INSTALL.rst b/INSTALL.rst
index ad3293d..ebcd96b 100644
--- a/INSTALL.rst
+++ b/INSTALL.rst
@@ -1,3 +1,5 @@
+.. _install:
+
PycURL Installation
===================
@@ -115,35 +117,53 @@ To force pip to recompile pycurl, run::
Windows
-------
-Binary Packages
-^^^^^^^^^^^^^^^
+Official Packages
+^^^^^^^^^^^^^^^^^
+
+As of version 7.43.0, PycURL provides binary wheels for Windows. If you are
+using an official distribution of Python (i.e., one downloaded from
+https://www.python.org/), and you are using pip, you should be able to
+install PycURL by running:
+
+ pip install pycurl
+
+If you are not using pip, EXE and MSI installers are available in the
+`download area`_.
+
+Both 32-bit and 64-bit builds of PycURL are available for Windows.
+
+
+Using PycURL With Custom Python Builds
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Binary packages are available in the `download area`_
-for some Windows and Python version combinations.
-Currently, 32-bit packages are available for Python 2.6, 2.7, 3.2 and 3.3.
-64-bit packages are not presently available.
+As of version 7.21.5, PycURL is linked statically against all of its
+dependencies except MSVCRT. This means that as long as your custom Python
+build uses the same version of MSVC as the corresponding official Python build
+as well as the same MSVCRT linking setting (/MD et. al.) you should be
+able to use an official PycURL package.
-In order to use the official binary packages, your installation of Python must
-have been compiled against the same MS Visual C++ runtime that the packages
-have been compiled against. Importantly, which version of MSVC is used
-has changed in minor releases of Python, for example between 2.7.3 and 2.7.6.
-As such, you may need to upgrade or downgrade your version of Python to use
-official PycURL packages.
+If your Python build uses different MSVCRT settings or a different MSVC
+version from the official Python builds, you will need to compile PycURL
+from source.
Currently official PycURL packages are built against the following Python
versions:
- 2.6.6
-- 2.7.6
+- 2.7.10
- 3.2.5
- 3.3.5
+- 3.4.3
+- 3.5.0
-If CRTs used by PycURL and Python do not match, you will receive a message
-like following when trying to import pycurl module::
+If the C runtime library (MSVCRT.DLL) versions used by PycURL and Python
+do not match, you will receive a message
+like the following one when trying to import ``pycurl`` module::
ImportError: DLL load failed: The specified procedure could not be found.
-To troubleshoot this situation use the `application profiling feature`_ of
+To identify which MSVCRT version your Python uses use the
+`application profiling feature`_ of
`Dependency Walker`_ and look for `msvcrt.dll variants`_ being loaded.
You may find `the entire thread starting here`_ helpful.
@@ -153,11 +173,25 @@ You may find `the entire thread starting here`_ helpful.
.. _the entire thread starting here: http://curl.haxx.se/mail/curlpython-2014-05/0000.html
-Installing From Source
-^^^^^^^^^^^^^^^^^^^^^^
+Building From Source
+^^^^^^^^^^^^^^^^^^^^
-First, you will need to obtain dependencies. These can be precompiled binaries
-or source packages that you are going to compile yourself.
+Building PycURL from source is not for the faint of heart due to the multitude
+of possible dependencies. Additionally different dependencies have different
+settings for MSVCRT usage, and an application must have all of its parts
+agreeing on a single setting. If you decide to build PycURL from source
+you should familiarize yourself with the ``winbuild.py``
+script - it is used to build the official binaries and tweaking it for
+your environment is likely to be less work than starting from scratch.
+
+If you are compiling PycURL from source it is recommended to compile all of its
+dependencies from source as well. Using precompiled libraries may lead to
+multiple MSVCRT versions mixed in the resulting PycURL binary, which will
+not be good.
+
+If PycURL is to be linked statically against its dependencies, OpenSSL must
+be patched to link to the DLL version of MSVCRT. There is a patch for this in
+``winbuild`` directory of PycURL source.
For a minimum build you will just need libcurl source. Follow its Windows
build instructions to build either a static or a DLL version of the library,
@@ -165,7 +199,7 @@ then configure PycURL as follows to use it::
python setup.py --curl-dir=c:\dev\curl-7.33.0\builds\libcurl-vc-x86-release-dll-ipv6-sspi-spnego-winssl --use-libcurl-dll
-Note that ``--curl-dir`` does not point to libcurl source but rather to headers
+Note that ``--curl-dir`` must point not to libcurl source but rather to headers
and compiled libraries.
If libcurl and Python are not linked against the same exact C runtime
@@ -184,7 +218,7 @@ Additional Windows setup.py options:
OpenSSL.
- ``--with-ssl``: legacy alias for ``--with-openssl``.
- ``--avoid-stdio``: on Windows, a process and each library it is using
- may be linked to its own version of the C runtime (msvcrt).
+ may be linked to its own version of the C runtime (MSVCRT).
FILE pointers from one C runtime may not be passed to another C runtime.
This option prevents direct passing of FILE pointers from Python to libcurl,
thus permitting Python and libcurl to be linked against different C runtimes.
@@ -216,19 +250,26 @@ it to build a single package you need.
Prerequisites:
-- msysgit_.
+- `Git for Windows`_.
- Appropriate `Python versions`_ installed.
- MS Visual C++ 9/2008 for Python <= 3.2, MS Visual C++ 10/2010 for
- Python >= 3.3. Express versions of Visual Studio work fine for this.
-
-.. _msysgit: http://msysgit.github.io/
+ Python 3.3 or 3.4, MS Visual C++ 14/2015 for Python 3.5.
+ Express versions of Visual Studio work fine for this,
+ although getting 64 bit compilers to wok in some Express versions involves
+ jumping through several hoops.
+- NASM if building libcurl against OpenSSL.
+- ActivePerl if building libcurl against OpenSSL. The perl shipping with
+ Git for Windows handles forward and backslashes in paths in a way that is
+ incompatible with OpenSSL's build scripts.
+
+.. _Git for Windows: https://git-for-windows.github.io/
.. _Python versions: http://python.org/download/
``winbuild.py`` assumes all programs are installed in their default locations,
if this is not the case edit it as needed. ``winbuild.py`` itself can be run
-with any Python it supports - 2.6, 2.7, 3.2, 3.3 or 3.4.
+with any Python it supports - 2.6, 2.7 or 3.2 through 3.5.
-.. _`download area`: http://pycurl.sourceforge.net/download/
+.. _`download area`: https://dl.bintray.com/pycurl/pycurl/
Git Checkout
@@ -272,3 +313,19 @@ backend, you can try rebuilding libcurl and PycURL against another SSL backend.
.. _reported: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=515200
.. _problems: https://bugs.launchpad.net/ubuntu/+source/pycurl/+bug/1111673
+
+
+SSL Certificate Bundle
+----------------------
+
+libcurl, and PycURL, by default verify validity of HTTPS servers' SSL
+certificates. Doing so requires a CA certificate bundle, which libcurl
+and most SSL libraries do not provide.
+
+Here_ is a good resource on how to build your own certificate bundle.
+certifie.com also has a `prebuilt certificate bundle`_.
+To use the certificate bundle, use ``CAINFO`` or ``CAPPATH`` PycURL
+options.
+
+.. _Here: http://certifie.com/ca-bundle/
+.. _prebuilt certificate bundle: http://certifie.com/ca-bundle/ca-bundle.crt.txt
diff --git a/Makefile b/Makefile
index 5d58628..bcb13e8 100644
--- a/Makefile
+++ b/Makefile
@@ -143,6 +143,7 @@ docs: build
PYTHONSUFFIX=$$(python -V 2>&1 |awk '{print $$2}' |awk -F. '{print $$1 "." $$2}') && \
PYTHONPATH=$$(ls -d build/lib.*$$PYTHONSUFFIX):$$PYTHONPATH \
sphinx-build doc build/doc
+ cp ChangeLog build/doc
# Rebuild all documentation.
# As sphinx extracts documentation from pycurl modules, docs targets
@@ -154,6 +155,7 @@ docs-force: build
PYTHONSUFFIX=$$(python -V 2>&1 |awk '{print $$2}' |awk -F. '{print $$1 "." $$2}') && \
PYTHONPATH=$$(ls -d build/lib.*$$PYTHONSUFFIX):$$PYTHONPATH \
sphinx-build doc build/doc
+ cp ChangeLog build/doc
www: docs
mkdir -p build
diff --git a/PKG-INFO b/PKG-INFO
index c420912..1d14ae7 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,14 +1,93 @@
Metadata-Version: 1.1
Name: pycurl
-Version: 7.21.5
-Summary: PycURL -- cURL library module for Python
-Home-page: http://pycurl.sourceforge.net/
+Version: 7.43.0
+Summary: PycURL -- A Python Interface To The cURL library
+Home-page: http://pycurl.io/
Author: Oleg Pudeyev
Author-email: oleg at bsdpower.com
License: LGPL/MIT
-Download-URL: http://pycurl.sourceforge.net/download/
-Description:
- This module provides Python bindings for the cURL library.
+Description: PycURL -- A Python Interface To The cURL library
+ ================================================
+
+ 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.
+ Beyond simple fetches however PycURL exposes most of the functionality of
+ libcurl, including:
+
+ - Speed - libcurl is very fast and PycURL, being a thin wrapper above
+ libcurl, is very fast as well. PycURL `was benchmarked`_ to be several
+ times faster than requests_.
+ - Features including multiple protocol support, SSL, authentication and
+ proxy options. PycURL supports most of libcurl's callbacks.
+ - Multi_ and share_ interfaces.
+ - Sockets used for network operations, permitting integration of PycURL
+ into the application's I/O loop (e.g., using Tornado_).
+
+ .. _was benchmarked: http://stackoverflow.com/questions/15461995/python-requests-vs-pycurl-performance
+ .. _requests: http://python-requests.org/
+ .. _Multi: http://curl.haxx.se/libcurl/c/libcurl-multi.html
+ .. _share: http://curl.haxx.se/libcurl/c/libcurl-share.html
+ .. _Tornado: http://www.tornadoweb.org/
+
+
+ Requirements
+ ------------
+
+ - Python 2.6, 2.7 or 3.1 through 3.5.
+ - libcurl 7.19.0 or better.
+
+
+ Installation
+ ------------
+
+ Download source and binary distributions from `PyPI`_ or `Bintray`_.
+ Binary wheels are now available for 32 and 64 bit Windows versions.
+
+ Please see `the installation documentation`_ for installation instructions.
+
+ .. _PyPI: https://pypi.python.org/pypi/pycurl
+ .. _Bintray: https://dl.bintray.com/pycurl/pycurl/
+ .. _the installation documentation: http://pycurl.io/docs/latest/install.html
+
+
+ Documentation
+ -------------
+
+ Documentation for the most recent PycURL release is available on
+ `PycURL website <http://pycurl.io/docs/latest/>`_.
+
+
+ Support
+ -------
+
+ For support questions please use `curl-and-python mailing list`_.
+ `Mailing list archives`_ are available for your perusal as well.
+
+ Although not an official support venue, `Stack Overflow`_ has been
+ popular with some PycURL users.
+
+ Bugs can be reported `via GitHub`_. Please use GitHub only for bug
+ reports and direct questions to our mailing list instead.
+
+ .. _curl-and-python mailing list: http://cool.haxx.se/mailman/listinfo/curl-and-python
+ .. _Stack Overflow: http://stackoverflow.com/questions/tagged/pycurl
+ .. _Mailing list archives: http://curl.haxx.se/mail/list.cgi?list=curl-and-python
+ .. _via GitHub: https://github.com/pycurl/pycurl/issues
+
+
+ License
+ -------
+
+ PycURL is dual licensed under the LGPL and an MIT/X derivative license
+ based on the libcurl license. The complete text of the licenses is available
+ in COPYING-LGPL_ and COPYING-MIT_ files in the source distribution.
+
+ .. _libcurl: http://curl.haxx.se/libcurl/
+ .. _urllib: http://docs.python.org/library/urllib.html
+ .. _COPYING-LGPL: https://raw.githubusercontent.com/pycurl/pycurl/master/COPYING-LGPL
+ .. _COPYING-MIT: https://raw.githubusercontent.com/pycurl/pycurl/master/COPYING-MIT
+
Keywords: curl,libcurl,urllib,wget,download,file transfer,http,www
Platform: All
Classifier: Development Status :: 5 - Production/Stable
diff --git a/README.rst b/README.rst
index 0a5f2a1..46916d3 100644
--- a/README.rst
+++ b/README.rst
@@ -1,41 +1,31 @@
-PycURL: Python interface to libcurl
-====================================
+PycURL -- A Python Interface To The cURL library
+================================================
.. image:: https://api.travis-ci.org/pycurl/pycurl.png
:target: https://travis-ci.org/pycurl/pycurl
-PycURL is a Python interface to `libcurl`_. PycURL can be used to fetch objects
-identified by a URL from a Python program, similar to the `urllib`_ Python module.
-PycURL is mature, very fast, and supports a lot of features.
-
-Overview
---------
-
-- libcurl is a free and easy-to-use client-side URL transfer library, supporting
- FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP,
- SMTP, POP3 and RTSP. libcurl supports SSL certificates, HTTP POST, HTTP PUT,
- FTP uploading, HTTP form based upload, proxies, cookies, user+password
- authentication (Basic, Digest, NTLM, Negotiate, Kerberos4), file transfer
- resume, http proxy tunneling and more!
-
-- libcurl is highly portable, it builds and works identically on numerous
- platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX, IRIX,
- AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOs, Mac OS X,
- Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS and more...
-
-- libcurl is `free`_, `thread-safe`_, `IPv6 compatible`_, `feature rich`_,
- `well supported`_, `fast`_, `thoroughly documented`_ and is already used by
- many known, big and successful `companies`_ and numerous `applications`_.
-
-.. _free: http://curl.haxx.se/docs/copyright.html
-.. _thread-safe: http://curl.haxx.se/libcurl/features.html#thread
-.. _`IPv6 compatible`: http://curl.haxx.se/libcurl/features.html#ipv6
-.. _`feature rich`: http://curl.haxx.se/libcurl/features.html#features
-.. _`well supported`: http://curl.haxx.se/libcurl/features.html#support
-.. _`fast`: http://curl.haxx.se/libcurl/features.html#fast
-.. _`thoroughly documented`: http://curl.haxx.se/libcurl/features.html#docs
-.. _companies: http://curl.haxx.se/docs/companies.html
-.. _applications: http://curl.haxx.se/libcurl/using/apps.html
+
+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.
+Beyond simple fetches however PycURL exposes most of the functionality of
+libcurl, including:
+
+- Speed - libcurl is very fast and PycURL, being a thin wrapper above
+ libcurl, is very fast as well. PycURL `was benchmarked`_ to be several
+ times faster than requests_.
+- Features including multiple protocol support, SSL, authentication and
+ proxy options. PycURL supports most of libcurl's callbacks.
+- Multi_ and share_ interfaces.
+- Sockets used for network operations, permitting integration of PycURL
+ into the application's I/O loop (e.g., using Tornado_).
+
+.. _was benchmarked: http://stackoverflow.com/questions/15461995/python-requests-vs-pycurl-performance
+.. _requests: http://python-requests.org/
+.. _Multi: http://curl.haxx.se/libcurl/c/libcurl-multi.html
+.. _share: http://curl.haxx.se/libcurl/c/libcurl-share.html
+.. _Tornado: http://www.tornadoweb.org/
+
Requirements
------------
@@ -43,18 +33,31 @@ Requirements
- Python 2.6, 2.7 or 3.1 through 3.5.
- libcurl 7.19.0 or better.
+
Installation
------------
-Please see INSTALL.rst for installation instructions. If installing from
-a Git checkout, please follow instruction in the "Git Checkout" section
-in INSTALL.rst.
+Download source and binary distributions from `PyPI`_ or `Bintray`_.
+Binary wheels are now available for 32 and 64 bit Windows versions.
+
+Please see `INSTALL.rst`_ for installation instructions. If installing from
+a Git checkout, please follow instruction in the `Git Checkout`_ section
+of INSTALL.rst.
+
+.. _PyPI: https://pypi.python.org/pypi/pycurl
+.. _Bintray: https://dl.bintray.com/pycurl/pycurl/
+.. _INSTALL.rst: http://pycurl.io/docs/latest/install.html
+.. _Git Checkout: http://pycurl.io/docs/latest/install.html#git-checkout
+
Documentation
-------------
Documentation for the most recent PycURL release is available on
-`PycURL website <http://pycurl.sourceforge.net/doc/>`_.
+`PycURL website <http://pycurl.io/docs/latest/>`_.
+
+Documentation for the development version of PycURL
+is available `here <pycurl.io/docs/dev/>`.
To build documentation from source, run ``make docs``.
Building documentation requires `Sphinx <http://sphinx-doc.org/>`_ to
@@ -62,25 +65,25 @@ be installed, as well as pycurl extension module built as docstrings are
extracted from it. Built documentation is stored in ``build/doc``
subdirectory.
+
Support
-------
-For support questions, please use `curl-and-python mailing list`_.
+For support questions please use `curl-and-python mailing list`_.
`Mailing list archives`_ are available for your perusal as well.
-Although not an official support venue, `Stack Overflow`_ has been quite
-popular with PycURL users as well.
+Although not an official support venue, `Stack Overflow`_ has been
+popular with some PycURL users.
-Bugs can be reported `via GitHub`_. Please only use GitHub issues when you are
-certain you have found a bug in PycURL. If you do not have a patch to fix
-the bug, or at least a specific code fragment in PycURL that you believe is
-the cause, you should instead post your inquiry to the mailing list.
+Bugs can be reported `via GitHub`_. Please use GitHub only for bug
+reports and direct questions to our mailing list instead.
.. _curl-and-python mailing list: http://cool.haxx.se/mailman/listinfo/curl-and-python
.. _Stack Overflow: http://stackoverflow.com/questions/tagged/pycurl
.. _Mailing list archives: http://curl.haxx.se/mail/list.cgi?list=curl-and-python
.. _via GitHub: https://github.com/pycurl/pycurl/issues
+
Automated Tests
---------------
@@ -105,6 +108,7 @@ vsftpd tests you must explicitly set PYCURL_VSFTPD_PATH variable like so::
.. _bottle: http://bottlepy.org/
.. _vsftpd: http://vsftpd.beasts.org/
+
Test Matrix
-----------
@@ -137,6 +141,7 @@ and supported libcurl versions, then run pycurl tests against each combination.
To see what the combinations are, look in
`tests/matrix.py <tests/matrix.py>`_.
+
Contribute
----------
@@ -161,6 +166,7 @@ For larger changes:
Please contribute binary distributions for your system to the
`downloads repository`_.
+
License
-------
@@ -178,7 +184,7 @@ License
included in the file COPYING-MIT. You can redistribute and/or modify PycURL
according to the terms of either license.
-.. _PycURL: http://pycurl.sourceforge.net/
+.. _PycURL: http://pycurl.io/
.. _libcurl: http://curl.haxx.se/libcurl/
.. _urllib: http://docs.python.org/library/urllib.html
.. _`the repository`: https://github.com/pycurl/pycurl
diff --git a/RELEASE-NOTES.rst b/RELEASE-NOTES.rst
index 742ab94..fec52d9 100644
--- a/RELEASE-NOTES.rst
+++ b/RELEASE-NOTES.rst
@@ -1,6 +1,24 @@
Release Notes
=============
+PycURL 7.43.0 - 2016-02-02
+--------------------------
+
+Highlights of this release:
+
+1. Binary wheels are now built for Windows systems.
+
+2. setopt_string method added to Curl objects to permit setting string libcurl
+ options that PycURL does not know about.
+
+3. curl module can now be imported on Windows again.
+
+4. OPENSOCKETFUNCTION callback is now invoked with the address as bytes on
+ Python 3 as was documented.
+
+5. Support for many libcurl options and constants was added.
+
+
PycURL 7.21.5 - 2016-01-05
--------------------------
diff --git a/doc/callbacks.rst b/doc/callbacks.rst
index a63b911..3876a1c 100644
--- a/doc/callbacks.rst
+++ b/doc/callbacks.rst
@@ -6,7 +6,8 @@ Callbacks
For more fine-grained control, libcurl allows a number of callbacks to be
associated with each connection. In pycurl, callbacks are defined using the
``setopt()`` method for Curl objects with options ``WRITEFUNCTION``,
-``READFUNCTION``, ``HEADERFUNCTION``, ``PROGRESSFUNCTION``, ``IOCTLFUNCTION``, or
+``READFUNCTION``, ``HEADERFUNCTION``, ``PROGRESSFUNCTION``,
+``XFERINFOFUNCTION``, ``IOCTLFUNCTION``, or
``DEBUGFUNCTION``. These options correspond to the libcurl options with ``CURLOPT_``
prefix removed. A callback in pycurl must be either a regular Python
function, a class method or an extension type function.
@@ -16,10 +17,8 @@ concurrently with the pycurl callbacks compared to the libcurl callbacks.
This is to allow different callback functions to be associated with different
Curl objects. More specifically, ``WRITEDATA`` cannot be used with
``WRITEFUNCTION``, ``READDATA`` cannot be used with ``READFUNCTION``,
-``WRITEHEADER`` cannot be used with ``HEADERFUNCTION``, ``PROGRESSDATA``
-cannot be used with ``PROGRESSFUNCTION``, ``IOCTLDATA``
-cannot be used with ``IOCTLFUNCTION``, and ``DEBUGDATA`` cannot be used with
-``DEBUGFUNCTION``. In practice, these limitations can be overcome by having a
+``WRITEHEADER`` cannot be used with ``HEADERFUNCTION``.
+In practice, these limitations can be overcome by having a
callback function be a class instance method and rather use the class
instance attributes to store per object data such as files used in the
callbacks.
@@ -179,6 +178,28 @@ PROGRESSFUNCTION
Callback for progress meter. Corresponds to `CURLOPT_PROGRESSFUNCTION`_
in libcurl.
+ ``PROGRESSFUNCTION`` receives amounts as floating point arguments to the
+ callback. Since libcurl 7.32.0 ``PROGRESSFUNCTION`` is deprecated;
+ ``XFERINFOFUNCTION`` should be used instead which receives amounts as
+ long integers.
+
+ ``NOPROGRESS`` option must be set for False libcurl to invoke a
+ progress callback, as PycURL by default sets ``NOPROGRESS`` to True.
+
+
+XFERINFOFUNCTION
+----------------
+
+.. function:: XFERINFOFUNCTION(download total, downloaded, upload total, uploaded) -> status
+
+ Callback for progress meter. Corresponds to `CURLOPT_XFERINFOFUNCTION`_
+ in libcurl.
+
+ ``XFERINFOFUNCTION`` receives amounts as long integers.
+
+ ``NOPROGRESS`` option must be set for False libcurl to invoke a
+ progress callback, as PycURL by default sets ``NOPROGRESS`` to True.
+
Example: Download/upload progress callback
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -197,8 +218,8 @@ document, the arguments related to uploads are zero, and vice versa.
c = pycurl.Curl()
c.setopt(c.URL, "http://slashdot.org/")
- c.setopt(c.NOPROGRESS, 0)
- c.setopt(c.PROGRESSFUNCTION, progress)
+ c.setopt(c.NOPROGRESS, False)
+ c.setopt(c.XFERINFOFUNCTION, progress)
c.perform()
@@ -312,6 +333,7 @@ SSH_KEYFUNCTION
.. _CURLOPT_WRITEFUNCTION: http://curl.haxx.se/libcurl/c/CURLOPT_WRITEFUNCTION.html
.. _CURLOPT_READFUNCTION: http://curl.haxx.se/libcurl/c/CURLOPT_READFUNCTION.html
.. _CURLOPT_PROGRESSFUNCTION: http://curl.haxx.se/libcurl/c/CURLOPT_PROGRESSFUNCTION.html
+.. _CURLOPT_XFERINFOFUNCTION: http://curl.haxx.se/libcurl/c/CURLOPT_XFERINFOFUNCTION.html
.. _CURLOPT_DEBUGFUNCTION: http://curl.haxx.se/libcurl/c/CURLOPT_DEBUGFUNCTION.html
.. _CURLOPT_SEEKFUNCTION: http://curl.haxx.se/libcurl/c/CURLOPT_SEEKFUNCTION.html
.. _CURLOPT_IOCTLFUNCTION: http://curl.haxx.se/libcurl/c/CURLOPT_IOCTLFUNCTION.html
diff --git a/doc/conf.py b/doc/conf.py
index c175fbc..39b0829 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -54,9 +54,9 @@ copyright = u'2001-2016 Kjetil Jacobsen, Markus F.X.J. Oberhumer, Oleg Pudeyev'
# built documents.
#
# The short X.Y version.
-version = '7.21.5'
+version = '7.43.0'
# The full version, including alpha/beta/rc tags.
-release = '7.21.5'
+release = '7.43.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/doc/curlobject.rst b/doc/curlobject.rst
index 2a7b694..1dff0c8 100644
--- a/doc/curlobject.rst
+++ b/doc/curlobject.rst
@@ -24,3 +24,5 @@ Curl Object
.. automethod:: pycurl.Curl.pause
.. automethod:: pycurl.Curl.errstr
+
+ .. automethod:: pycurl.Curl.setopt_string
diff --git a/doc/docstrings/curl_setopt.rst b/doc/docstrings/curl_setopt.rst
index ca95499..806b857 100644
--- a/doc/docstrings/curl_setopt.rst
+++ b/doc/docstrings/curl_setopt.rst
@@ -42,7 +42,8 @@ values of different types:
# Python 3.x only:
c.setopt(pycurl.URL, b"http://www.python.org/")
-- ``HTTP200ALIASES``, ``HTTPHEADER``, ``POSTQUOTE``, ``PREQUOTE`` and
+- ``HTTP200ALIASES``, ``HTTPHEADER``, ``POSTQUOTE``, ``PREQUOTE``,
+ ``PROXYHEADER`` and
``QUOTE`` accept a list or tuple of strings. The same rules apply to these
strings as do to string option values. Example::
@@ -87,7 +88,7 @@ For example, ``pycurl.VERBOSE`` has the value 42, and may be set as follows::
c.setopt(42, 1)
-*setopt* can reset an option to its default value, performing the job of
+*setopt* can reset some options to their default value, performing the job of
:py:meth:`pycurl.Curl.unsetopt`, if ``None`` is passed
for the option value. The following two calls are equivalent::
diff --git a/doc/docstrings/curl_setopt_string.rst b/doc/docstrings/curl_setopt_string.rst
new file mode 100644
index 0000000..8186025
--- /dev/null
+++ b/doc/docstrings/curl_setopt_string.rst
@@ -0,0 +1,31 @@
+setopt_string(option, value) -> None
+
+Set curl session option to a string value.
+
+This method allows setting string options that are not officially supported
+by PycURL, for example because they did not exist when the version of PycURL
+being used was released.
+:py:meth:`pycurl.Curl.setopt` should be used for setting options that
+PycURL knows about.
+
+**Warning:** No checking is performed that *option* does, in fact,
+expect a string value. Using this method incorrectly can crash the program
+and may lead to a security vulnerability.
+Furthermore, it is on the application to ensure that the *value* object
+does not get garbage collected while libcurl is using it.
+libcurl copies most string options but not all; one option whose value
+is not copied by libcurl is `CURLOPT_POSTFIELDS`_.
+
+*option* would generally need to be given as an integer literal rather than
+a symbolic constant.
+
+*value* can be a binary string or a Unicode string using ASCII code points,
+same as with string options given to PycURL elsewhere.
+
+Example setting URL via ``setopt_string``::
+
+ import pycurl
+ c = pycurl.Curl()
+ c.setopt_string(10002, "http://www.python.org/")
+
+.. _CURLOPT_POSTFIELDS: http://curl.haxx.se/libcurl/c/CURLOPT_POSTFIELDS.html
diff --git a/doc/docstrings/curl_unsetopt.rst b/doc/docstrings/curl_unsetopt.rst
index 2f1378a..dfb1439 100644
--- a/doc/docstrings/curl_unsetopt.rst
+++ b/doc/docstrings/curl_unsetopt.rst
@@ -4,7 +4,7 @@ Reset curl session option to its default value.
Only some curl options may be reset via this method.
-libcurl does not provide a way to reset a single option to its default value;
+libcurl does not provide a general way to reset a single option to its default value;
:py:meth:`pycurl.Curl.reset` resets all options to their default values,
otherwise :py:meth:`pycurl.Curl.setopt` must be called with whatever value
is the default. For convenience, PycURL provides this unsetopt method
diff --git a/doc/index.rst b/doc/index.rst
index bd92eb2..2aaccb2 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -1,29 +1,116 @@
-``PycURL`` -- A Python Interface To The cURL library
-====================================================
+PycURL -- A Python Interface To The cURL library
+================================================
-The pycurl package is a Python interface to `libcurl`_.
-pycurl has been successfully built and
-tested with Python versions 2.6, 2.7 and 3.1 to 3.5.
+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.
+Beyond simple fetches however PycURL exposes most of the functionality of
+libcurl, including:
-libcurl is a client-side URL transfer library supporting FTP, FTPS, HTTP,
-HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. libcurl also supports HTTPS
-certificates, HTTP POST, HTTP PUT, FTP uploads, proxies, cookies, basic
-authentication, file transfer resume of FTP sessions, HTTP proxy tunneling
-and more.
+- Speed - libcurl is very fast and PycURL, being a thin wrapper above
+ libcurl, is very fast as well. PycURL `was benchmarked`_ to be several
+ times faster than requests_.
+- Features including multiple protocol support, SSL, authentication and
+ proxy options. PycURL supports most of libcurl's callbacks.
+- Multi_ and share_ interfaces.
+- Sockets used for network operations, permitting integration of PycURL
+ into the application's I/O loop (e.g., using Tornado_).
-All the functionality provided by libcurl can used through the pycurl
-interface. The following subsections describe how to use the pycurl
-interface, and assume familiarity with how libcurl works. For information on
-how libcurl works, please consult the `curl library C API`_.
+.. _was benchmarked: http://stackoverflow.com/questions/15461995/python-requests-vs-pycurl-performance
+.. _requests: http://python-requests.org/
+.. _Multi: http://curl.haxx.se/libcurl/c/libcurl-multi.html
+.. _share: http://curl.haxx.se/libcurl/c/libcurl-share.html
+.. _Tornado: http://www.tornadoweb.org/
-.. _libcurl: http://curl.haxx.se/libcurl/
-.. _curl library C API: http://curl.haxx.se/libcurl/c/
-Contents:
+About libcurl
+-------------
+
+- libcurl is a free and easy-to-use client-side URL transfer library, supporting
+ DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3,
+ POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP.
+ libcurl supports SSL certificates, HTTP POST, HTTP PUT,
+ FTP uploading, HTTP form based upload, proxies, cookies, user+password
+ authentication (Basic, Digest, NTLM, Negotiate, Kerberos4), file transfer
+ resume, http proxy tunneling and more!
+
+- libcurl is highly portable, it builds and works identically on numerous
+ platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX, IRIX,
+ AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOs, Mac OS X,
+ Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS and more...
+
+- libcurl is `free`_, `thread-safe`_, `IPv6 compatible`_, `feature rich`_,
+ `well supported`_, `fast`_, `thoroughly documented`_ and is already used by
+ many known, big and successful `companies`_ and numerous `applications`_.
+
+.. _free: http://curl.haxx.se/docs/copyright.html
+.. _thread-safe: http://curl.haxx.se/libcurl/features.html#thread
+.. _`IPv6 compatible`: http://curl.haxx.se/libcurl/features.html#ipv6
+.. _`feature rich`: http://curl.haxx.se/libcurl/features.html#features
+.. _`well supported`: http://curl.haxx.se/libcurl/features.html#support
+.. _`fast`: http://curl.haxx.se/libcurl/features.html#fast
+.. _`thoroughly documented`: http://curl.haxx.se/libcurl/features.html#docs
+.. _companies: http://curl.haxx.se/docs/companies.html
+.. _applications: http://curl.haxx.se/libcurl/using/apps.html
+
+
+Requirements
+------------
+
+- Python 2.6, 2.7 or 3.1 through 3.5.
+- libcurl 7.19.0 or better.
+
+
+Installation
+------------
+
+On Unix, PycURL is easiest to install using your operating system's package
+manager. This will also install libcurl and other dependencies as needed.
+
+Installation via easy_install and pip is also supported::
+
+ easy_install pycurl
+ pip install pycurl
+
+If this does not work, please see :ref:`install`.
+
+On Windows, use pip to install a binary wheel for Python 2.6, 2.7 or
+3.2 through 3.5::
+
+ pip install pycurl
+
+If not using pip, binary distributions in other formats are available
+`on Bintray`_.
+
+.. _on Bintray: https://dl.bintray.com/pycurl/pycurl/
+
+
+Support
+-------
+
+For support questions, please use `curl-and-python mailing list`_.
+`Mailing list archives`_ are available for your perusal as well.
+
+Although not an official support venue, `Stack Overflow`_ has been
+popular with PycURL users as well.
+
+Bugs can be reported `via GitHub`_. Please only use GitHub issues when you are
+certain you have found a bug in PycURL. If you do not have a patch to fix
+the bug, or at least a specific code fragment in PycURL that you believe is
+the cause, you should instead post your inquiry to the mailing list.
+
+.. _curl-and-python mailing list: http://cool.haxx.se/mailman/listinfo/curl-and-python
+.. _Stack Overflow: http://stackoverflow.com/questions/tagged/pycurl
+.. _Mailing list archives: http://curl.haxx.se/mail/list.cgi?list=curl-and-python
+.. _via GitHub: https://github.com/pycurl/pycurl/issues
+
+
+Documentation Contents
+----------------------
.. toctree::
:maxdepth: 2
-
+
release-notes
install
... 4260 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pycurl.git
More information about the Python-modules-commits
mailing list