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
9fef5244
Kaydet (Commit)
9fef5244
authored
Ock 15, 2015
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge 3.4 (asyncio)
üst
d021c1d3
ab8848bc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
5 deletions
+26
-5
unix_events.py
Lib/asyncio/unix_events.py
+5
-1
windows_events.py
Lib/asyncio/windows_events.py
+6
-1
test_selector_events.py
Lib/test/test_asyncio/test_selector_events.py
+2
-0
test_sslproto.py
Lib/test/test_asyncio/test_sslproto.py
+4
-0
test_subprocess.py
Lib/test/test_asyncio/test_subprocess.py
+1
-0
test_windows_utils.py
Lib/test/test_asyncio/test_windows_utils.py
+8
-3
No files found.
Lib/asyncio/unix_events.py
Dosyayı görüntüle @
9fef5244
...
...
@@ -177,7 +177,11 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
transp
=
_UnixSubprocessTransport
(
self
,
protocol
,
args
,
shell
,
stdin
,
stdout
,
stderr
,
bufsize
,
extra
=
extra
,
**
kwargs
)
yield
from
transp
.
_post_init
()
try
:
yield
from
transp
.
_post_init
()
except
:
transp
.
close
()
raise
watcher
.
add_child_handler
(
transp
.
get_pid
(),
self
.
_child_watcher_callback
,
transp
)
...
...
Lib/asyncio/windows_events.py
Dosyayı görüntüle @
9fef5244
...
...
@@ -272,7 +272,12 @@ class ProactorEventLoop(proactor_events.BaseProactorEventLoop):
transp
=
_WindowsSubprocessTransport
(
self
,
protocol
,
args
,
shell
,
stdin
,
stdout
,
stderr
,
bufsize
,
extra
=
extra
,
**
kwargs
)
yield
from
transp
.
_post_init
()
try
:
yield
from
transp
.
_post_init
()
except
:
transp
.
close
()
raise
return
transp
...
...
Lib/test/test_asyncio/test_selector_events.py
Dosyayı görüntüle @
9fef5244
...
...
@@ -1180,6 +1180,8 @@ class SelectorSslTransportTests(test_utils.TestCase):
self
.
sslsock
.
do_handshake
.
side_effect
=
exc
with
test_utils
.
disable_logger
():
transport
.
_on_handshake
(
0
)
transport
.
close
()
test_utils
.
run_briefly
(
self
.
loop
)
def
test_pause_resume_reading
(
self
):
tr
=
self
.
_make_one
()
...
...
Lib/test/test_asyncio/test_sslproto.py
Dosyayı görüntüle @
9fef5244
...
...
@@ -33,6 +33,7 @@ class SslProtoHandshakeTests(test_utils.TestCase):
waiter
.
cancel
()
transport
=
mock
.
Mock
()
sslpipe
=
mock
.
Mock
()
sslpipe
.
shutdown
.
return_value
=
b
''
sslpipe
.
do_handshake
.
side_effect
=
do_handshake
with
mock
.
patch
(
'asyncio.sslproto._SSLPipe'
,
return_value
=
sslpipe
):
ssl_proto
.
connection_made
(
transport
)
...
...
@@ -40,6 +41,9 @@ class SslProtoHandshakeTests(test_utils.TestCase):
with
test_utils
.
disable_logger
():
self
.
loop
.
run_until_complete
(
handshake_fut
)
# Close the transport
ssl_proto
.
_app_transport
.
close
()
if
__name__
==
'__main__'
:
unittest
.
main
()
Lib/test/test_asyncio/test_subprocess.py
Dosyayı görüntüle @
9fef5244
...
...
@@ -286,6 +286,7 @@ class SubprocessMixin:
# "Exception during subprocess creation, kill the subprocess"
with
test_utils
.
disable_logger
():
self
.
loop
.
run_until_complete
(
cancel_make_transport
())
test_utils
.
run_briefly
(
self
.
loop
)
if
sys
.
platform
!=
'win32'
:
...
...
Lib/test/test_asyncio/test_windows_utils.py
Dosyayı görüntüle @
9fef5244
...
...
@@ -3,6 +3,7 @@
import
socket
import
sys
import
unittest
import
warnings
from
unittest
import
mock
if
sys
.
platform
!=
'win32'
:
...
...
@@ -115,8 +116,10 @@ class PipeTests(unittest.TestCase):
self
.
assertEqual
(
p
.
handle
,
h
)
# check garbage collection of p closes handle
del
p
support
.
gc_collect
()
with
warnings
.
catch_warnings
():
warnings
.
filterwarnings
(
"ignore"
,
""
,
ResourceWarning
)
del
p
support
.
gc_collect
()
try
:
_winapi
.
CloseHandle
(
h
)
except
OSError
as
e
:
...
...
@@ -170,7 +173,9 @@ class PopenTests(unittest.TestCase):
self
.
assertTrue
(
msg
.
upper
()
.
rstrip
()
.
startswith
(
out
))
self
.
assertTrue
(
b
"stderr"
.
startswith
(
err
))
p
.
wait
()
# The context manager calls wait() and closes resources
with
p
:
pass
if
__name__
==
'__main__'
:
...
...
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