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
54b74fe9
Unverified
Kaydet (Commit)
54b74fe9
authored
May 14, 2019
tarafından
Andrew Svetlov
Kaydeden (comit)
GitHub
May 14, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-36801: Temporarily fix regression in writer.drain() (#13330)
üst
91c99873
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
26 deletions
+1
-26
streams.py
Lib/asyncio/streams.py
+1
-3
test_streams.py
Lib/test/test_asyncio/test_streams.py
+0
-23
No files found.
Lib/asyncio/streams.py
Dosyayı görüntüle @
54b74fe9
...
...
@@ -439,9 +439,7 @@ class StreamWriter:
# Wait for protocol.connection_lost() call
# Raise connection closing error if any,
# ConnectionResetError otherwise
fut
=
self
.
_protocol
.
_get_close_waiter
(
self
)
await
fut
raise
ConnectionResetError
(
'Connection lost'
)
await
sleep
(
0
)
await
self
.
_protocol
.
_drain_helper
()
...
...
Lib/test/test_asyncio/test_streams.py
Dosyayı görüntüle @
54b74fe9
...
...
@@ -109,29 +109,6 @@ class StreamTests(test_utils.TestCase):
self
.
_basetest_open_connection_no_loop_ssl
(
conn_fut
)
@unittest.skipIf
(
ssl
is
None
,
'No ssl module'
)
def
test_drain_on_closed_writer_ssl
(
self
):
async
def
inner
(
httpd
):
reader
,
writer
=
await
asyncio
.
open_connection
(
*
httpd
.
address
,
ssl
=
test_utils
.
dummy_ssl_context
())
messages
=
[]
self
.
loop
.
set_exception_handler
(
lambda
loop
,
ctx
:
messages
.
append
(
ctx
))
writer
.
write
(
b
'GET / HTTP/1.0
\r\n\r\n
'
)
data
=
await
reader
.
read
()
self
.
assertTrue
(
data
.
endswith
(
b
'
\r\n\r\n
Test message'
))
writer
.
close
()
with
self
.
assertRaises
(
ConnectionResetError
):
await
writer
.
drain
()
self
.
assertEqual
(
messages
,
[])
with
test_utils
.
run_test_server
(
use_ssl
=
True
)
as
httpd
:
self
.
loop
.
run_until_complete
(
inner
(
httpd
))
def
_basetest_open_connection_error
(
self
,
open_connection_fut
):
messages
=
[]
self
.
loop
.
set_exception_handler
(
lambda
loop
,
ctx
:
messages
.
append
(
ctx
))
...
...
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