bpo-34687: Update asyncio doc for ProactorEventLoop (GH-9623) · python/cpython@37aae9d (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 37aae9d
authored and
committed
File tree
3 files changed
lines changed
3 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1432,15 +1432,6 @@ on all platforms. | ||
1432 | 1432 | |
1433 | 1433 | Availability: Windows. |
1434 | 1434 | |
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 | - | |
1444 | 1435 | .. seealso:: |
1445 | 1436 | |
1446 | 1437 | `MSDN documentation on I/O Completion Ports |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1030,10 +1030,6 @@ The subprocess is created by th :meth:`loop.subprocess_exec` method:: | ||
1030 | 1030 | data = bytes(protocol.output) |
1031 | 1031 | return data.decode('ascii').rstrip() |
1032 | 1032 | |
1033 | - if sys.platform == "win32": | |
1034 | - asyncio.set_event_loop_policy( | |
1035 | - asyncio.WindowsProactorEventLoopPolicy()) | |
1036 | - | |
1037 | 1033 | date = asyncio.run(get_date()) |
1038 | 1034 | print(f"Current date: {date}") |
1039 | 1035 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -344,10 +344,6 @@ function:: | ||
344 | 344 | await proc.wait() |
345 | 345 | return line |
346 | 346 | |
347 | - if sys.platform == "win32": | |
348 | - asyncio.set_event_loop_policy( | |
349 | - asyncio.WindowsProactorEventLoopPolicy()) | |
350 | - | |
351 | 347 | date = asyncio.run(get_date()) |
352 | 348 | print(f"Current date: {date}") |
353 | 349 |