Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5a2a650

Browse files
authored
bpo-46239: improve error message when importing asyncio.windows_events (GH-30353)
1 parent 1b11133 commit 5a2a650

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

Lib/asyncio/windows_events.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
"""Selector and proactor event loops for Windows."""
22

3+
import sys
4+
5+
if sys.platform != 'win32': # pragma: no cover
6+
raise ImportError('win32 only')
7+
38
import _overlapped
49
import _winapi
510
import errno
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Improve error message when importing :mod:`asyncio.windows_events` on
2+
non-Windows.

0 commit comments

Comments
 (0)