python / python/cpython

`_overlapped` module cannot be imported without socket support

Open
#131,131 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

extension-modules OS-windows type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with asyncio/init.py and asyncio/windows_events.py, then reproduce the import in Windows 11 minimal safe mode to examine the _overlapped failure. The fix should allow import asyncio to complete when socket support is unavailable, while preserving normal Windows asyncio behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.