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
5eef78b1
Kaydet (Commit)
5eef78b1
authored
Haz 28, 2016
tarafından
Yury Selivanov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge 3.5 (asyncio)
üst
7c6b3ea4
63bf4876
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
selector_events.py
Lib/asyncio/selector_events.py
+2
-1
test_selector_events.py
Lib/test/test_asyncio/test_selector_events.py
+11
-0
No files found.
Lib/asyncio/selector_events.py
Dosyayı görüntüle @
5eef78b1
...
...
@@ -394,7 +394,8 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
if
hasattr
(
socket
,
'AF_UNIX'
)
and
sock
.
family
==
socket
.
AF_UNIX
:
self
.
_sock_connect
(
fut
,
sock
,
address
)
else
:
resolved
=
base_events
.
_ensure_resolved
(
address
,
loop
=
self
)
resolved
=
base_events
.
_ensure_resolved
(
address
,
family
=
sock
.
family
,
proto
=
sock
.
proto
,
loop
=
self
)
resolved
.
add_done_callback
(
lambda
resolved
:
self
.
_on_resolved
(
fut
,
sock
,
resolved
))
...
...
Lib/test/test_asyncio/test_selector_events.py
Dosyayı görüntüle @
5eef78b1
...
...
@@ -373,6 +373,17 @@ class BaseSelectorEventLoopTests(test_utils.TestCase):
self
.
loop
.
run_until_complete
(
fut
)
self
.
assertTrue
(
self
.
loop
.
remove_writer
.
called
)
def
test_sock_connect_resolve_using_socket_params
(
self
):
addr
=
(
'need-resolution.com'
,
8080
)
sock
=
test_utils
.
mock_nonblocking_socket
()
self
.
loop
.
getaddrinfo
=
mock
.
Mock
()
self
.
loop
.
sock_connect
(
sock
,
addr
)
while
not
self
.
loop
.
getaddrinfo
.
called
:
self
.
loop
.
_run_once
()
self
.
loop
.
getaddrinfo
.
assert_called_with
(
*
addr
,
type
=
sock
.
type
,
family
=
sock
.
family
,
proto
=
sock
.
proto
,
flags
=
0
)
def
test__sock_connect
(
self
):
f
=
asyncio
.
Future
(
loop
=
self
.
loop
)
...
...
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