]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-34687: Update asyncio doc for ProactorEventLoop (GH-9623)
authorVictor Stinner <vstinner@redhat.com>
Fri, 28 Sep 2018 15:40:08 +0000 (08:40 -0700)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 28 Sep 2018 15:40:08 +0000 (08:40 -0700)
Since ProactorEventLoop is now the default in 3.8, remove examples
using it explicitly on Windows.

https://bugs.python.org/issue34687

Doc/library/asyncio-eventloop.rst
Doc/library/asyncio-protocol.rst
Doc/library/asyncio-subprocess.rst

index 50d6ea4b13891a22a2791ba723763c30054d25ae..76c8ce9943efccec4e311798c703c69676d9ea05 100644 (file)
@@ -1432,15 +1432,6 @@ on all platforms.
 
    Availability: Windows.
 
-   An example how to use :class:`ProactorEventLoop` on Windows::
-
-        import asyncio
-        import sys
-
-        if sys.platform == 'win32':
-            loop = asyncio.ProactorEventLoop()
-            asyncio.set_event_loop(loop)
-
    .. seealso::
 
       `MSDN documentation on I/O Completion Ports
index bdfdcf7ddb6efaf5427ee06822b31ecd1d753ca9..14ec31a6d5d28162076723fd28de686220b52f72 100644 (file)
@@ -1030,10 +1030,6 @@ The subprocess is created by th :meth:`loop.subprocess_exec` method::
         data = bytes(protocol.output)
         return data.decode('ascii').rstrip()
 
-    if sys.platform == "win32":
-        asyncio.set_event_loop_policy(
-            asyncio.WindowsProactorEventLoopPolicy())
-
     date = asyncio.run(get_date())
     print(f"Current date: {date}")
 
index 0bcf66175ce383460fc41e5aa632bd2e978460f2..a2cf5173484894b533855202fda7add8f534beae 100644 (file)
@@ -344,10 +344,6 @@ function::
         await proc.wait()
         return line
 
-    if sys.platform == "win32":
-        asyncio.set_event_loop_policy(
-            asyncio.WindowsProactorEventLoopPolicy())
-
     date = asyncio.run(get_date())
     print(f"Current date: {date}")