diff options
author | Georg Brandl <georg@python.org> | 2008-06-10 17:40:04 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-06-10 17:40:04 (GMT) |
commit | f78e02b79862ac555fe052240bda55fa770a2d6f (patch) | |
tree | 885defd9b02e7865a9475b1d18b9c91a1fb8e93a /Doc/library | |
parent | 4066186c8934d66ac1ac795c7380a68468ad157a (diff) | |
download | cpython-f78e02b79862ac555fe052240bda55fa770a2d6f.zip cpython-f78e02b79862ac555fe052240bda55fa770a2d6f.tar.gz cpython-f78e02b79862ac555fe052240bda55fa770a2d6f.tar.bz2 |
Merged revisions 63562,63570,63728,63734,63784,63788,63802,63817,63827,63839,63887,63975,63998 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r63562 | martin.v.loewis | 2008-05-23 17:06:50 +0200 (Fri, 23 May 2008) | 2 lines
Patch #1722225: Support QNX 6.
........
r63570 | trent.nelson | 2008-05-23 22:33:14 +0200 (Fri, 23 May 2008) | 1 line
Introduce a user macro named $(externalsDir), which should point to the root directory of where all the external sources should live. Developers can change this value if their external sources live elsewhere. The default of '..\..' matches the current status quo.
........
r63728 | gregory.p.smith | 2008-05-26 23:16:34 +0200 (Mon, 26 May 2008) | 4 lines
Fix issue2589: there was a potential integer overflow leading to
memory corruption on esoteric platforms and incorrect behavior on
normal platforms.
........
r63734 | gregory.p.smith | 2008-05-27 00:07:28 +0200 (Tue, 27 May 2008) | 3 lines
Fix issue2588: Do not execute str[size-1] = '\0' when a 0 size is
passed in. (The assert won't prevent this in non-debug builds).
........
r63784 | raymond.hettinger | 2008-05-29 10:38:23 +0200 (Thu, 29 May 2008) | 1 line
Fix two typos.
........
r63788 | facundo.batista | 2008-05-29 18:39:26 +0200 (Thu, 29 May 2008) | 6 lines
Fixed the semantic of timeout for socket.create_connection and
all the upper level libraries that use it, including urllib2.
Added and fixed some tests, and changed docs correspondingly.
Thanks to John J Lee for the patch and the pusing, :)
........
r63802 | mark.dickinson | 2008-05-30 04:46:53 +0200 (Fri, 30 May 2008) | 2 lines
Fix typo in testSum
........
r63817 | raymond.hettinger | 2008-05-30 20:20:50 +0200 (Fri, 30 May 2008) | 8 lines
* Mark intermedidate computes values (hi, lo, yr) as volatile.
* Expand comments.
* Swap variable names in the sum_exact code so that x and y
are consistently chosen as the larger and smaller magnitude
values respectively.
........
r63827 | raymond.hettinger | 2008-05-31 05:24:31 +0200 (Sat, 31 May 2008) | 1 line
Implement heapq in terms of less-than (to match list.sort()).
........
r63839 | gerhard.haering | 2008-05-31 23:33:27 +0200 (Sat, 31 May 2008) | 2 lines
Fixed rowcount for SELECT statements. They're -1 now (again), for better DB-API 2.0 compliance.
........
r63887 | gregory.p.smith | 2008-06-02 06:05:52 +0200 (Mon, 02 Jun 2008) | 4 lines
Fix issue 2782: be less strict about the format string type in strftime.
Accept unicode and anything else ParseTuple "s#" can deal with. This
matches the time.strftime behavior.
........
r63975 | neal.norwitz | 2008-06-06 06:47:01 +0200 (Fri, 06 Jun 2008) | 3 lines
Aldo Cortesi confirmed this is still needed for OpenBSD 4.2 and 4.3.
(I didn't regen configure, since I don't have a working autoconf.)
........
r63998 | raymond.hettinger | 2008-06-06 23:47:51 +0200 (Fri, 06 Jun 2008) | 1 line
Issue 3501: Make heapq support both __le__ and __lt__.
........
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/ftplib.rst | 10 | ||||
-rw-r--r-- | Doc/library/http.client.rst | 2 | ||||
-rw-r--r-- | Doc/library/poplib.rst | 4 | ||||
-rw-r--r-- | Doc/library/smtplib.rst | 8 | ||||
-rw-r--r-- | Doc/library/socket.rst | 11 | ||||
-rw-r--r-- | Doc/library/telnetlib.rst | 8 | ||||
-rw-r--r-- | Doc/library/urllib2.rst | 12 |
7 files changed, 28 insertions, 27 deletions
diff --git a/Doc/library/ftplib.rst b/Doc/library/ftplib.rst index 99aae0d..8a35a40 100644 --- a/Doc/library/ftplib.rst +++ b/Doc/library/ftplib.rst @@ -44,8 +44,8 @@ The module defines the following items: the method call ``login(user, passwd, acct)`` is made (where *passwd* and *acct* default to the empty string when not given). The optional *timeout* parameter specifies a timeout in seconds for blocking operations like the - connection attempt (if is not specified, or passed as None, the global - default timeout setting will be used). + connection attempt (if is not specified, the global default timeout setting + will be used). .. attribute:: all_errors @@ -123,10 +123,8 @@ followed by ``lines`` for the text version or ``binary`` for the binary version. made. The optional *timeout* parameter specifies a timeout in seconds for the - connection attempt. If is not specified, or passed as None, the object - timeout is used (the timeout that you passed when instantiating the class); - if the object timeout is also None, the global default timeout setting will - be used. + connection attempt. If no *timeout* is passed, the global default timeout + setting will be used. .. method:: FTP.getwelcome() diff --git a/Doc/library/http.client.rst b/Doc/library/http.client.rst index 6903b6a..9c89563 100644 --- a/Doc/library/http.client.rst +++ b/Doc/library/http.client.rst @@ -33,7 +33,7 @@ The module provides the following classes: be raised if the status line can't be parsed as a valid HTTP/1.0 or 1.1 status line. If the optional *timeout* parameter is given, blocking operations (like connection attempts) will timeout after that many seconds - (if it is not given or ``None``, the global default timeout setting is used). + (if it is not given, the global default timeout setting is used). For example, the following calls all create instances that connect to the server at the same host and port:: diff --git a/Doc/library/poplib.rst b/Doc/library/poplib.rst index 893296f..0b2c033 100644 --- a/Doc/library/poplib.rst +++ b/Doc/library/poplib.rst @@ -29,8 +29,8 @@ A single class is provided by the :mod:`poplib` module: This class implements the actual POP3 protocol. The connection is created when the instance is initialized. If *port* is omitted, the standard POP3 port (110) is used. The optional *timeout* parameter specifies a timeout in seconds for the - connection attempt (if not specified, or passed as None, the global default - timeout setting will be used). + connection attempt (if not specified, the global default timeout setting will + be used). .. class:: POP3_SSL(host[, port[, keyfile[, certfile]]]) diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst index 602edb6..31f1ad6 100644 --- a/Doc/library/smtplib.rst +++ b/Doc/library/smtplib.rst @@ -25,8 +25,8 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions). with those parameters during initialization. An :exc:`SMTPConnectError` is raised if the specified host doesn't respond correctly. The optional *timeout* parameter specifies a timeout in seconds for blocking operations - like the connection attempt (if not specified, or passed as None, the global - default timeout setting will be used). + like the connection attempt (if not specified, the global default timeout + setting will be used). For normal use, you should only require the initialization/connect, :meth:`sendmail`, and :meth:`quit` methods. An example is included below. @@ -42,8 +42,8 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions). and *certfile* are also optional, and can contain a PEM formatted private key and certificate chain file for the SSL connection. The optional *timeout* parameter specifies a timeout in seconds for blocking operations like the - connection attempt (if not specified, or passed as None, the global default - timeout setting will be used). + connection attempt (if not specified, the global default timeout setting + will be used). .. class:: LMTP([host[, port[, local_hostname]]]) diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 8fefce6..15e66c7 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -197,12 +197,11 @@ The module :mod:`socket` exports the following constants and functions: .. function:: create_connection(address[, timeout]) - Connects to the *address* received (as usual, a ``(host, port)`` pair), with an - optional timeout for the connection. Especially useful for higher-level - protocols, it is not normally used directly from application-level code. - Passing the optional *timeout* parameter will set the timeout on the socket - instance (if it is not given or ``None``, the global default timeout setting is - used). + Convenience function. Connect to *address* (a 2-tuple ``(host, port)``), + and return the socket object. Passing the optional *timeout* parameter will + set the timeout on the socket instance before attempting to connect. If no + *timeout* is supplied, the global default timeout setting returned by + :func:`getdefaulttimeout` is used. .. function:: getaddrinfo(host, port[, family[, socktype[, proto[, flags]]]]) diff --git a/Doc/library/telnetlib.rst b/Doc/library/telnetlib.rst index 8c8ddbb..4fd8896 100644 --- a/Doc/library/telnetlib.rst +++ b/Doc/library/telnetlib.rst @@ -28,6 +28,11 @@ Character), EL (Erase Line), GA (Go Ahead), SB (Subnegotiation Begin). :class:`Telnet` represents a connection to a Telnet server. The instance is initially not connected by default; the :meth:`open` method must be used to establish a connection. Alternatively, the host name and optional port + and timeout can be passed to the constructor, in which case the connection to + the server will be established before the constructor returns. The optional + *timeout* parameter specifies a timeout in seconds for the connection attempt (if + not specified, the global default timeout setting will be used). + number can be passed to the constructor, to, in which case the connection to the server will be established before the constructor returns. The optional *timeout* parameter specifies a timeout in seconds for blocking operations @@ -123,8 +128,7 @@ Telnet Objects Connect to a host. The optional second argument is the port number, which defaults to the standard Telnet port (23). The optional *timeout* parameter specifies a timeout in seconds for blocking operations like the connection - attempt (if not specified, or passed as None, the global default timeout - setting will be used). + attempt (if not specified, the global default timeout setting will be used). Do not try to reopen an already connected instance. diff --git a/Doc/library/urllib2.rst b/Doc/library/urllib2.rst index 0462222..06dbb44 100644 --- a/Doc/library/urllib2.rst +++ b/Doc/library/urllib2.rst @@ -27,9 +27,9 @@ The :mod:`urllib2` module defines the following functions: returns a string in this format. The optional *timeout* parameter specifies a timeout in seconds for blocking - operations like the connection attempt (if not specified, or passed as - ``None``, the global default timeout setting will be used). This actually - only works for HTTP, HTTPS, FTP and FTPS connections. + operations like the connection attempt (if not specified, the global default + timeout setting will be used). This actually only works for HTTP, HTTPS, + FTP and FTPS connections. This function returns a file-like object with two additional methods: @@ -404,9 +404,9 @@ OpenerDirector Objects the same as those of :func:`urlopen` (which simply calls the :meth:`open` method on the currently installed global :class:`OpenerDirector`). The optional *timeout* parameter specifies a timeout in seconds for blocking - operations like the connection attempt (if not specified, or passed as - ``None``, the global default timeout setting will be used; this actually only - works for HTTP, HTTPS, FTP and FTPS connections). + operations like the connection attempt (if not specified, the global default + timeout setting will be usedi). The timeout feature actually works only for + HTTP, HTTPS, FTP and FTPS connections). .. method:: OpenerDirector.error(proto[, arg[, ...]]) |