`_overlapped` module cannot be imported without socket support
未关闭
还没有人认领这个 Issue。
extension-modules
OS-windows
type-bug
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
Bug report
Bug description:
To reproduce, boot Windows 11 into minimal safe mode and run this
import asyncio
It causes this error
Traceback (most recent call last):
File "C:\projects\asyncio_test_safe_mode.py", line 1, in <module>
import asyncio
File "c:\python\Lib\asyncio\__init__.py", line 42, in <module>
from .windows_events import *
File "c:\python\Lib\asyncio\windows_events.py", line 8, in <module>
import _overlapped
OSError: [WinError 10050] A socket operation encountered a dead network
System information:
- Python 3.11.10 (main, Feb 17 2025, 07:07:12) [MSC v.1942 32 bit (Intel)] on win32
- Microsoft Windows 11 64-bit 23H2 22631.4890
The greater context is that it breaks PyGObject and BleachBit.
CPython versions tested on:
3.11
Operating systems tested on:
Windows
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
先从 asyncio/init.py 和 asyncio/windows_events.py 开始,然后在 Windows 11 最小安全模式下重现导入操作,以检查 _overlapped 失败。修复应确保在 socket 支持不可用时 import asyncio 仍能完成,同时保留 Windows asyncio 的正常行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- operating-systems
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100