This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sobolevn
Recipients asvetlov, sobolevn, yselivanov
Date 2022-01-03.09:58:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641203899.54.0.98561784339.issue46239@roundup.psfhosted.org>
In-reply-to
Content
When trying to import both `windows_events` and `windows_utils` on non-Windows, they both fail. But, they fail differently. `windows_utils` produces a good error message, whil `windows_events` produces a strange one. Good: ``` Python 3.11.0a3+ (heads/main:8d7644fa64, Dec 30 2021, 13:00:40) [Clang 11.0.0 (clang-1100.0.33.16)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import asyncio.windows_utils Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/sobolev/Desktop/cpython/Lib/asyncio/windows_utils.py", line 6, in <module> raise ImportError('win32 only') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ImportError: win32 only ``` Not so good: ``` >>> import asyncio.windows_events Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/sobolev/Desktop/cpython/Lib/asyncio/windows_events.py", line 3, in <module> import _overlapped ^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named '_overlapped' ``` I propose to use the same error message `windows_utils` does.
History
Date User Action Args
2022-01-03 09:58:19sobolevnsetrecipients: + sobolevn, asvetlov, yselivanov
2022-01-03 09:58:19sobolevnsetmessageid: <1641203899.54.0.98561784339.issue46239@roundup.psfhosted.org>
2022-01-03 09:58:19sobolevnlinkissue46239 messages
2022-01-03 09:58:19sobolevncreate