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
ea1158f9
Kaydet (Commit)
ea1158f9
authored
Agu 06, 2009
tarafından
Mark Dickinson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #6622: Fix 'variable referenced before assignment' bug in POP3.apop.
Thanks Vincent Legoll.
üst
ba5c7432
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
poplib.py
Lib/poplib.py
+1
-1
test_poplib.py
Lib/test/test_poplib.py
+10
-3
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/poplib.py
Dosyayı görüntüle @
ea1158f9
...
...
@@ -282,7 +282,7 @@ class POP3:
NB: mailbox is locked by server from here to 'quit()'
"""
secret
=
bytes
(
secret
,
self
.
encoding
)
secret
=
bytes
(
password
,
self
.
encoding
)
m
=
self
.
timestamp
.
match
(
self
.
welcome
)
if
not
m
:
raise
error_proto
(
'-ERR APOP not supported by server'
)
...
...
Lib/test/test_poplib.py
Dosyayı görüntüle @
ea1158f9
...
...
@@ -36,7 +36,7 @@ class DummyPOP3Handler(asynchat.async_chat):
asynchat
.
async_chat
.
__init__
(
self
,
conn
)
self
.
set_terminator
(
b
"
\r\n
"
)
self
.
in_buffer
=
[]
self
.
push
(
'+OK dummy pop3 server ready.'
)
self
.
push
(
'+OK dummy pop3 server ready.
<timestamp>
'
)
def
collect_incoming_data
(
self
,
data
):
self
.
in_buffer
.
append
(
data
)
...
...
@@ -104,6 +104,9 @@ class DummyPOP3Handler(asynchat.async_chat):
def
cmd_rpop
(
self
,
arg
):
self
.
push
(
'+OK done nothing.'
)
def
cmd_apop
(
self
,
arg
):
self
.
push
(
'+OK done nothing.'
)
class
DummyPOP3Server
(
asyncore
.
dispatcher
,
threading
.
Thread
):
...
...
@@ -169,7 +172,8 @@ class TestPOP3Class(TestCase):
self
.
server
.
stop
()
def
test_getwelcome
(
self
):
self
.
assertEqual
(
self
.
client
.
getwelcome
(),
b
'+OK dummy pop3 server ready.'
)
self
.
assertEqual
(
self
.
client
.
getwelcome
(),
b
'+OK dummy pop3 server ready. <timestamp>'
)
def
test_exceptions
(
self
):
self
.
assertRaises
(
poplib
.
error_proto
,
self
.
client
.
_shortcmd
,
'echo -err'
)
...
...
@@ -209,6 +213,9 @@ class TestPOP3Class(TestCase):
def
test_rpop
(
self
):
self
.
assertOK
(
self
.
client
.
rpop
(
'foo'
))
def
test_apop
(
self
):
self
.
assertOK
(
self
.
client
.
apop
(
'foo'
,
'dummypassword'
))
def
test_top
(
self
):
expected
=
(
b
'+OK 116 bytes'
,
[
b
'From: postmaster@python.org'
,
b
'Content-Type: text/plain'
,
...
...
@@ -239,7 +246,7 @@ if hasattr(poplib, 'POP3_SSL'):
self
.
set_socket
(
ssl_socket
)
self
.
set_terminator
(
b
"
\r\n
"
)
self
.
in_buffer
=
[]
self
.
push
(
'+OK dummy pop3 server ready.'
)
self
.
push
(
'+OK dummy pop3 server ready.
<timestamp>
'
)
class
TestPOP3_SSLClass
(
TestPOP3Class
):
# repeat previous tests by using poplib.POP3_SSL
...
...
Misc/NEWS
Dosyayı görüntüle @
ea1158f9
...
...
@@ -63,6 +63,9 @@ C-API
Library
-------
- Issue #6622: Fix "local variable 'secret' referenced before
assignment" bug in POP3.apop.
- Issue #2715: Remove remnants of Carbon.File from binhex module.
- Issue #6595: The Decimal constructor now allows arbitrary Unicode
...
...
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