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
f80b3f72
Kaydet (Commit)
f80b3f72
authored
Kas 02, 2010
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #10280: NNTP.nntp_version should reflect the highest version
advertised by the server.
üst
e159422c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
nntplib.py
Lib/nntplib.py
+3
-1
test_nntplib.py
Lib/test/test_nntplib.py
+3
-3
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/nntplib.py
Dosyayı görüntüle @
f80b3f72
...
...
@@ -361,7 +361,9 @@ class _NNTPBase:
else
:
self
.
_caps
=
caps
if
'VERSION'
in
caps
:
self
.
nntp_version
=
int
(
caps
[
'VERSION'
][
0
])
# The server can advertise several supported versions,
# choose the highest.
self
.
nntp_version
=
max
(
map
(
int
,
caps
[
'VERSION'
]))
def
getwelcome
(
self
):
"""Get the welcome message from the server
...
...
Lib/test/test_nntplib.py
Dosyayı görüntüle @
f80b3f72
...
...
@@ -558,7 +558,7 @@ class NNTPv2Handler(NNTPv1Handler):
def
handle_CAPABILITIES
(
self
):
self
.
push_lit
(
"""
\
101 Capability list:
VERSION 2
VERSION 2
3
IMPLEMENTATION INN 2.5.1
AUTHINFO USER
HDR
...
...
@@ -935,7 +935,7 @@ class NNTPv2Tests(NNTPv1v2TestsMixin, MockedNNTPTestsMixin, unittest.TestCase):
def
test_caps
(
self
):
caps
=
self
.
server
.
getcapabilities
()
self
.
assertEqual
(
caps
,
{
'VERSION'
:
[
'2'
],
'VERSION'
:
[
'2'
,
'3'
],
'IMPLEMENTATION'
:
[
'INN'
,
'2.5.1'
],
'AUTHINFO'
:
[
'USER'
],
'HDR'
:
[],
...
...
@@ -945,7 +945,7 @@ class NNTPv2Tests(NNTPv1v2TestsMixin, MockedNNTPTestsMixin, unittest.TestCase):
'POST'
:
[],
'READER'
:
[],
})
self
.
assertEqual
(
self
.
server
.
nntp_version
,
2
)
self
.
assertEqual
(
self
.
server
.
nntp_version
,
3
)
class
MiscTests
(
unittest
.
TestCase
):
...
...
Misc/NEWS
Dosyayı görüntüle @
f80b3f72
...
...
@@ -59,6 +59,9 @@ Core and Builtins
Library
-------
- Issue #10280: NNTP.nntp_version should reflect the highest version
advertised by the server.
- Issue #10184: Touch directories only once when extracting a tarfile.
- Issue #10199: New package, ``turtledemo`` now contains selected demo
...
...
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