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:
...
@@ -40,11 +40,12 @@ The module defines the following items:
.. class:: FTP([host[, user[, passwd[, acct[, timeout]]]]])
.. class:: FTP([host[, user[, passwd[, acct[, timeout]]]]])
Return a new instance of the :class:`FTP` class. When *host* is given, the
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 ``connect(host)`` is made. When *user* is given, additionally
method call ``login(user, passwd, acct)`` is made (where *passwd* and *acct*
the method call ``login(user, passwd, acct)`` is made (where *passwd* and
default to the empty string when not given). The optional *timeout* parameter
*acct* default to the empty string when not given). The optional *timeout*
specifies a timeout in seconds for the connection attempt (if is not specified,
parameter specifies a timeout in seconds for blocking operations like the
or passed as None, the global default timeout setting will be used).
connection attempt (if is not specified, or passed as None, the global
default timeout setting will be used).
.. versionchanged:: 2.6
.. versionchanged:: 2.6
*timeout* was added.
*timeout* was added.
...
@@ -125,9 +126,10 @@ followed by ``lines`` for the text version or ``binary`` for the binary version.
...
@@ -125,9 +126,10 @@ followed by ``lines`` for the text version or ``binary`` for the binary version.
made.
made.
The optional *timeout* parameter specifies a timeout in seconds for the
The optional *timeout* parameter specifies a timeout in seconds for the
connection attempt. If is not specified, or passed as None, the object timeout
connection attempt. If is not specified, or passed as None, the object
is used (the timeout that you passed when instantiating the class); if the
timeout is used (the timeout that you passed when instantiating the class);
object timeout is also None, the global default timeout setting will be used.
if the object timeout is also None, the global default timeout setting will
be used.
.. versionchanged:: 2.6
.. versionchanged:: 2.6
*timeout* was added.
*timeout* was added.
...
...
Doc/library/httplib.rst
Dosyayı görüntüle @
ab756f60
...
@@ -33,14 +33,14 @@ The module provides the following classes:
...
@@ -33,14 +33,14 @@ The module provides the following classes:
.. class:: HTTPConnection(host[, port[, strict[, timeout]]])
.. class:: HTTPConnection(host[, port[, strict[, timeout]]])
An :class:`HTTPConnection` instance represents one transaction with an HTTP
An :class:`HTTPConnection` instance represents one transaction with an HTTP
server. It should be instantiated passing it a host and optional port
number.
server. It should be instantiated passing it a host and optional port
If no port number is passed, the port is extracted from the host string if i
t
number. If no port number is passed, the port is extracted from the hos
t
has the form ``host:port``, else the default HTTP port (80) is used. When True,
string if it has the form ``host:port``, else the default HTTP port (80) is
the optional parameter *strict* causes ``BadStatusLine`` to be raised if the
used. When True, the optional parameter *strict* causes ``BadStatusLine`` to
status line can't be parsed as a valid HTTP/1.0 or 1.1 status line. If the
be raised if the status line can't be parsed as a valid HTTP/1.0 or 1.1
optional *timeout* parameter is given, connection attempts will timeout after
status line. If the optional *timeout* parameter is given, blocking
that many seconds (if it is not given or ``None``, the global default timeout
operations (like connection attempts) will timeout after that many seconds
setting is used).
(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
For example, the following calls all create instances that connect to the server
at the same host and port::
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).
...
@@ -19,13 +19,14 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
.. class:: SMTP([host[, port[, local_hostname[, timeout]]]])
.. class:: SMTP([host[, port[, local_hostname[, timeout]]]])
A :class:`SMTP` instance encapsulates an SMTP connection. It has methods that
A :class:`SMTP` instance encapsulates an SMTP connection. It has methods
support a full repertoire of SMTP and ESMTP operations. If the optional host and
that support a full repertoire of SMTP and ESMTP operations. If the optional
port parameters are given, the SMTP :meth:`connect` method is called with those
host and port parameters are given, the SMTP :meth:`connect` method is called
parameters during initialization. An :exc:`SMTPConnectError` is raised if the
with those parameters during initialization. An :exc:`SMTPConnectError` is
specified host doesn't respond correctly. The optional *timeout* parameter
raised if the specified host doesn't respond correctly. The optional
specifies a timeout in seconds for the connection attempt (if not specified, or
*timeout* parameter specifies a timeout in seconds for blocking operations
passed as None, the global default timeout setting will be used).
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,
For normal use, you should only require the initialization/connect,
:meth:`sendmail`, and :meth:`quit` methods. An example is included below.
:meth:`sendmail`, and :meth:`quit` methods. An example is included below.
...
@@ -38,13 +39,14 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
...
@@ -38,13 +39,14 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
A :class:`SMTP_SSL` instance behaves exactly the same as instances of
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
: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
required from the beginning of the connection and using :meth:`starttls` is
appropriate. If *host* is not specified, the local host is used. If *port* is
not appropriate. If *host* is not specified, the local host is used. If
omitted, the standard SMTP-over-SSL port (465) is used. *keyfile* and *certfile*
*port* is omitted, the standard SMTP-over-SSL port (465) is used. *keyfile*
are also optional, and can contain a PEM formatted private key and certificate
and *certfile* are also optional, and can contain a PEM formatted private key
chain file for the SSL connection. The optional *timeout* parameter specifies a
and certificate chain file for the SSL connection. The optional *timeout*
timeout in seconds for the connection attempt (if not specified, or passed as
parameter specifies a timeout in seconds for blocking operations like the
None, the global default timeout setting will be used).
connection attempt (if not specified, or passed as None, the global default
timeout setting will be used).
.. versionchanged:: 2.6
.. versionchanged:: 2.6
*timeout* was added.
*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).
...
@@ -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
: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
initially not connected by default; the :meth:`open` method must be used to
establish a connection. Alternatively, the host name and optional port number
establish a connection. Alternatively, the host name and optional port
can be passed to the constructor, to, in which case the connection to the server
number can be passed to the constructor, to, in which case the connection to
will be established before the constructor returns. The optional *timeout*
the server will be established before the constructor returns. The optional
parameter specifies a timeout in seconds for the connection attempt (if not
*timeout* parameter specifies a timeout in seconds for blocking operations
specified, or passed as None, the global default timeout setting will be used).
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.
Do not reopen an already connected instance.
...
@@ -126,8 +127,9 @@ Telnet Objects
...
@@ -126,8 +127,9 @@ Telnet Objects
Connect to a host. The optional second argument is the port number, which
Connect to a host. The optional second argument is the port number, which
defaults to the standard Telnet port (23). The optional *timeout* parameter
defaults to the standard Telnet port (23). The optional *timeout* parameter
specifies a timeout in seconds for the connection attempt (if not specified, or
specifies a timeout in seconds for blocking operations like the connection
passed as None, the global default timeout setting will be used).
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.
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:
...
@@ -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
:func:`urllib.urlencode` function takes a mapping or sequence of 2-tuples and
returns a string in this format.
returns a string in this format.
The optional *timeout* parameter specifies a timeout in seconds for
the
The optional *timeout* parameter specifies a timeout in seconds for
blocking
connection attempt (if not specified, or passed as None, the global default
operations like the connection attempt (if not specified, or passed as
timeout setting will be used). This actually only work for HTTP, HTTPS, FTP and
``None``, the global default timeout setting will be used). This actually
FTPS connections.
only works for HTTP, HTTPS, FTP and
FTPS connections.
This function returns a file-like object with two additional methods:
This function returns a file-like object with two additional methods:
...
@@ -407,12 +407,13 @@ OpenerDirector Objects
...
@@ -407,12 +407,13 @@ OpenerDirector Objects
.. method:: OpenerDirector.open(url[, data][, timeout])
.. method:: OpenerDirector.open(url[, data][, timeout])
Open the given *url* (which can be a request object or a string), optionally
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
passing the given *data*. Arguments, return values and exceptions raised are
same as those of :func:`urlopen` (which simply calls the :meth:`open` method on
the same as those of :func:`urlopen` (which simply calls the :meth:`open`
the currently installed global :class:`OpenerDirector`). The optional *timeout*
method on the currently installed global :class:`OpenerDirector`). The
parameter specifies a timeout in seconds for the connection attempt (if not
optional *timeout* parameter specifies a timeout in seconds for blocking
specified, or passed as None, the global default timeout setting will be used;
operations like the connection attempt (if not specified, or passed as
this actually only work for HTTP, HTTPS, FTP and FTPS connections).
``None``, the global default timeout setting will be used; this actually only
works for HTTP, HTTPS, FTP and FTPS connections).
.. versionchanged:: 2.6
.. versionchanged:: 2.6
*timeout* was added.
*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