bpo-46239: improve error message when importing `asyncio.windows_events` (GH-30353)

This commit is contained in:
Nikita Sobolev 2022-01-04 11:44:26 +03:00 committed by GitHub
parent 1b111338cf
commit 5a2a65096c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,10 @@
"""Selector and proactor event loops for Windows."""
import sys
if sys.platform != 'win32': # pragma: no cover
raise ImportError('win32 only')
import _overlapped
import _winapi
import errno

View File

@ -0,0 +1,2 @@
Improve error message when importing :mod:`asyncio.windows_events` on
non-Windows.