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
6ea29c5e
Kaydet (Commit)
6ea29c5e
authored
Eyl 25, 2018
tarafından
Victor Stinner
Kaydeden (comit)
Yury Selivanov
Eyl 25, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-34687: Make asynico use ProactorEventLoop by default (GH-9538)
üst
c8c0249c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
14 deletions
+30
-14
asyncio-platforms.rst
Doc/library/asyncio-platforms.rst
+6
-10
asyncio-policy.rst
Doc/library/asyncio-policy.rst
+13
-1
3.8.rst
Doc/whatsnew/3.8.rst
+5
-0
windows_events.py
Lib/asyncio/windows_events.py
+1
-1
test_base_events.py
Lib/test/test_asyncio/test_base_events.py
+1
-1
test_streams.py
Lib/test/test_asyncio/test_streams.py
+2
-1
2018-09-24-17-14-57.bpo-34687.Fku_8S.rst
...S.d/next/Library/2018-09-24-17-14-57.bpo-34687.Fku_8S.rst
+2
-0
No files found.
Doc/library/asyncio-platforms.rst
Dosyayı görüntüle @
6ea29c5e
...
...
@@ -23,6 +23,10 @@ All Platforms
Windows
=======
.. versionchanged:: 3.8
On Windows, :class:`ProactorEventLoop` is now the default event loop.
All event loops on Windows do not support the following methods:
* :meth:`loop.create_unix_connection` and
...
...
@@ -67,16 +71,8 @@ Windows configuration.
Subprocess Support on Windows
-----------------------------
:class:`SelectorEventLoop` on Windows does not support subproceses.
On Windows, :class:`ProactorEventLoop` should be used instead::
import asyncio
asyncio.set_event_loop_policy(
asyncio.WindowsProactorEventLoopPolicy())
asyncio.run(your_code())
On Windows, the default event loop :class:`ProactorEventLoop` supports
subprocesses, whereas :class:`SelectorEventLoop` does not.
The :meth:`policy.set_child_watcher()
<AbstractEventLoopPolicy.set_child_watcher>` function is also
...
...
Doc/library/asyncio-policy.rst
Dosyayı görüntüle @
6ea29c5e
...
...
@@ -92,11 +92,23 @@ asyncio ships with the following built-in policies:
.. class:: DefaultEventLoopPolicy
The default asyncio policy. Uses :class:`SelectorEventLoop`
on
both Unix and Windows platform
s.
on
Unix and :class:`ProactorEventLoop` on Window
s.
There is no need to install the default policy manually. asyncio
is configured to use the default policy automatically.
.. versionchanged:: 3.8
On Windows, :class:`ProactorEventLoop` is now used by default.
.. class:: WindowsSelectorEventLoopPolicy
An alternative event loop policy that uses the
:class:`SelectorEventLoop` event loop implementation.
Availability: Windows.
.. class:: WindowsProactorEventLoopPolicy
...
...
Doc/whatsnew/3.8.rst
Dosyayı görüntüle @
6ea29c5e
...
...
@@ -116,6 +116,11 @@ New Modules
Improved Modules
================
asyncio
-------
On Windows, the default event loop is now :class:`~asyncio.ProactorEventLoop`.
os.path
-------
...
...
Lib/asyncio/windows_events.py
Dosyayı görüntüle @
6ea29c5e
...
...
@@ -811,4 +811,4 @@ class WindowsProactorEventLoopPolicy(events.BaseDefaultEventLoopPolicy):
_loop_factory
=
ProactorEventLoop
DefaultEventLoopPolicy
=
Windows
Sele
ctorEventLoopPolicy
DefaultEventLoopPolicy
=
Windows
Proa
ctorEventLoopPolicy
Lib/test/test_asyncio/test_base_events.py
Dosyayı görüntüle @
6ea29c5e
...
...
@@ -1014,7 +1014,7 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
def
setUp
(
self
):
super
()
.
setUp
()
self
.
loop
=
asyncio
.
new_event_l
oop
()
self
.
loop
=
asyncio
.
SelectorEventL
oop
()
self
.
set_event_loop
(
self
.
loop
)
@mock.patch
(
'socket.getnameinfo'
)
...
...
Lib/test/test_asyncio/test_streams.py
Dosyayı görüntüle @
6ea29c5e
...
...
@@ -816,7 +816,8 @@ os.close(fd)
addr
=
q
.
get
()
# Should not be stuck in an infinite loop.
with
self
.
assertRaises
((
ConnectionResetError
,
BrokenPipeError
)):
with
self
.
assertRaises
((
ConnectionResetError
,
ConnectionAbortedError
,
BrokenPipeError
)):
self
.
loop
.
run_until_complete
(
client
(
*
addr
))
# Clean up the thread. (Only on success; on failure, it may
...
...
Misc/NEWS.d/next/Library/2018-09-24-17-14-57.bpo-34687.Fku_8S.rst
0 → 100644
Dosyayı görüntüle @
6ea29c5e
On Windows, asyncio now uses ProactorEventLoop, instead of
SelectorEventLoop, by default.
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