Skip to content

Commit 37aae9d

Browse files
vstinnermiss-islington
authored andcommitted
bpo-34687: Update asyncio doc for ProactorEventLoop (GH-9623)
Since ProactorEventLoop is now the default in 3.8, remove examples using it explicitly on Windows. https://bugs.python.org/issue34687
1 parent 077061a commit 37aae9d

File tree

3 files changed

+0
-17
lines changed

3 files changed

+0
-17
lines changed

Doc/library/asyncio-eventloop.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,15 +1432,6 @@ on all platforms.
14321432

14331433
Availability: Windows.
14341434

1435-
An example how to use :class:`ProactorEventLoop` on Windows::
1436-
1437-
import asyncio
1438-
import sys
1439-
1440-
if sys.platform == 'win32':
1441-
loop = asyncio.ProactorEventLoop()
1442-
asyncio.set_event_loop(loop)
1443-
14441435
.. seealso::
14451436

14461437
`MSDN documentation on I/O Completion Ports

Doc/library/asyncio-protocol.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,10 +1030,6 @@ The subprocess is created by th :meth:`loop.subprocess_exec` method::
10301030
data = bytes(protocol.output)
10311031
return data.decode('ascii').rstrip()
10321032

1033-
if sys.platform == "win32":
1034-
asyncio.set_event_loop_policy(
1035-
asyncio.WindowsProactorEventLoopPolicy())
1036-
10371033
date = asyncio.run(get_date())
10381034
print(f"Current date: {date}")
10391035

Doc/library/asyncio-subprocess.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,6 @@ function::
344344
await proc.wait()
345345
return line
346346

347-
if sys.platform == "win32":
348-
asyncio.set_event_loop_policy(
349-
asyncio.WindowsProactorEventLoopPolicy())
350-
351347
date = asyncio.run(get_date())
352348
print(f"Current date: {date}")
353349

0 commit comments

Comments
 (0)