Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
ab756f60
Kaydet (Commit)
ab756f60
authored
May 11, 2008
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#2452: timeout is used for all blocking operations.
üst
0aaf559b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
47 deletions
+54
-47
ftplib.rst
Doc/library/ftplib.rst
+10
-8
httplib.rst
Doc/library/httplib.rst
+8
-8
smtplib.rst
Doc/library/smtplib.rst
+16
-14
telnetlib.rst
Doc/library/telnetlib.rst
+9
-7
urllib2.rst
Doc/library/urllib2.rst
+11
-10
No files found.
Doc/library/ftplib.rst
Dosyayı görüntüle @
ab756f60
...
...
@@ -40,11 +40,12 @@ The module defines the following items:
.. class:: FTP([host[, user[, passwd[, acct[, timeout]]]]])
Return a new instance of the :class:`FTP` class. When *host* is given, the
method call ``connect(host)`` is made. When *user* is given, additionally 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 the connection attempt (if is not specified,
or passed as None, the global default timeout setting will be used).
method call ``connect(host)`` is made. When *user* is given, additionally
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).
.. versionchanged:: 2.6
*timeout* was added.
...
...
@@ -125,9 +126,10 @@ 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 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.
.. versionchanged:: 2.6
*timeout* was added.
...
...
Doc/library/httplib.rst
Dosyayı görüntüle @
ab756f60
...
...
@@ -33,14 +33,14 @@ The module provides the following classes:
.. class:: HTTPConnection(host[, port[, strict[, timeout]]])
An :class:`HTTPConnection` instance represents one transaction with an HTTP
server. It should be instantiated passing it a host and optional port
number.
If no port number is passed, the port is extracted from the host string if i
t
has the form ``host:port``, else the default HTTP port (80) is used. When True,
the optional parameter *strict* causes ``BadStatusLine`` to 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, connection attempts will timeout after
that many seconds (if it is not given or ``None``, the global default timeout
setting is used).
server. It should be instantiated passing it a host and optional port
number. If no port number is passed, the port is extracted from the hos
t
string if it has the form ``host:port``, else the default HTTP port (80) is
used. When True, the optional parameter *strict* causes ``BadStatusLine`` to
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).
For example, the following calls all create instances that connect to the server
at the same host and port::
...
...
Doc/library/smtplib.rst
Dosyayı görüntüle @
ab756f60
...
...
@@ -19,13 +19,14 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
.. class:: SMTP([host[, port[, local_hostname[, timeout]]]])
A :class:`SMTP` instance encapsulates an SMTP connection. It has methods that
support a full repertoire of SMTP and ESMTP operations. If the optional host and
port parameters are given, the SMTP :meth:`connect` method is called 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 the connection attempt (if not specified, or
passed as None, the global default timeout setting will be used).
A :class:`SMTP` instance encapsulates an SMTP connection. It has methods
that support a full repertoire of SMTP and ESMTP operations. If the optional
host and port parameters are given, the SMTP :meth:`connect` method is called
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).
For normal use, you should only require the initialization/connect,
:meth:`sendmail`, and :meth:`quit` methods. An example is included below.
...
...
@@ -38,13 +39,14 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
A :class:`SMTP_SSL` instance behaves exactly the same as instances of
:class:`SMTP`. :class:`SMTP_SSL` should be used for situations where SSL is
required from the beginning of the connection and using :meth:`starttls` is not
appropriate. If *host* is not specified, the local host is used. If *port* is
omitted, the standard SMTP-over-SSL port (465) is used. *keyfile* 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 the connection attempt (if not specified, or passed as
None, the global default timeout setting will be used).
required from the beginning of the connection and using :meth:`starttls` is
not appropriate. If *host* is not specified, the local host is used. If
*port* is omitted, the standard SMTP-over-SSL port (465) is used. *keyfile*
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).
.. versionchanged:: 2.6
*timeout* was added.
...
...
Doc/library/telnetlib.rst
Dosyayı görüntüle @
ab756f60
...
...
@@ -27,11 +27,12 @@ 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 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 the connection attempt (if not
specified, or passed as None, the global default timeout setting will be used).
establish a connection. Alternatively, the host name and optional port
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
like the connection attempt (if not specified, or passed as None, the global
default timeout setting will be used).
Do not reopen an already connected instance.
...
...
@@ -126,8 +127,9 @@ 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 the connection attempt (if not specified, or
passed as None, the global default timeout setting will be used).
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).
Do not try to reopen an already connected instance.
...
...
Doc/library/urllib2.rst
Dosyayı görüntüle @
ab756f60
...
...
@@ -26,10 +26,10 @@ The :mod:`urllib2` module defines the following functions:
:func:`urllib.urlencode` function takes a mapping or sequence of 2-tuples and
returns a string in this format.
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). This actually only work for HTTP, HTTPS, FTP and
FTPS connections.
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.
This function returns a file-like object with two additional methods:
...
...
@@ -407,12 +407,13 @@ OpenerDirector Objects
.. method:: OpenerDirector.open(url[, data][, timeout])
Open the given *url* (which can be a request object or a string), optionally
passing the given *data*. Arguments, return values and exceptions raised are 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 the connection attempt (if not
specified, or passed as None, the global default timeout setting will be used;
this actually only work for HTTP, HTTPS, FTP and FTPS connections).
passing the given *data*. Arguments, return values and exceptions raised are
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).
.. versionchanged:: 2.6
*timeout* was added.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment