| Current File : /home/mmdealscpanel/yummmdeals.com/share.tar |
doc/pycurl/RELEASE-NOTES.rst 0000644 00000021262 15033535204 0011332 0 ustar 00 Release Notes
=============
PycURL 7.45.6 - 2025-03-06
--------------------------
The previous release was accidentally built without CA bundle autodetection in
Linux wheels - this restores that behavior (no changes to macOS or Linux).
PycURL 7.45.5 - 2025-03-06
--------------------------
This release is mainly to update the wheels to incorporate libcurl 8.12.1 for
security fixes, as well as enable some additional libraries in wheel builds.
PycURL 7.45.4 - 2024-12-12
--------------------------
This release fixes several minor issues and adds support for several libcurl
options. Additionally, it fixes several issues with the wheels on
Linux/macOS/Windows.
PycURL 7.45.3 - 2024-02-17
--------------------------
This release fixes several minor issues and adds support for several libcurl
options. Additionally, we are now building wheels for Linux/macOS/Windows.
PycURL 7.45.2 - 2022-12-16
--------------------------
This release fixes several minor issues and adds support for several libcurl
options.
PycURL 7.45.1 - 2022-03-13
--------------------------
This release fixes build when libcurl < 7.64.1 is used.
PycURL 7.45.0 - 2022-03-09
--------------------------
This release adds support for SecureTransport SSL backend (MacOS), adds
ability to unset a number of multi options, adds ability to duplicate easy
handles and permits pycurl classes to be subclassed.
PycURL 7.44.1 - 2021-08-15
--------------------------
This release repairs incorrect Python thread initialization logic which
caused operations to hang.
PycURL 7.44.0 - 2021-08-08
--------------------------
This release reinstates best effort Python 2 support, adds Python 3.9 and
Python 3.10 alpha support and implements support for several libcurl options.
Official Windows builds are currently not being produced.
PycURL 7.43.0.6 - 2020-09-02
----------------------------
This release improves SSL backend detection on various systems, adds support
for libcurl's multiple SSL backend functionality and adds support for several
libcurl options.
PycURL 7.43.0.5 - 2020-01-29
----------------------------
This release fixes a build issue on recent Pythons on CentOS/RHEL distributions.
It also brings back Windows binaries. Special thank you to Gisle Vanem for
contributing the nghttp2 makefile.
PycURL 7.43.0.4 - 2020-01-15
----------------------------
This release improves compatibility with Python 3.8 and removes support for
Python 2 and Python 3.4. It also adds wolfSSL support and thread safety of
the multi interface.
PycURL 7.43.0.3 - 2019-06-17
----------------------------
This release primarily fixes an OpenSSL-related installation issue, and
repairs the ability to use PycURL with newer libcurls compiled without FTP
support. Also, mbedTLS support has been contributed by Josef Schlehofer.
PycURL 7.43.0.2 - 2018-06-02
----------------------------
Highlights of this release:
1. Experimental perform_rs and perform_rb methods have been added to Curl
objects. They return response body as a string and a byte string,
respectively. The goal of these methods is to improve PycURL's usability
for typical use cases, specifically removing the need to set up
StringIO/BytesIO objects to store the response body.
2. getinfo_raw and errstr_raw methods have been added to Curl objects to
return transfer information as byte strings, permitting applications to
retrieve transfer information that is not decodable using Python's
default encoding.
3. errstr and "fail or error" exceptions now replace undecodable bytes
so as to provide usable strings; use errstr_raw to retrieve original
byte strings.
4. There is no longer a need to keep references to Curl objects when they
are used in CurlMulti objects - PycURL now maintains such references
internally.
5. Official Windows builds now include HTTP/2 and international domain
name support.
6. PycURL now officially supports BoringSSL.
7. A number of smaller improvements have been made and bugs fixed.
PycURL 7.43.0.1 - 2017-12-07
----------------------------
This release collects fixes and improvements made over the past two years,
notably updating Windows dependencies to address DNS resolution and
TLS connection issues.
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
--------------------------
Highlights of this release:
1. 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.
2. Many other libcurl options and constants have been added to PycURL.
3. When ``pycurl`` module initialization fails, ``ImportError`` is raised
instead of a fatal error terminating the process.
4. Usability of official Windows builds has been greatly improved:
* Dependencies are linked statically, eliminating possible DLL conflicts.
* OpenSSL is used instead of WinSSL.
* libcurl is linked against C-Ares and libssh2.
PycURL 7.19.5.3 - 2015-11-03
----------------------------
PycURL 7.19.5.2 release did not include some of the test suite files in
its manifest, leading to inability to run the test suite from the sdist
tarball. This is now fixed thanks to Kamil Dudka.
PycURL 7.19.5.2 - 2015-11-02
----------------------------
Breaking change: DEBUGFUNCTION now takes bytes rather than (Unicode) string
as its argument on Python 3.
Breaking change: CURLMOPT_* option constants moved from Easy to Multi
class. They remain available in pycurl module.
SSL library detection improved again, --libcurl-dll option to setup.py added.
Options that required tuples now also accept lists, and vice versa.
This release fixes several memory leaks and one use after free issue.
Support for several new libcurl options and constants has been added.
PycURL 7.19.5.1 - 2015-01-06
----------------------------
This release primarily fixes build breakage against libcurl 7.19.4 through
7.21.1, such as versions shipped with CentOS.
PycURL 7.19.5 - 2014-07-12
--------------------------
PycURL C code has been significantly reorganized. Curl, CurlMulti and
CurlShare classes are now properly exported, instead of factory functions for
the respective objects. PycURL API has not changed.
Documentation has been transitioned to Sphinx and reorganized as well.
Both docstrings and standalone documentation are now more informative.
Documentation is no longer included in released distributions. It can be
generated from source by running `make docs`.
Tests are no longer included in released distributions. Instead the
documentation and quickstart examples should be consulted for sample code.
Official Windows builds now are linked against zlib.
PycURL 7.19.3.1 - 2014-02-05
----------------------------
This release restores PycURL's ability to automatically detect SSL library
in use in most circumstances, thanks to Andjelko Horvat.
PycURL 7.19.3 - 2014-01-09
--------------------------
This release brings official Python 3 support to PycURL.
Several GNU/Linux distributions provided Python 3 packages of PycURL
previously; these packages were based on patches that were incomplete and
in some places incorrect. Behavior of PycURL 7.19.3 and later may therefore
differ from behavior of unofficial Python 3 packages of previous PycURL
versions.
To summarize the behavior under Python 3, PycURL will accept ``bytes`` where
it accepted strings under Python 2, and will also accept Unicode strings
containing ASCII codepoints only for convenience. Please refer to
`Unicode`_ and `file`_ documentation for further details.
In the interests of compatibility, PycURL will also accept Unicode data on
Python 2 given the same constraints as under Python 3.
While Unicode and file handling rules are expected to be sensible for
all use cases, and retain backwards compatibility with previous PycURL
versions, please treat behavior of this versions under Python 3 as experimental
and subject to change.
Another potentially disruptive change in PycURL is the requirement for
compile time and runtime SSL backends to match. Please see the readme for
how to indicate the SSL backend to setup.py.
.. _Unicode: doc/unicode.html
.. _file: doc/files.html
doc/pycurl/INSTALL.rst 0000644 00000027662 15033535204 0010504 0 ustar 00 .. _install:
PycURL Installation
===================
NOTE: You need Python and libcurl installed on your system to use or
build pycurl. Some RPM distributions of curl/libcurl do not include
everything necessary to build pycurl, in which case you need to
install the developer specific RPM which is usually called curl-dev.
Distutils
---------
Build and install pycurl with the following commands::
(if necessary, become root)
tar -zxvf pycurl-$VER.tar.gz
cd pycurl-$VER
python setup.py install
$VER should be substituted with the pycurl version number, e.g. 7.10.5.
Note that the installation script assumes that 'curl-config' can be
located in your path setting. If curl-config is installed outside
your path or you want to force installation to use a particular
version of curl-config, use the '--curl-config' command line option to
specify the location of curl-config. Example::
python setup.py install --curl-config=/usr/local/bin/curl-config
If libcurl is linked dynamically with pycurl, you may have to alter the
LD_LIBRARY_PATH environment variable accordingly. This normally
applies only if there is more than one version of libcurl installed,
e.g. one in /usr/lib and one in /usr/local/lib.
SSL
^^^
PycURL requires that the SSL library that it is built against is the same
one libcurl, and therefore PycURL, uses at runtime. PycURL's ``setup.py``
uses ``curl-config`` to attempt to figure out which SSL library libcurl
was compiled against, however this does not always work. If PycURL is unable
to determine the SSL library in use it will print a warning similar to
the following::
src/pycurl.c:137:4: warning: #warning "libcurl was compiled with SSL support, but configure could not determine which " "library was used; thus no SSL crypto locking callbacks will be set, which may " "cause random crashes on SSL requests" [-Wcpp]
It will then fail at runtime as follows::
ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)
To fix this, you need to tell ``setup.py`` what SSL backend is used::
python setup.py --with-[openssl|gnutls|nss|mbedtls|wolfssl|sectransp|schannel] install
Note: as of PycURL 7.21.5, setup.py accepts ``--with-openssl`` option to
indicate that libcurl is built against OpenSSL/LibreSSL/BoringSSL.
``--with-ssl`` is an alias
for ``--with-openssl`` and continues to be accepted for backwards compatibility.
You can also ask ``setup.py`` to obtain SSL backend information from installed
libcurl shared library, as follows:
python setup.py --libcurl-dll=libcurl.so
An unqualified ``libcurl.so`` would use the system libcurl, or you can
specify a full path.
easy_install / pip
------------------
::
easy_install pycurl
pip install pycurl
If you need to specify an alternate curl-config, it can be done via an
environment variable::
export PYCURL_CURL_CONFIG=/usr/local/bin/curl-config
easy_install pycurl
The same applies to the SSL backend, if you need to specify it (see the SSL
note above)::
export PYCURL_SSL_LIBRARY=[openssl|gnutls|nss|mbedtls|sectransp|schannel]
easy_install pycurl
pip and cached pycurl package
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you have already installed pycurl and are trying to reinstall it via
pip with different SSL options for example, pip may reinstall the package it
has previously compiled instead of recompiling pycurl with newly specified
options. More details are given in `this Stack Overflow post`_.
To force pip to recompile pycurl, run::
# upgrade pip if necessary
pip install --upgrade pip
# remove current pycurl
pip uninstall pycurl
# set PYCURL_SSL_LIBRARY
export PYCURL_SSL_LIBRARY=nss
# recompile and install pycurl
pip install --compile pycurl
.. _this Stack Overflow post: http://stackoverflow.com/questions/21487278/ssl-error-installing-pycurl-after-ssl-is-set
Windows
-------
There are currently no official binary Windows packages. You can build PycURL
from source or use third-party binary packages.
Building From Source
^^^^^^^^^^^^^^^^^^^^
Building PycURL from source is not for the faint of heart due to the multitude
of possible dependencies and each of these dependencies having its own
directory structure, configuration style, parameters and quirks.
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
it is advisable to look through the ``winbuild.py``
script - it is used to build the official binaries and contains a wealth
of information for compiling PycURL's dependencies on Windows.
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,
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`` 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
(version number, static/dll, single-threaded/multi-threaded) you must use
``--avoid-stdio`` option (see below).
Additional Windows setup.py options:
- ``--use-libcurl-dll``: build against libcurl DLL, if not given PycURL will
be built against libcurl statically.
- ``--libcurl-lib-name=libcurl_imp.lib``: specify a different name for libcurl
import library. The default is ``libcurl.lib`` which is appropriate for
static linking and is sometimes the correct choice for dynamic linking as
well. The other possibility for dynamic linking is ``libcurl_imp.lib``.
- ``--with-openssl``: use OpenSSL/LibreSSL/BoringSSL crypto locks when libcurl
was built against these SSL backends.
- ``--with-ssl``: legacy alias for ``--with-openssl``.
- ``--openssl-lib-name=""``: specify a different name for OpenSSL import
library containing CRYPTO_num_locks. For OpenSSL 1.1.0+ this should be set
to an empty string as given here.
- ``--avoid-stdio``: on Windows, a process and each library it is using
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.
This option may carry a performance penalty when Python file objects are
given directly to PycURL in CURLOPT_READDATA, CURLOPT_WRITEDATA or
CURLOPT_WRITEHEADER options. This option applies only on Python 2; on
Python 3, file objects no longer expose C library FILE pointers and the
C runtime issue does not exist. On Python 3, this option is recognized but
does nothing. You can also give ``--avoid-stdio`` option in
PYCURL_SETUP_OPTIONS environment variable as follows::
PYCURL_SETUP_OPTIONS=--avoid-stdio pip install pycurl
A good ``setup.py`` target to use is ``bdist_wininst`` which produces an
executable installer that you can run to install PycURL.
You may find the following mailing list posts helpful:
- https://curl.haxx.se/mail/curlpython-2009-11/0010.html
- https://curl.haxx.se/mail/curlpython-2013-11/0002.html
winbuild.py
^^^^^^^^^^^
This script is used to build official PycURL Windows packages. You can
use it to build a full complement of packages with your own options or modify
it to build a single package you need.
Prerequisites:
- `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 or 3.4, MS Visual C++ 14/2015 for Python 3.5 through 3.8.
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.
Using PycURL With Custom Python Builds
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
As of version 7.21.5, the official binary packages of PycURL are 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.), an official PycURL package should work.
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.
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 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.
.. _application profiling feature: https://curl.haxx.se/mail/curlpython-2014-05/0007.html
.. _Dependency Walker: http://www.dependencywalker.com/
.. _msvcrt.dll variants: https://curl.haxx.se/mail/curlpython-2014-05/0010.html
.. _the entire thread starting here: https://curl.haxx.se/mail/curlpython-2014-05/0000.html
Git Checkout
------------
In order to build PycURL from a Git checkout, some files need to be
generated. On Unix systems it is easiest to build PycURL with ``make``::
make
To specify which curl or SSL backend to compile against, use the same
environment variables as easy_install/pip, namely ``PYCURL_CURL_CONFIG``
and ``PYCURL_SSL_LIBRARY``.
To generate generated files only you may run::
make gen
This might be handy if you are on Windows. Remember to run ``make gen``
whenever you change sources.
To generate documentation, run::
make docs
Generating documentation requires `Sphinx`_ to be installed.
.. _Sphinx: http://sphinx-doc.org/
A Note Regarding SSL Backends
-----------------------------
libcurl's functionality varies depending on which SSL backend it is compiled
against. For example, users have `reported`_ `problems`_ with GnuTLS backend.
As of this writing, generally speaking, OpenSSL backend has the most
functionality as well as the best compatibility with other software.
If you experience SSL issues, especially if you are not using OpenSSL
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 ``CAPATH`` PycURL
options.
.. _Here: http://certifie.com/ca-bundle/
.. _prebuilt certificate bundle: http://certifie.com/ca-bundle/ca-bundle.crt.txt
doc/pycurl/ChangeLog 0000644 00000174560 15033535204 0010416 0 ustar 00 Version 7.45.6 [requires libcurl-7.19.0 or better] - 2025-03-06
---------------------------------------------------------------
* Re-enable building Linux wheels with CA bundle autodetection
Version 7.45.5 [requires libcurl-7.19.0 or better] - 2025-03-06
---------------------------------------------------------------
* Enable GSS-API and brotli support in wheels (patch by Scott Talbert).
* Add support for calling getinfo with CURLOPT_*_T arguments
(patch by Scott Talbert)
* Change wheels to build using shared libraries (vice static libraries)
(patch by Scott Talbert)
* Build wheels with curl 8.12.1 (mainly for security fixes)
Version 7.45.4 [requires libcurl-7.19.0 or better] - 2024-12-12
---------------------------------------------------------------
* Add support for CURLOPT_HAPROXY_CLIENT_IP (patch by Scott Talbert).
* Port tests from bottle to flask (patch by Miro Hrončok).
* Add constant for CURL_HTTP_VERSION_3ONLY (patch by Pavel Horáček).
* Add EFFECTIVE_METHOD info option (patch by Pavel Horáček).
* Don't use `-flat_namespace` on macOS (patch by Michael Cho).
* Add some missing GIL checks to callback functions
(patch by Scott Talbert).
* Fix assorted bugs in pycurl tests, including a segfault
(patch by Scott Talbert). All tests should now pass on Linux and
macOS.
* Fix minor bug in examples/multi-socket_action-select.py
(patch by Oleg Broytman).
* Build all wheels using the latest version of libcurl and its
dependencies (patch by Scott Talbert). All wheels should now have
openssl, HTTP2, and SSH support.
* Implement Certificate Authority path autodetection when building
Linux wheels (patch by Scott Talbert).
Version 7.45.3 [requires libcurl-7.19.0 or better] - 2024-02-17
---------------------------------------------------------------
* Add CURLOPT_REQUEST_TARGET option (patch by Marcel Brouwers).
* Add missing 2nd parameters to METH_NOARGS functions
(patch by Scott Talbert).
* Add CURLOPT_AWS_SIGV4 option (patch by Scott Talbert).
* Add consistent names for newer Curl version constants
(patch by Scott Talbert).
* Only run HTTP version 3 option constant test if curl supported
(patch by Scott Talbert).
* Expose COMPILE_SSL_LIB in Python and use for test filtering
(patch by Scott Talbert).
* Filter tests based on *compile* libcurl version not runtime version
(patch by Scott Talbert).
* Use print function in callbacks documentation
(patch by Scott Talbert).
* Add missing shebang to tests/ext/test-suite.sh
(patch by Scott Talbert).
* Officially declare support for Python 3.12
(patch by Scott Talbert).
* Fix curl_multi_info_read flow that loses messages
(patch by Dom Sekotill).
* Support using environment variables for setup on Windows
(patch by Scott Talbert).
* Add support for Schannel SSL backend (patch by Scott Talbert)
* Skip HTTP2 tests based on a curl support check
(patch by Scott Talbert).
* Fix fake-curl tests so they work when run out of tree
(patch by Scott Talbert).
* xfail test_easy_pause_unpause unconditionally
(patch by Scott Talbert).
* Provide generic error strings in pycurl.error objects
(patch by Scott Talbert).
* Change URLs to new curl mailing list (patch by Michael C).
* Add missing HTTPS proxy options (patch by Jean Hominal).
* Add support for setting CURLOPT_SSLCERT_BLOB
(patch by Vesa Jääskeläinen).
* Add support for setting rest of CURLOPTTYPE_BLOB fields
(patch by Vesa Jääskeläinen).
* Build wheels on Linux/macOS/Windows (patch by Scott Talbert).
Version 7.45.2 [requires libcurl-7.19.0 or better] - 2022-12-16
---------------------------------------------------------------
* Python 3.9 compatibility for Py_TRASHCAN_SAFE_BEGIN
(patch by Scott Talbert).
* Add support for CURL_HTTP_VERSION_3 (patch by Scott Talbert).
* Add CURLOPT_TLS13_CIPHERS and CURLOPT_PROXY_TLS13_CIPHERS options
(patch by Scott Talbert).
* Added HTTP09_ALLOWED option (patch by Scott Talbert).
* Removed use of distutils (patch by Scott Talbert).
Version 7.45.1 [requires libcurl-7.19.0 or better] - 2022-03-13
---------------------------------------------------------------
* Fixed build against libcurl < 7.64.1 (patch by Scott Talbert).
Version 7.45.0 [requires libcurl-7.64.1 or better] - 2022-03-09
---------------------------------------------------------------
* 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).
Version 7.44.1 [requires libcurl-7.19.0 or better] - 2021-08-15
---------------------------------------------------------------
* Fixed Python thread initialization causing hangs on operations
(patch by Scott Talbert).
Version 7.44.0 [requires libcurl-7.19.0 or better] - 2021-08-08
---------------------------------------------------------------
* 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).
Version 7.43.0.6 [requires libcurl-7.19.0 or better] - 2020-09-02
-----------------------------------------------------------------
* Fixed offset parameter usage in seek callback (patch by Scott Talbert).
* Added support for libcurl SSL backend detection via
`curl-config --ssl-backends` (patch by Scott Talbert).
* Added support for libcurl MultiSSL (patch by Bo Anderson).
* Added ability to unset CURLOPT_PROXY.
* Added support for CURLOPT_UPLOAD_BUFFERSIZE (patch by Artur Sobierak).
* Added support for CURLOPT_MAXAGE_CONN (patch by Artur Sobierak).
* Added support for sharing connection cache in libcurl (patch by
Artur Sobierak).
* Added support for CURLOPT_HAPROXYPROTOCOL (patch by
Russell McConnachie).
* CC and CFLAGS environment variables are now respected when building
(patch by Michał Górny).
* Fixed OpenSSL detection on CentOS 7 and 8 (patch by Nicolas Pauss).
* surrogateescape error handler is used in multi_info_read to handle
invalid UTF-8.
Version 7.43.0.5 [requires libcurl-7.19.0 or better] - 2020-01-29
-----------------------------------------------------------------
* Fixed build with recent Pythons on RHEL/CentOS.
Version 7.43.0.4 [requires libcurl-7.19.0 or better] - 2020-01-15
-----------------------------------------------------------------
* Minimum supported Python 3 version is now 3.5.
* Python 2 is no longer officially supported.
* Improved thread safety of multi code.
* Added Python 3.8 support (patch by Michael Treanor).
* Fixed link order when linking statically against OpenSSL (patch by
Ashley Whetter).
* Fixed Darwin detection.
* Added support for wolfSSL (patch by Eneas U de Queiroz).
* Added PROXY_SSL_VERIFYHOST (patch by Amir Rossert).
Version 7.43.0.3 [requires libcurl-7.19.0 or better] - 2019-06-17
-----------------------------------------------------------------
* Fixed use with libcurl 7.65+ when FTP support is disabled.
* Added support for mbedTLS (patch by Josef Schlehofer).
* Fixed string processing on Python 3 (patch by Dmitriy Taychenachev).
* Added CURLOPT_TCP_FASTOPEN and CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE
(patch by Khavish Anshudass Bhundoo).
* Repaired inability to install PycURL when libcurl is using an SSL
backend other than the ones PycURL explicitly recognizes and
handles (OpenSSL, LibreSSL, BoringSSL, GnuTLS, NSS).
The requirement for setup.py to detect an SSL backend if libcurl
is configured to use SSL, added in 7.43.0.2, has been changed
to a warning to allow this.
Version 7.43.0.2 [requires libcurl-7.19.0 or better] - 2018-06-02
-----------------------------------------------------------------
* Official Windows builds now include HTTP 2 support via
libnghttp2 and international domain name support via WINIDN.
* 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.
* Python 3.2 and 3.3 support officially dropped as those versions
are end of lifed.
* set_ca_certs now accepts byte strings as it should have been
all along.
* PycURL now skips automatic SSL backend detection if curl-config
indicates that libcurl is not built with SSL support, and will warn
if an SSL backend is explicitly specified in this case.
* PycURL now requires that SSL backend is determined by setup.py
to provide earlier failure compared to the existing warning
during compilation and failing during module import on mismatched
SSL backends.
* 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).
* Support for Python 2.6 officially dropped.
* Added SOCKET_BAD constant and it is now recognized as a valid
return value from OPENSOCKET callback.
* BoringSSL is now recognized as equivalent to OpenSSL backend
(patch by Gisle Vanem).
Version 7.43.0.1 [requires libcurl-7.19.0 or better] - 2017-12-07
-----------------------------------------------------------------
* WRITEHEADER/WRITEFUNCTION and WRITEDATA/WRITEFUNCTION can now
be set on the same handle. The last call will take precedence over
previous calls. Previously some combinations were not allowed.
* Fixed a crash when using WRITEDATA with a file-like object followed
by WRITEDATA with a real file object (patch by Léo El Amri).
* Fixed a theoretical memory leak in module initialization (patch by
ideal).
* Added support for CURL_SSLVERSION_MAX_* constants (libcurl 7.52.0+,
patch by Jozef Melicher).
* Added support for CURLSSH_AUTH_AGENT (libcurl 7.28.0+,
patch by kxrd).
* Added support for CURLOPT_CONNECT_TO (patch by Iain R. Learmonth).
* Added support for CURLINFO_HTTP_VERSION (patch by Iain R. Learmonth).
* Fixed build against OpenSSL l.1 on Windows.
* Added set_ca_certs method to the Easy object to set CA certificates
from a string (OpenSSL only, patch by Lipin Dmitriy).
* Python 3.6 is now officially supported (patch by Samuel
Dion-Girardeau).
* Added support for CURLOPT_PROXY_CAPATH (libcurl 7.52.0+,
patch by Jan Kryl).
* C-Ares updated to 1.12.0 in Windows builds, fixing DNS resolution
issues on Windows (patch by Wei C).
* Added --openssl-lib-name="" option to support building against
OpenSSL 1.1.0 on Windows.
* Fixed a possible double free situation in all Curl objects
due to a misuse of the trashcan API (patch by Benjamin Peterson).
* High level Curl objects can now be reused.
* LARGE options fixed under Windows and Python 3 (INFILESIZE,
MAX_RECV_SPEED_LARGE, MAX_SEND_SPEED_LARGE, MAXFILESIZE,
POSTFILESIZE, RESUME_FROM).
* Fixed compilation on Solaris (patch by Yiteng Zhang).
* ENCODING option can now be unset (patch by Yves Bastide).
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
---------------------------------------------------------------
* --with-openssl and its --win-ssl alias setup.py options are now
accepted under Windows in order to use OpenSSL's crypto locks
when building against OpenSSL.
* --with-openssl added as an alias for --with-ssl option to setup.py.
* Official Windows builds are now linked against C-Ares and libssh2.
* Official Windows builds are now linked against OpenSSL instead of
WinSSL.
* Official Windows builds are now statically linked against
their dependencies (libcurl and zlib).
* Added CURLOPT_USE_SSL and CURLUSESSL_* constants.
* Added CURLOPT_APPEND, CURLOPT_COOKIESESSION, CURLOPT_DIRLISTONLY,
CURLOPT_KEYPASSWD, CURLOPT_TELNETOPTIONS.
* Several CURLE_* and CURLM_* constants added.
* Add VERSION_* constants, corresponding to CURL_VERSION_*.
* Breaking change: OPENSOCKETFUNCTION callback API now mirrors that
of libcurl:
1. The callback now takes two arguments, `purpose' and `address`.
Previously the callback took `family', `socktype', `protocol`
and `addr' arguments.
2. The second argument to the callback, `address', is a
`namedtuple' with `family', `socktype', `protocol' and
`addr' fields.
3. `addr' field on `address' for AF_INET6 family addresses is a
4-tuple of (address, port, flow info, scope id) which matches
Python's `socket.getaddrinfo' API.
It seems that libcurl may mishandle error return from an
opensocket callback, as would happen when code written for
pre-PycURL 7.21.5 API is run with PycURL 7.21.5 or newer,
resulting in the application hanging.
* OPENSOCKETFUNCTION callback can now be unset.
* Added CURLOPT_CLOSESOCKETFUNCTION (libcurl 7.21.7+).
CURLOPT_CLOSESOCKETDATA is used internally by PycURL.
* Added CURLOPT_SOCKOPTFUNCTION. CURLOPT_SOCKOPTDATA is used
internally by PycURL.
* Added CURLOPT_SSH_KEYFUNCTION (libcurl 7.19.6+).
CURLOPT_SSH_KEYDATA is used internally by PycURL.
* Added CURLOPT_SSL_OPTIONS (libcurl 7.25.0+).
* Added CURLOPT_KRBLEVEL.
* Added CURLOPT_SSL_FALSESTART (libcurl 7.42.0+).
* Added CURLOPT_SSL_ENABLE_NPN (libcurl 7.36.0+).
* Added CURLOPT_SSL_ENABLE_ALPN (libcurl 7.36.0+).
* Added CURLOPT_UNIX_SOCKET_PATH (libcurl 7.40.0+).
* Added CURLOPT_WILDCARDMATCH (libcurl 7.21.0+).
* C module initialization changed to raise exceptions on failure
rather than trigger a fatal error and abort the Python interpreter.
* Added CURLOPT_PINNEDPUBLICKEY (libcurl 7.39.0-7.44.0+
depending on SSL backend and encoding algorithm).
* Fixed incorrect detection of libcurl 7.19.5 and 7.19.6
(thanks to bataniya).
Version 7.19.5.3 [requires libcurl-7.19.0 or better] - 2015-11-03
-----------------------------------------------------------------
* 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).
Version 7.19.5.2 [requires libcurl-7.19.0 or better] - 2015-11-02
-----------------------------------------------------------------
* 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).
Version 7.19.5.1 [requires libcurl-7.19.0 or better] - 2015-01-06
-----------------------------------------------------------------
* 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+).
Version 7.19.5 [requires libcurl-7.21.2 or better] - 2014-07-12
---------------------------------------------------------------
* 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:
https://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+).
* Added CURLE_NOT_BUILT_IN and CURLE_UNKNOWN_OPTION (libcurl 7.21.5+).
* Added CURL_SEEKFUNC_OK, CURL_SEEKFUNC_FAIL and
CURL_SEEKFUNC_CANTSEEK. All constants require libcurl 7.19.5+;
numeric values of CURL_SEEKFUNC_OK and CURL_SEEKFUNC_FAIL were
understood earlier but constants only exist as of libcurl 7.19.5.
* Added CURLINFO_CONDITION_UNMET (libcurl 7.19.4+).
* Added CURLPROXY_HTTP_1_0 (libcurl 7.19.4+).
* Added CURLOPT_SOCKS5_GSSAPI_SERVICE and
CURLOPT_SOCKS5_GSSAPI_NEC (libcurl 7.19.4+).
* Added CURLOPT_TFTP_BLKSIZE (libcurl 7.19.4+).
* Added CURLOPT_PROTOCOLS, CURLOPT_REDIR_PROTOCOLS and associated
CURLPROTO_* constants, which require libcurl 7.19.4+.
* Fixed a reference leak of OPENSOCKET and SEEK callbacks, thanks to
Ben Darnell.
* C source is now split into several files.
* Documentation is now processed by sphinx.
Version 7.19.3.1 [requires libcurl-7.19.0 or better] - 2014-02-05
-----------------------------------------------------------------
* 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).
Version 7.19.3 [requires libcurl-7.19.0 or better] - 2014-01-09
---------------------------------------------------------------
* 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.
* As part of Python 3 support, WRITEDATA option now accepts
any object with a write method on Python 2 and Python 3.
For non-file objects, c.setopt(c.WRITEDATA, buf) is equivalent to
c.setopt(c.WRITEFUNCTION, buf.write).
* 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
Version 7.19.0.3 [requires libcurl-7.19.0 or better] - 2013-12-24
-----------------------------------------------------------------
* Re-release of 7.19.0.2 with minor changes to build Windows packages
due to botched 7.19.0.2 files on PyPi.
https://curl.haxx.se/mail/curlpython-2013-12/0021.html
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.
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.
Version 7.19.0 [requires libcurl-7.19.0 or better]
--------------------------------------------------
* 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).
Version 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
derivative).
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.
Version 7.15.5.1
----------------
* Added test for basic ftp usage (tests/test_ftp.py).
* Fix broken ssl mutex lock function when using
GNU TLS (Debian bug #380156, fix by Bastian Kleineidam)
Version 7.15.5
--------------
* Added CURLOPT_FTP_ALTERNATIVE_TO_USER,
CURLOPT_MAX_SEND_SPEED_LARGE,
and CURLOPT_MAX_RECV_SPEED_LARGE.
Version 7.15.4.2
----------------
* Use SSL locking callbacks, fixes random
crashes for multithreaded SSL connections
(patch by Jayne <corvine at gmail.com>).
Version 7.15.4.1
----------------
* Fixed compilation problem with C compilers
not allowing declarations in the middle of
code blocks (patch by
K.S.Sreeram <sreeram at tachyontech.net>).
* Fixed bug in curl_multi_fdset wrapping,
max_fd < 0 is not an error (patch by
K.S.Sreeram <sreeram at tachyontech.net>).
Version 7.15.4
--------------
* Added support for libcurl shares, patch from
Victor Lascurain <bittor at eleka.net>. See the
file tests/test_share.py for example usage.
* Added support for CURLINFO_FTP_ENTRY_PATH.
Version 7.15.2
--------------
* Added CURLOPT_CONNECT_ONLY, CURLINFO_LASTSOCKET,
CURLOPT_LOCALPORT and CURLOPT_LOCALPORTRANGE.
Version 7.15.1
--------------
2006-01-31 Kjetil Jacobsen <kjetilja>
* Fixed memory leak for getinfo calls that return a
list as result. Patch by Paul Pacheco.
Version 7.15.0
--------------
2005-10-18 Kjetil Jacobsen <kjetilja>
* Added CURLOPT_FTP_SKIP_PASV_IP.
Version 7.14.1
--------------
2005-09-05 Kjetil Jacobsen <kjetilja>
* Added CURLOPT_IGNORE_CONTENT_LENGTH, CURLOPT_COOKIELIST as
COOKIELIST and CURLINFO_COOKIELIST as INFO_COOKIELIST.
Version 7.14.0
--------------
2005-05-18 Kjetil Jacobsen <kjetilja>
* Added missing information returned from the info() method
in the high-level interface.
* Added the FORM_FILENAME option to the CURLFORM API
with HTTPPOST.
Version 7.13.2
--------------
2005-03-30 Kjetil Jacobsen <kjetilja>
* Unbreak tests/test_gtk.py and require pygtk >= 2.0.
2005-03-15 Kjetil Jacobsen <kjetilja>
* Cleaned up several of the examples.
2005-03-11 Kjetil Jacobsen <kjetilja>
* WARNING: multi.select() now requires the previously optional
timeout parameter. Updated the tests and examples to reflect
this change. If the timeout is not set, select could block
infinitely and cause problems for the internal timeout handling
in the multi stack. The problem was identified by
<unknownsoldier93 at yahoo.com>.
Version 7.13.1
--------------
2005-03-04 Kjetil Jacobsen <kjetilja>
* Use METH_NOARGS where appropriate.
2005-03-03 Kjetil Jacobsen <kjetilja>
* Added support for CURLFORM API with HTTPPOST: Supports a
a tuple with pairs of options and values instead of just
supporting string contents. See tests/test_post2.py
for example usage. Options are FORM_CONTENTS, FORM_FILE and
FORM_CONTENTTYPE, corresponding to the CURLFORM_* options,
and values are strings.
2005-02-13 Markus F.X.J. Oberhumer <mfx>
* Read callbacks (pycurl.READFUNCTION) can now return
pycurl.READFUNC_ABORT to immediately abort the current transfer.
* The INFILESIZE, MAXFILESIZE, POSTFIELDSIZE and RESUME_FROM
options now automatically use the largefile version to handle
files > 2GB.
* Added missing pycurl.PORT constant.
Version 7.13.0
--------------
2005-02-10 Kjetil Jacobsen <kjetilja>
* Added file_upload.py to examples, shows how to upload
a file.
* Added CURLOPT_IOCTLFUNCTION/DATA.
* Added options from libcurl 7.13.0: FTP_ACCOUNT, SOURCE_URL,
SOURCE_QUOTE.
* Obsoleted options: SOURCE_HOST, SOURCE_PATH, SOURCE_PORT,
PASV_HOST.
Version 7.12.3
--------------
2004-12-22 Markus F.X.J. Oberhumer <mfx>
* Added CURLINFO_NUM_CONNECTS and CURLINFO_SSL_ENGINES.
* Added some other missing constants.
* Updated pycurl.version_info() to return a 12-tuple
instead of a 9-tuple.
Version 7.12.2
--------------
2004-10-15 Kjetil Jacobsen <kjetilja>
* Added CURLOPT_FTPSSLAUTH (and CURLFTPAUTH_*).
* Added CURLINFO_OS_ERRNO.
2004-08-17 Kjetil Jacobsen <kjetilja>
* Use LONG_LONG instead of PY_LONG_LONG to make pycurl compile
on Python versions < 2.3 (fix from Domenico Andreoli
<cavok at libero.it>).
Version 7.12.1
--------------
2004-08-02 Kjetil Jacobsen <kjetilja>
* Added INFOTYPE_SSL_DATA_IN/OUT.
2004-07-16 Markus F.X.J. Oberhumer <mfx>
* WARNING: removed deprecated PROXY_, TIMECOND_ and non-prefixed
INFOTYPE constant names. See ChangeLog entry 2003-06-10.
2004-06-21 Kjetil Jacobsen <kjetilja>
* Added test program for HTTP post using the read callback (see
tests/test_post3.py for details).
* Use the new CURL_READFUNC_ABORT return code where appropriate
to avoid hanging in perform() when read callbacks are used.
* Added support for libcurl 7.12.1 CURLOPT features:
SOURCE_HOST, SOURCE_USERPWD, SOURCE_PATH, SOURCE_PORT,
PASV_HOST, SOURCE_PREQUOTE, SOURCE_POSTQUOTE.
2004-06-08 Markus F.X.J. Oberhumer <mfx>
* Setting CURLOPT_POSTFIELDS now allows binary data and
automatically sets CURLOPT_POSTFIELDSIZE for you. If you really
want a different size you have to manually set POSTFIELDSIZE
after setting POSTFIELDS.
(Based on a patch by Martin Muenstermann).
2004-06-05 Markus F.X.J. Oberhumer <mfx>
* Added stricter checks within the callback handlers.
* Unify the behaviour of int and long parameters where appropriate.
Version 7.12
------------
2004-05-18 Kjetil Jacobsen <kjetilja>
* WARNING: To simplify code maintenance pycurl now requires
libcurl 7.11.2 and Python 2.2 or newer to work.
* GC support is now always enabled.
Version 7.11.3
--------------
2004-04-30 Kjetil Jacobsen <kjetilja>
* Do not use the deprecated curl_formparse function.
API CHANGE: HTTPPOST now takes a list of tuples where each
tuple contains a form name and a form value, both strings
(see test/test_post2.py for example usage).
* Found a possible reference count bug in the multithreading
code which may have contributed to the long-standing GC
segfault which has haunted pycurl. Fingers crossed.
Version 7.11.2
--------------
2004-04-21 Kjetil Jacobsen <kjetilja>
* Added support for libcurl 7.11.2 CURLOPT features:
CURLOPT_TCP_NODELAY.
2004-03-25 Kjetil Jacobsen <kjetilja>
* Store Python longs in off_t with PyLong_AsLongLong instead
of PyLong_AsLong. Should make the options which deal
with large files behave a little better. Note that this
requires the long long support in Python 2.2 or newer to
work properly.
Version 7.11.1
--------------
2004-03-16 Kjetil Jacobsen <kjetilja>
* WARNING: Removed support for the PASSWDFUNCTION callback, which
is no longer supported by libcurl.
2004-03-15 Kjetil Jacobsen <kjetilja>
* Added support for libcurl 7.11.1 CURLOPT features:
CURLOPT_POSTFIELDSIZE_LARGE.
Version 7.11.0
--------------
2004-02-11 Kjetil Jacobsen <kjetilja>
* Added support for libcurl 7.11.0 CURLOPT features:
INFILESIZE_LARGE, RESUME_FROM_LARGE, MAXFILESIZE_LARGE
and FTP_SSL.
* Circular garbage collection support can now be enabled or
disabled by passing the '--use-gc=[1|0]' parameter to setup.py
when building pycurl.
* HTTP_VERSION options are known as CURL_HTTP_VERSION_NONE,
CURL_HTTP_VERSION_1_0, CURL_HTTP_VERSION_1_1 and
CURL_HTTP_VERSION_LAST.
2003-11-16 Markus F.X.J. Oberhumer <mfx>
* Added support for these new libcurl 7.11.0 features:
CURLOPT_NETRC_FILE.
Version 7.10.8
--------------
2003-11-04 Markus F.X.J. Oberhumer <mfx>
* Added support for these new libcurl 7.10.8 features:
CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_IPRESOLVE,
CURLOPT_MAXFILESIZE,
CURLINFO_HTTPAUTH_AVAIL, CURLINFO_PROXYAUTH_AVAIL,
CURL_IPRESOLVE_* constants.
* Added support for these new libcurl 7.10.7 features:
CURLOPT_FTP_CREATE_MISSING_DIRS, CURLOPT_PROXYAUTH,
CURLINFO_HTTP_CONNECTCODE.
2003-10-28 Kjetil Jacobsen <kjetilja>
* Added missing CURLOPT_ENCODING option (patch by Martijn
Boerwinkel <xim at xs4all.nl>)
Version 7.10.6
--------------
2003-07-29 Markus F.X.J. Oberhumer <mfx>
* Started working on support for CURLOPT_SSL_CTX_FUNCTION and
CURLOPT_SSL_CTX_DATA (libcurl-7.10.6) - not yet finished.
2003-06-10 Markus F.X.J. Oberhumer <mfx>
* Added support for CURLOPT_HTTPAUTH (libcurl-7.10.6), including
the new HTTPAUTH_BASIC, HTTPAUTH_DIGEST, HTTPAUTH_GSSNEGOTIATE
and HTTPAUTH_NTML constants.
* Some constants were renamed for consistency:
All curl_infotype constants are now prefixed with "INFOTYPE_",
all curl_proxytype constants are prefixed with "PROXYTYPE_" instead
of "PROXY_", and all curl_TimeCond constants are now prefixed
with "TIMECONDITION_" instead of "TIMECOND_".
(The old names are still available but will get removed
in a future release.)
* WARNING: Removed the deprecated pycurl.init() and pycurl.multi_init()
names - use pycurl.Curl() and pycurl.CurlMulti() instead.
* WARNING: Removed the deprecated Curl.cleanup() and
CurlMulti.cleanup() methods - use Curl.close() and
CurlMulti.close() instead.
Version 7.10.5
--------------
2003-05-15 Markus F.X.J. Oberhumer <mfx>
* Added support for CURLOPT_FTP_USE_EPRT (libcurl-7.10.5).
* Documentation updates.
2003-05-07 Eric S. Raymond <esr>
* Lifted all HTML docs to clean XHTML, verified by tidy.
2003-05-02 Markus F.X.J. Oberhumer <mfx>
* Fixed some `int' vs. `long' mismatches that affected 64-bit systems.
* Fixed wrong pycurl.CAPATH constant.
2003-05-01 Markus F.X.J. Oberhumer <mfx>
* Added new method Curl.errstr() which returns the internal
libcurl error buffer string of the handle.
Version 7.10.4.2
----------------
2003-04-15 Markus F.X.J. Oberhumer <mfx>
* Allow compilation against the libcurl-7.10.3 release - some
recent Linux distributions (e.g. Mandrake 9.1) ship with 7.10.3,
and apart from the new CURLOPT_UNRESTRICTED_AUTH option there is
no need that we require libcurl-7.10.4.
Version 7.10.4
--------------
2003-04-01 Kjetil Jacobsen <kjetilja>
* Markus added CURLOPT_UNRESTRICTED_AUTH (libcurl-7.10.4).
2003-02-25 Kjetil Jacobsen <kjetilja>
* Fixed some broken test code and removed the fileupload test
since it didn't work properly.
2003-01-28 Kjetil Jacobsen <kjetilja>
* Some documentation updates by Markus and me.
2003-01-22 Kjetil Jacobsen <kjetilja>
* API CHANGE: the CurlMulti.info_read() method now returns
a separate array with handles that failed. Each entry in this array
is a tuple with (curl object, error number, error message).
This addition makes it simpler to do error checking of individual
curl objects when using the multi interface.
Version 7.10.3
--------------
2003-01-13 Kjetil Jacobsen <kjetilja>
* PycURL memory usage has been reduced.
2003-01-10 Kjetil Jacobsen <kjetilja>
* Added 'examples/retriever-multi.py' which shows how to retrieve
a set of URLs concurrently using the multi interface.
2003-01-09 Kjetil Jacobsen <kjetilja>
* Added support for CURLOPT_HTTP200ALIASES.
2002-11-22 Kjetil Jacobsen <kjetilja>
* Updated pycurl documentation in the 'doc' directory.
2002-11-21 Kjetil Jacobsen <kjetilja>
* Updated and improved 'examples/curl.py'.
* Added 'tests/test_multi6.py' which shows how to use the
info_read method with CurlMulti.
2002-11-19 Kjetil Jacobsen <kjetilja>
* Added new method CurlMulti.info_read().
Version 7.10.2
--------------
2002-11-14 Kjetil Jacobsen <kjetilja>
* Free options set with setopt after cleanup is called, as cleanup
assumes that options are still valid when invoked. This fixes the
bug with COOKIEJAR reported by Bastiaan Naber
<bastiaan at ricardis.tudelft.nl>.
2002-11-06 Markus F.X.J. Oberhumer <mfx>
* Install documentation under /usr/share/doc instead of /usr/doc.
Also, start shipping the (unfinished) HTML docs and some
basic test scripts.
2002-10-30 Markus F.X.J. Oberhumer <mfx>
* API CHANGE: For integral values, Curl.getinfo() now returns a
Python-int instead of a Python-long.
Version 7.10.1
--------------
2002-10-03 Markus F.X.J. Oberhumer <mfx>
* Added new module-level function version_info() from
libcurl-7.10.
Version 7.10
------------
2002-09-13 Kjetil Jacobsen <kjetilja>
* Added commandline options to setup.py for specifying the path to
'curl-config' (non-windows) and the curl installation directory
(windows). See the 'INSTALL' file for details.
* Added CURLOPT_ENCODING, CURLOPT_NOSIGNAL and CURLOPT_BUFFERSIZE
from libcurl-7.10 (by Markus Oberhumer).
Version 7.9.8.4
---------------
2002-08-28 Kjetil Jacobsen <kjetilja>
* Added a simple web-browser example based on gtkhtml and pycurl.
See the file 'examples/gtkhtml_demo.py' for details. The example
requires a working installation of gnome-python with gtkhtml
bindings enabled (pass --with-gtkhtml to gnome-python configure).
2002-08-14 Kjetil Jacobsen <kjetilja>
* Added new method 'select' on CurlMulti objects. Example usage
in 'tests/test_multi5.py'. This method is just an optimization of
the combined use of fdset and select.
2002-08-12 Kjetil Jacobsen <kjetilja>
* Added support for curl_multi_fdset. See the file
'tests/test_multi4.py' for example usage. Contributed by Conrad
Steenberg <conrad at hep.caltech.edu>.
* perform() on multi objects now returns a tuple (result, number
of handles) like the libcurl interface does.
2002-08-08 Kjetil Jacobsen <kjetilja>
* Added the 'sfquery' script which retrieves a SourceForge XML
export object for a given project. See the file 'examples/sfquery.py'
for details and usage. 'sfquery' was contributed by Eric
S. Raymond <esr at thyrsus.com>.
2002-07-20 Markus F.X.J. Oberhumer <mfx>
* API enhancements: added Curl() and CurlMulti() as aliases for
init() and multi_init(), and added close() methods as aliases
for the cleanup() methods. The new names much better match
the actual intended use of the objects, and they also nicely
correspond to Python's file object.
* Also, all constants for Curl.setopt() and Curl.getinfo() are now
visible from within Curl objects.
All changes are fully backward-compatible.
Version 7.9.8.3
---------------
2002-07-16 Markus F.X.J. Oberhumer <mfx>
* Under Python 2.2 or better, Curl and CurlMulti objects now
automatically participate in cyclic garbage collection
(using the gc module).
Version 7.9.8.2
---------------
2002-07-05 Markus F.X.J. Oberhumer <mfx>
* Curl and CurlMulti objects now support standard Python attributes.
See tests/test_multi2.py for an example.
2002-07-02 Kjetil Jacobsen <kjetilja>
* Added support for the multi-interface.
Version 7.9.8.1
---------------
2002-06-25 Markus F.X.J. Oberhumer <mfx>
* Fixed a couple of `int' vs. `size_t' mismatches in callbacks
and Py_BuildValue() calls.
2002-06-25 Kjetil Jacobsen <kjetilja>
* Use 'double' type instead of 'size_t' for progress callbacks
(by Conrad Steenberg <conrad at hep.caltech.edu>). Also cleaned up
some other type mismatches in the callback interfaces.
2002-06-24 Kjetil Jacobsen <kjetilja>
* Added example code on how to upload a file using HTTPPOST in
pycurl (code by Amit Mongia <amit_mongia at hotmail.com>). See the
file 'test_fileupload.py' for details.
Version 7.9.8
-------------
2002-06-24 Kjetil Jacobsen <kjetilja>
* Resolved some build problems on Windows (by Markus Oberhumer).
2002-06-19 Kjetil Jacobsen <kjetilja>
* Added CURLOPT_CAPATH.
* Added option constants for CURLOPT_NETRC: CURL_NETRC_OPTIONAL,
CURL_NETRC_IGNORED and CURL_NETRC_REQUIRED.
* Added option constants for CURLOPT_TIMECONDITION:
TIMECOND_IFMODSINCE and TIMECOND_IFUNMODSINCE.
* Added an simple example crawler, which downloads documents
listed in a file with a configurable number of worker threads.
See the file 'crawler.py' in the 'tests' directory for details.
* Removed the redundant 'test_xmlrpc2.py' test script.
* Disallow recursive callback invocations (by Markus Oberhumer).
2002-06-18 Kjetil Jacobsen <kjetilja>
* Made some changes to setup.py which should fix the build
problems on RedHat 7.3 (suggested by Benji <benji at kioza.net>).
* Use CURLOPT_READDATA instead of CURLOPT_INFILE, and
CURLOPT_WRITEDATA instead of CURLOPT_FILE. Also fixed some
reference counting bugs with file objects.
* CURLOPT_FILETIME and CURLINFO_FILETIME had a namespace clash
which caused them not to work. Use OPT_FILETIME for setopt() and
INFO_FILETIME for getinfo(). See example usage in
'test_getinfo.py' for details.
Version 7.9.7
-------------
2002-05-20 Kjetil Jacobsen <kjetilja>
* New versioning scheme. Pycurl now has the same version number
as the libcurl version it was built with. The pycurl version
number thus indicates which version of libcurl is required to run.
2002-05-17 Kjetil Jacobsen <kjetilja>
* Added CURLINFO_REDIRECT_TIME and CURLINFO_REDIRECT_COUNT.
2002-04-27 Kjetil Jacobsen <kjetilja>
* Fixed potential memory leak and thread race (by Markus
Oberhumer).
Version 0.4.9
-------------
2002-04-15 Kjetil Jacobsen <kjetilja>
* Added CURLOPT_DEBUGFUNCTION to allow debug callbacks to be
specified (see the file 'test_debug.py' for details on how to use
debug callbacks).
* Added CURLOPT_DNS_USE_GLOBAL_CACHE and
CURLOPT_DNS_CACHE_TIMEOUT.
* Fixed a segfault when finalizing curl objects in Python 1.5.2.
* Now requires libcurl 7.9.6 or greater.
2002-04-12 Kjetil Jacobsen <kjetilja>
* Added 'test_post2.py' file which is another example on how to
issue POST requests.
2002-04-11 Markus F.X.J. Oberhumer <mfx>
* Added the 'test_post.py' file which demonstrates the use of
POST requests.
Version 0.4.8
-------------
2002-03-07 Kjetil Jacobsen <kjetilja>
* Added CURLOPT_PREQUOTE.
* Now requires libcurl 7.9.5 or greater.
* Other minor code cleanups and bugfixes.
2002-03-05 Kjetil Jacobsen <kjetilja>
* Do not allow WRITEFUNCTION and WRITEHEADER on the same handle.
Version 0.4.7
-------------
2002-02-27 Kjetil Jacobsen <kjetilja>
* Abort callback if the thread state of the calling thread cannot
be determined.
* Check that the installed version of libcurl matches the
requirements of pycurl.
2002-02-26 Kjetil Jacobsen <kjetilja>
* Clarence Garnder <clarence at silcom.com> found a bug where string
arguments to setopt sometimes were prematurely deallocated, this
should now be fixed.
2002-02-21 Kjetil Jacobsen <kjetilja>
* Added the 'xmlrpc_curl.py' file which implements a transport
for xmlrpclib (xmlrpclib is part of Python 2.2).
* Added CURLINFO_CONTENT_TYPE.
* Added CURLOPT_SSLCERTTYPE, CURLOPT_SSLKEY, CURLOPT_SSLKEYTYPE,
CURLOPT_SSLKEYPASSWD, CURLOPT_SSLENGINE and
CURLOPT_SSLENGINE_DEFAULT.
* When thrown, the pycurl.error exception is now a tuple consisting
of the curl error code and the error message.
* Now requires libcurl 7.9.4 or greater.
2002-02-19 Kjetil Jacobsen <kjetilja>
* Fixed docstring for getopt() function.
2001-12-18 Kjetil Jacobsen <kjetilja>
* Updated the INSTALL information for Win32.
2001-12-12 Kjetil Jacobsen <kjetilja>
* Added missing link flag to make pycurl build on MacOS X (by Matt
King <matt at gnik.com>).
2001-12-06 Kjetil Jacobsen <kjetilja>
* Added CURLINFO_STARTTRANSFER_TIME and CURLOPT_FTP_USE_EPSV from
libcurl 7.9.2.
2001-12-01 Markus F.X.J. Oberhumer <mfx>
* Added the 'test_stringio.py' file which demonstrates the use of
StringIO objects as callback.
2001-12-01 Markus F.X.J. Oberhumer <mfx>
* setup.py: Do not remove entries from a list while iterating
over it.
2001-11-29 Kjetil Jacobsen <kjetilja>
* Added code in setup.py to install on Windows. Requires some
manual configuration (by Tino Lange <Tino.Lange at gmx.de>).
2001-11-27 Kjetil Jacobsen <kjetilja>
* Improved detection of where libcurl is installed in setup.py.
Should make it easier to install pycurl when libcurl is not
located in regular lib/include paths.
2001-11-05 Kjetil Jacobsen <kjetilja>
* Some of the newer options to setopt were missing, this should
now be fixed.
2001-11-04 Kjetil Jacobsen <kjetilja>
* Exception handling has been improved and should no longer throw
spurious exceptions (by Markus F.X.J. Oberhumer
<markus at oberhumer.com>).
2001-10-15 Kjetil Jacobsen <kjetilja>
* Refactored the test_gtk.py script to avoid global variables.
2001-10-12 Kjetil Jacobsen <kjetilja>
* Added module docstrings, terse perhaps, but better than nothing.
* Added the 'basicfirst.py' file which is a Python version of the
corresponding Perl script by Daniel.
* PycURL now works properly under Python 1.5 and 1.6 (by Markus
F.X.J. Oberhumer <markus at oberhumer.com>).
* Allow C-functions and Python methods as callbacks (by Markus
F.X.J. Oberhumer <markus at oberhumer.com>).
* Allow None as success result of write, header and progress
callback invocations (by Markus F.X.J. Oberhumer
<markus at oberhumer.com>).
* Added the 'basicfirst2.py' file which demonstrates the use of a
class method as callback instead of just a function.
2001-08-21 Kjetil Jacobsen <kjetilja>
* Cleaned up the script with GNOME/PycURL integration.
2001-08-20 Kjetil Jacobsen <kjetilja>
* Added another test script for shipping XML-RPC requests which
uses py-xmlrpc to encode the arguments (tests/test_xmlrpc2.py).
2001-08-20 Kjetil Jacobsen <kjetilja>
* Added test script for using PycURL and GNOME (tests/test_gtk.py).
2001-08-20 Kjetil Jacobsen <kjetilja>
* Added test script for using XML-RPC (tests/test_xmlrpc.py).
* Added more comments to the test sources.
2001-08-06 Kjetil Jacobsen <kjetilja>
* Renamed module namespace to pycurl instead of curl.
2001-08-06 Kjetil Jacobsen <kjetilja>
* Set CURLOPT_VERBOSE to 0 by default.
2001-06-29 Kjetil Jacobsen <kjetilja>
* Updated INSTALL, curl version 7.8 or greater is now mandatory to
use pycurl.
2001-06-13 Kjetil Jacobsen <kjetilja>
* Set NOPROGRESS to 1 by default.
2001-06-07 Kjetil Jacobsen <kjetilja>
* Added global_init/cleanup.
2001-06-06 Kjetil Jacobsen <kjetilja>
* Added HEADER/PROGRESSFUNCTION callbacks (see files in tests/).
* Added PASSWDFUNCTION callback (untested).
* Added READFUNCTION callback (untested).
2001-06-05 Kjetil Jacobsen <kjetilja>
* WRITEFUNCTION callbacks now work (see tests/test_cb.py for details).
* Preliminary distutils installation.
* Added CLOSEPOLICY constants to module namespace.
2001-06-04 Kjetil Jacobsen <kjetilja>
* Return -1 on error from Python callback in WRITEFUNCTION callback.
2001-06-01 Kjetil Jacobsen <kjetilja>
* Moved source to src and tests to tests directory.
2001-05-31 Kjetil Jacobsen <kjetilja>
* Added better type checking for setopt.
2001-05-30 Kjetil Jacobsen <kjetilja>
* Moved code to sourceforge.
* Added getinfo support.
# vi:ts=8:et
doc/pycurl/COPYING-LGPL 0000644 00000063642 15033535204 0010431 0 ustar 00 GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
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.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
doc/pycurl/examples/linksys.py 0000644 00000052413 15033535204 0012520 0 ustar 00 #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et
#
# linksys.py -- program settings on a Linkys router
#
# This tool is designed to help you recover from the occasional episodes
# of catatonia that afflict Linksys boxes. It allows you to batch-program
# them rather than manually entering values to the Web interface. Commands
# are taken from the command line first, then standard input.
#
# The somewhat spotty coverage of status queries is because I only did the
# ones that were either (a) easy, or (b) necessary. If you want to know the
# status of the box, look at the web interface.
#
# This code has been tested against the following hardware:
#
# Hardware Firmware
# ---------- ---------------------
# BEFW11S4v2 1.44.2.1, Dec 20 2002
#
# The code is, of course, sensitive to changes in the names of CGI pages
# and field names.
#
# Note: to make the no-arguments form work, you'll need to have the following
# entry in your ~/.netrc file. If you have changed the router IP address or
# name/password, modify accordingly.
#
# machine 192.168.1.1
# login ""
# password admin
#
# By Eric S. Raymond, August April 2003. All rites reversed.
import sys, re, curl, exceptions
def print_stderr(arg):
sys.stderr.write(arg)
sys.stderr.write("\n")
class LinksysError(exceptions.Exception):
def __init__(self, *args):
self.args = args
class LinksysSession:
months = 'Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec'
WAN_CONNECT_AUTO = '1'
WAN_CONNECT_STATIC = '2'
WAN_CONNECT_PPOE = '3'
WAN_CONNECT_RAS = '4'
WAN_CONNECT_PPTP = '5'
WAN_CONNECT_HEARTBEAT = '6'
# Substrings to check for on each page load.
# This may enable us to detect when a firmware change has hosed us.
check_strings = {
"": "basic setup functions",
"Passwd.htm": "For security reasons,",
"DHCP.html": "You can configure the router to act as a DHCP",
"Log.html": "There are some log settings and lists in this page.",
"Forward.htm":"Port forwarding can be used to set up public services",
}
def __init__(self):
self.actions = []
self.host = "http://192.168.1.1"
self.verbosity = False
self.pagecache = {}
def set_verbosity(self, flag):
self.verbosity = flag
# This is not a performance hack -- we need the page cache to do
# sanity checks at configure time.
def cache_load(self, page):
if page not in self.pagecache:
fetch = curl.Curl(self.host)
fetch.set_verbosity(self.verbosity)
fetch.get(page)
self.pagecache[page] = fetch.body()
if fetch.answered("401"):
raise LinksysError("authorization failure.", True)
elif not fetch.answered(LinksysSession.check_strings[page]):
del self.pagecache[page]
raise LinksysError("check string for page %s missing!" % os.path.join(self.host, page), False)
fetch.close()
def cache_flush(self):
self.pagecache = {}
# Primitives
def screen_scrape(self, page, template):
self.cache_load(page)
match = re.compile(template).search(self.pagecache[page])
if match:
result = match.group(1)
else:
result = None
return result
def get_MAC_address(self, page, prefix):
return self.screen_scrape("", prefix+r":[^M]*\(MAC Address: *([^)]*)")
def set_flag(self, page, flag, value):
if value:
self.actions.append(page, flag, "1")
else:
self.actions.append(page, flag, "0")
def set_IP_address(self, page, cgi, role, ip):
ind = 0
for octet in ip.split("."):
self.actions.append(("", "F1", role + repr(ind+1), octet))
ind += 1
# Scrape configuration data off the main page
def get_firmware_version(self):
# This is fragile. There is no distinguishing tag before the firmware
# version, so we have to key off the pattern of the version number.
# Our model is ">1.44.2.1, Dec 20 2002<"
return self.screen_scrape("", ">([0-9.v]*, (" + \
LinksysSession.months + ")[^<]*)<", )
def get_LAN_MAC(self):
return self.get_MAC_address("", r"LAN IP Address")
def get_Wireless_MAC(self):
return self.get_MAC_address("", r"Wireless")
def get_WAN_MAC(self):
return self.get_MAC_address("", r"WAN Connection Type")
# Set configuration data on the main page
def set_host_name(self, name):
self.actions.append(("", "hostName", name))
def set_domain_name(self, name):
self.actions.append(("", "DomainName", name))
def set_LAN_IP(self, ip):
self.set_IP_address("", "ipAddr", ip)
def set_LAN_netmask(self, ip):
if not ip.startswith("255.255.255."):
raise ValueError
lastquad = ip.split(".")[-1]
if lastquad not in ("0", "128", "192", "240", "252"):
raise ValueError
self.actions.append("", "netMask", lastquad)
def set_wireless(self, flag):
self.set_flag("", "wirelessStatus")
def set_SSID(self, ssid):
self.actions.append(("", "wirelessESSID", ssid))
def set_SSID_broadcast(self, flag):
self.set_flag("", "broadcastSSID")
def set_channel(self, channel):
self.actions.append(("", "wirelessChannel", channel))
def set_WEP(self, flag):
self.set_flag("", "WepType")
# FIXME: Add support for setting WEP keys
def set_connection_type(self, type):
self.actions.append(("", "WANConnectionType", type))
def set_WAN_IP(self, ip):
self.set_IP_address("", "aliasIP", ip)
def set_WAN_netmask(self, ip):
self.set_IP_address("", "aliasMaskIP", ip)
def set_WAN_gateway_address(self, ip):
self.set_IP_address("", "routerIP", ip)
def set_DNS_server(self, index, ip):
self.set_IP_address("", "dns" + "ABC"[index], ip)
# Set configuration data on the password page
def set_password(self, str):
self.actions.append("Passwd.htm","sysPasswd", str)
self.actions.append("Passwd.htm","sysPasswdConfirm", str)
def set_UPnP(self, flag):
self.set_flag("Passwd.htm", "UPnP_Work")
def reset(self):
self.actions.append("Passwd.htm", "FactoryDefaults")
# DHCP features
def set_DHCP(self, flag):
if flag:
self.actions.append("DHCP.htm","dhcpStatus","Enable")
else:
self.actions.append("DHCP.htm","dhcpStatus","Disable")
def set_DHCP_starting_IP(self, val):
self.actions.append("DHCP.htm","dhcpS4", str(val))
def set_DHCP_users(self, val):
self.actions.append("DHCP.htm","dhcpLen", str(val))
def set_DHCP_lease_time(self, val):
self.actions.append("DHCP.htm","leaseTime", str(val))
def set_DHCP_DNS_server(self, index, ip):
self.set_IP_address("DHCP.htm", "dns" + "ABC"[index], ip)
# FIXME: add support for setting WINS key
# Logging features
def set_logging(self, flag):
if flag:
self.actions.append("Log.htm", "rLog", "Enable")
else:
self.actions.append("Log.htm", "rLog", "Disable")
def set_log_address(self, val):
self.actions.append("DHCP.htm","trapAddr3", str(val))
# The AOL parental control flag is not supported by design.
# FIXME: add Filters and other advanced features
def configure(self):
"Write configuration changes to the Linksys."
if self.actions:
fields = []
self.cache_flush()
for (page, field, value) in self.actions:
self.cache_load(page)
if self.pagecache[page].find(field) == -1:
print_stderr("linksys: field %s not found where expected in page %s!" % (field, os.path.join(self.host, page)))
continue
else:
fields.append((field, value))
# Clearing the action list before fieldsping is deliberate.
# Otherwise we could get permanently wedged by a 401.
self.actions = []
transaction = curl.Curl(self.host)
transaction.set_verbosity(self.verbosity)
transaction.get("Gozila.cgi", tuple(fields))
transaction.close()
if __name__ == "__main__":
import os, cmd
class LinksysInterpreter(cmd.Cmd):
"""Interpret commands to perform LinkSys programming actions."""
def __init__(self):
cmd.Cmd.__init__(self)
self.session = LinksysSession()
if os.isatty(0):
print("Type ? or `help' for help.")
self.prompt = self.session.host + ": "
else:
self.prompt = ""
print("Bar1")
def flag_command(self, func, line):
if line.strip() in ("on", "enable", "yes"):
func(True)
elif line.strip() in ("off", "disable", "no"):
func(False)
else:
print_stderr("linksys: unknown switch value")
return 0
def do_connect(self, line):
newhost = line.strip()
if newhost:
self.session.host = newhost
self.session.cache_flush()
self.prompt = self.session.host + ": "
else:
print(self.session.host)
return 0
def help_connect(self):
print("Usage: connect [<hostname-or-IP>]")
print("Connect to a Linksys by name or IP address.")
print("If no argument is given, print the current host.")
def do_status(self, line):
self.session.cache_load("")
if "" in self.session.pagecache:
print("Firmware:", self.session.get_firmware_version())
print("LAN MAC:", self.session.get_LAN_MAC())
print("Wireless MAC:", self.session.get_Wireless_MAC())
print("WAN MAC:", self.session.get_WAN_MAC())
print(".")
return 0
def help_status(self):
print("Usage: status")
print("The status command shows the status of the Linksys.")
print("It is mainly useful as a sanity check to make sure")
print("the box is responding correctly.")
def do_verbose(self, line):
self.flag_command(self.session.set_verbosity, line)
def help_verbose(self):
print("Usage: verbose {on|off|enable|disable|yes|no}")
print("Enables display of HTTP requests.")
def do_host(self, line):
self.session.set_host_name(line)
return 0
def help_host(self):
print("Usage: host <hostname>")
print("Sets the Host field to be queried by the ISP.")
def do_domain(self, line):
print("Usage: host <domainname>")
self.session.set_domain_name(line)
return 0
def help_domain(self):
print("Sets the Domain field to be queried by the ISP.")
def do_lan_address(self, line):
self.session.set_LAN_IP(line)
return 0
def help_lan_address(self):
print("Usage: lan_address <ip-address>")
print("Sets the LAN IP address.")
def do_lan_netmask(self, line):
self.session.set_LAN_netmask(line)
return 0
def help_lan_netmask(self):
print("Usage: lan_netmask <ip-mask>")
print("Sets the LAN subnetwork mask.")
def do_wireless(self, line):
self.flag_command(self.session.set_wireless, line)
return 0
def help_wireless(self):
print("Usage: wireless {on|off|enable|disable|yes|no}")
print("Switch to enable or disable wireless features.")
def do_ssid(self, line):
self.session.set_SSID(line)
return 0
def help_ssid(self):
print("Usage: ssid <string>")
print("Sets the SSID used to control wireless access.")
def do_ssid_broadcast(self, line):
self.flag_command(self.session.set_SSID_broadcast, line)
return 0
def help_ssid_broadcast(self):
print("Usage: ssid_broadcast {on|off|enable|disable|yes|no}")
print("Switch to enable or disable SSID broadcast.")
def do_channel(self, line):
self.session.set_channel(line)
return 0
def help_channel(self):
print("Usage: channel <number>")
print("Sets the wireless channel.")
def do_wep(self, line):
self.flag_command(self.session.set_WEP, line)
return 0
def help_wep(self):
print("Usage: wep {on|off|enable|disable|yes|no}")
print("Switch to enable or disable WEP security.")
def do_wan_type(self, line):
try:
type=eval("LinksysSession.WAN_CONNECT_"+line.strip().upper())
self.session.set_connection_type(type)
except ValueError:
print_stderr("linksys: unknown connection type.")
return 0
def help_wan_type(self):
print("Usage: wan_type {auto|static|ppoe|ras|pptp|heartbeat}")
print("Set the WAN connection type.")
def do_wan_address(self, line):
self.session.set_WAN_IP(line)
return 0
def help_wan_address(self):
print("Usage: wan_address <ip-address>")
print("Sets the WAN IP address.")
def do_wan_netmask(self, line):
self.session.set_WAN_netmask(line)
return 0
def help_wan_netmask(self):
print("Usage: wan_netmask <ip-mask>")
print("Sets the WAN subnetwork mask.")
def do_wan_gateway(self, line):
self.session.set_WAN_gateway(line)
return 0
def help_wan_gateway(self):
print("Usage: wan_gateway <ip-address>")
print("Sets the LAN subnetwork mask.")
def do_dns(self, line):
(index, address) = line.split()
if index in ("1", "2", "3"):
self.session.set_DNS_server(eval(index), address)
else:
print_stderr("linksys: server index out of bounds.")
return 0
def help_dns(self):
print("Usage: dns {1|2|3} <ip-mask>")
print("Sets a primary, secondary, or tertiary DNS server address.")
def do_password(self, line):
self.session.set_password(line)
return 0
def help_password(self):
print("Usage: password <string>")
print("Sets the router password.")
def do_upnp(self, line):
self.flag_command(self.session.set_UPnP, line)
return 0
def help_upnp(self):
print("Usage: upnp {on|off|enable|disable|yes|no}")
print("Switch to enable or disable Universal Plug and Play.")
def do_reset(self, line):
self.session.reset()
def help_reset(self):
print("Usage: reset")
print("Reset Linksys settings to factory defaults.")
def do_dhcp(self, line):
self.flag_command(self.session.set_DHCP, line)
def help_dhcp(self):
print("Usage: dhcp {on|off|enable|disable|yes|no}")
print("Switch to enable or disable DHCP features.")
def do_dhcp_start(self, line):
self.session.set_DHCP_starting_IP(line)
def help_dhcp_start(self):
print("Usage: dhcp_start <number>")
print("Set the start address of the DHCP pool.")
def do_dhcp_users(self, line):
self.session.set_DHCP_users(line)
def help_dhcp_users(self):
print("Usage: dhcp_users <number>")
print("Set number of address slots to allocate in the DHCP pool.")
def do_dhcp_lease(self, line):
self.session.set_DHCP_lease(line)
def help_dhcp_lease(self):
print("Usage: dhcp_lease <number>")
print("Set number of address slots to allocate in the DHCP pool.")
def do_dhcp_dns(self, line):
(index, address) = line.split()
if index in ("1", "2", "3"):
self.session.set_DHCP_DNS_server(eval(index), address)
else:
print_stderr("linksys: server index out of bounds.")
return 0
def help_dhcp_dns(self):
print("Usage: dhcp_dns {1|2|3} <ip-mask>")
print("Sets primary, secondary, or tertiary DNS server address.")
def do_logging(self, line):
self.flag_command(self.session.set_logging, line)
def help_logging(self):
print("Usage: logging {on|off|enable|disable|yes|no}")
print("Switch to enable or disable session logging.")
def do_log_address(self, line):
self.session.set_Log_address(line)
def help_log_address(self):
print("Usage: log_address <number>")
print("Set the last quad of the address to which to log.")
def do_configure(self, line):
self.session.configure()
return 0
def help_configure(self):
print("Usage: configure")
print("Writes the configuration to the Linksys.")
def do_cache(self, line):
print(self.session.pagecache)
def help_cache(self):
print("Usage: cache")
print("Display the page cache.")
def do_quit(self, line):
return 1
def help_quit(self, line):
print("The quit command ends your linksys session without")
print("writing configuration changes to the Linksys.")
def do_EOF(self, line):
print("")
self.session.configure()
return 1
def help_EOF(self):
print("The EOF command writes the configuration to the linksys")
print("and ends your session.")
def default(self, line):
"""Pass the command through to be executed by the shell."""
os.system(line)
return 0
def help_help(self):
print("On-line help is available through this command.")
print("? is a convenience alias for help.")
def help_introduction(self):
print("""\
This program supports changing the settings on Linksys blue-box routers. This
capability may come in handy when they freeze up and have to be reset. Though
it can be used interactively (and will command-prompt when standard input is a
terminal) it is really designed to be used in batch mode. Commands are taken
from the command line first, then standard input.
By default, it is assumed that the Linksys is at http://192.168.1.1, the
default LAN address. You can connect to a different address or IP with the
'connect' command. Note that your .netrc must contain correct user/password
credentials for the router. The entry corresponding to the defaults is:
machine 192.168.1.1
login ""
password admin
Most commands queue up changes but don't actually send them to the Linksys.
You can force pending changes to be written with 'configure'. Otherwise, they
will be shipped to the Linksys at the end of session (e.g. when the program
running in batch mode encounters end-of-file or you type a control-D). If you
end the session with `quit', pending changes will be discarded.
For more help, read the topics 'wan', 'lan', and 'wireless'.""")
def help_lan(self):
print("""\
The `lan_address' and `lan_netmask' commands let you set the IP location of
the Linksys on your LAN, or inside. Normally you'll want to leave these
untouched.""")
def help_wan(self):
print("""\
The WAN commands become significant if you are using the BEFSR41 or any of
the other Linksys boxes designed as DSL or cable-modem gateways. You will
need to use `wan_type' to declare how you expect to get your address.
If your ISP has issued you a static address, you'll need to use the
`wan_address', `wan_netmask', and `wan_gateway' commands to set the address
of the router as seen from the WAN, the outside. In this case you will also
need to use the `dns' command to declare which remote servers your DNS
requests should be forwarded to.
Some ISPs may require you to set host and domain for use with dynamic-address
allocation.""")
def help_wireless_desc(self):
print("""\
The channel, ssid, ssid_broadcast, wep, and wireless commands control
wireless routing.""")
def help_switches(self):
print("Switches may be turned on with 'on', 'enable', or 'yes'.")
print("Switches may be turned off with 'off', 'disable', or 'no'.")
print("Switch commands include: wireless, ssid_broadcast.")
def help_addresses(self):
print("An address argument must be a valid IP address;")
print("four decimal numbers separated by dots, each ")
print("between 0 and 255.")
def emptyline(self):
pass
interpreter = LinksysInterpreter()
for arg in sys.argv[1:]:
interpreter.onecmd(arg)
fatal = False
while not fatal:
try:
interpreter.cmdloop()
fatal = True
except LinksysError:
message, fatal = sys.exc_info()[1].args
print("linksys: " + message)
# The following sets edit modes for GNU EMACS
# Local Variables:
# mode:python
# End:
doc/pycurl/examples/__pycache__/retriever-multi.cpython-312.pyc 0000644 00000011031 15033535204 0020513 0 ustar 00 �
Б�g
� � � d dl Z d dlZ d dlZd dlmZmZ ej ee� dZ e j d dk( re j j � Z
n# ee j d � j � Z
ee j � dk\ r e
e j d � Zg Ze
D ]>