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
859c4ef0
Kaydet (Commit)
859c4ef0
authored
Kas 09, 2010
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make `usenetrc` False by default (the old behaviour of having it True by
default could be rather confusing).
üst
1cb121ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
nntplib.rst
Doc/library/nntplib.rst
+7
-5
nntplib.py
Lib/nntplib.py
+3
-3
NEWS
Misc/NEWS
+2
-0
No files found.
Doc/library/nntplib.rst
Dosyayı görüntüle @
859c4ef0
...
...
@@ -52,24 +52,26 @@ headers, and that you have right to post on the particular newsgroup)::
The module itself defines the following classes:
.. class:: NNTP(host, port=119, user=None, password=None, readermode=None, usenetrc=
Tru
e, [timeout])
.. class:: NNTP(host, port=119, user=None, password=None, readermode=None, usenetrc=
Fals
e, [timeout])
Return a new :class:`NNTP` object, representing a connection
to the NNTP server running on host *host*, listening at port *port*.
An optional *timeout* can be specified for the socket connection.
If the optional *user* and *password* are provided, or if suitable
credentials are present in :file:`/.netrc` and the optional flag *usenetrc*
is true
(the default), the ``AUTHINFO USER`` and ``AUTHINFO PASS`` commands
are used
to identify and authenticate the user to the server. If the optional
is true
, the ``AUTHINFO USER`` and ``AUTHINFO PASS`` commands are used
to identify and authenticate the user to the server. If the optional
flag *readermode* is true, then a ``mode reader`` command is sent before
authentication is performed. Reader mode is sometimes necessary if you are
connecting to an NNTP server on the local machine and intend to call
reader-specific commands, such as ``group``. If you get unexpected
:exc:`NNTPPermanentError`\ s, you might need to set *readermode*.
*readermode* defaults to ``None``. *usenetrc* defaults to ``True``.
.. versionchanged:: 3.2
*usenetrc* is now False by default.
.. class:: NNTP_SSL(host, port=563, user=None, password=None, ssl_context=None, readermode=None, usenetrc=
Tru
e, [timeout])
.. class:: NNTP_SSL(host, port=563, user=None, password=None, ssl_context=None, readermode=None, usenetrc=
Fals
e, [timeout])
Return a new :class:`NNTP_SSL` object, representing an encrypted
connection to the NNTP server running on host *host*, listening at
...
...
Lib/nntplib.py
Dosyayı görüntüle @
859c4ef0
...
...
@@ -308,7 +308,7 @@ class _NNTPBase:
readermode
=
None
,
timeout
=
_GLOBAL_DEFAULT_TIMEOUT
):
"""Initialize an instance. Arguments:
- file: file-like object (open for read/write in binary mode)
- host: hostname of the server
(used if `usenetrc` is True)
- host: hostname of the server
- readermode: if true, send 'mode reader' command after
connecting.
- timeout: timeout (in seconds) used for socket connections
...
...
@@ -986,7 +986,7 @@ class _NNTPBase:
class
NNTP
(
_NNTPBase
):
def
__init__
(
self
,
host
,
port
=
NNTP_PORT
,
user
=
None
,
password
=
None
,
readermode
=
None
,
usenetrc
=
Tru
e
,
readermode
=
None
,
usenetrc
=
Fals
e
,
timeout
=
_GLOBAL_DEFAULT_TIMEOUT
):
"""Initialize an instance. Arguments:
- host: hostname to connect to
...
...
@@ -1026,7 +1026,7 @@ if _have_ssl:
def
__init__
(
self
,
host
,
port
=
NNTP_SSL_PORT
,
user
=
None
,
password
=
None
,
ssl_context
=
None
,
readermode
=
None
,
usenetrc
=
Tru
e
,
readermode
=
None
,
usenetrc
=
Fals
e
,
timeout
=
_GLOBAL_DEFAULT_TIMEOUT
):
"""This works identically to NNTP.__init__, except for the change
in default port and the `ssl_context` argument for SSL connections.
...
...
Misc/NEWS
Dosyayı görüntüle @
859c4ef0
...
...
@@ -60,6 +60,8 @@ Core and Builtins
Library
-------
- ``usenetrc`` is now false by default for NNTP objects.
- Issue #1926: Add support for NNTP over SSL on port 563, as well as
STARTTLS. Patch by Andrew Vant.
...
...
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