Repository navigation
Conversation
|
Lets ensure the other stuff works before I make tests for windows. |
|
3.9 ubuntu is broken but we are ignoring that it's a workflow issue not a uvloop issue. |
|
import signal
import sys
def handler(signum, frame):
if signum == signal.SIGUSR1:
print('WORLD')
if sys.platform != 'win32':
signal.signal(signal.SIGUSR1, handler)
a = input()
print(a)
a = input()
print(a)
exit(11)
This is fixed now |
|
Vizonex/Winloop#194 Posting this here since it relates, it's a problem that has been preventing me from moving forward. |
|
Problem solved for subprocesses an PR is incoming from my end. |
…16) * fix subprocess problems and enable more tests to start running again * fix linting * mark linux tests as non-reproducible * reformat tests
|
1 test needs solving (unrelated) but this PR appears to be ready for merge. @fantix I'll let this merge be your call but windows support is considered done. My work here is done and I'm proud of what me and my team has accomplished. |
|
I'm planning to turn off the win fork for workflows when the PR is approved by a reviewer since I was having to do a lot of on/off with workflows to ensure everything worked correctly. |
* Apply final changes before merging windows support with uvloop * disable linux on test_process_delayed_stdio__not_paused__no_stdin * remove win branch from tests.yml as local testing is complete
|
It's ready now. |
There was a problem hiding this comment.
🟡 Changes recommended
Critical Windows defects remain, including a Win64 stack overwrite, incorrect signal registration, and source-distribution builds that fail without Unix tooling.
13 open issues
Avoid Unix autotools when building source distributions on Windows · New Use native-width storage for Windows handles · New Register the requested signal on Windows · New Restrict the call_later skip to Windows · New Move accepted-socket test orchestration out of nested function · New Restore subprocess protocol context propagation coverage · New Use a SelectorEventLoop in the Windows test workaround · New Check stderr validity in the stderr fallback · New Make Windows socketpair pipe ends directional · New Preserve negative uv_pipe errors during conversion · New Drop late writes after close without raising · New Use interlocked operations for handle counters · New Preserve Windows command quoting when launching subprocesses · New
What changed in this PR
This PR extends uvloop’s libuv-backed asyncio implementation with native Windows build and runtime paths, addressing the long-standing Windows support requests.
Changes:
- Adds Windows compilation of bundled libuv and removes the installation restriction.
- Introduces Windows-specific subprocess, stream, polling, signal, DNS, and error handling.
- Adds Windows CI jobs and adapts platform-dependent tests.
| File | Description |
|---|---|
uvloop/server.pyx |
Uses the cached asyncio cancellation exception. |
uvloop/loop.pyx |
Adds Windows subprocess, socket, and signal paths. |
uvloop/loop.pyi |
Modernizes type annotation syntax. |
uvloop/includes/uv.pxd |
Adds libuv pipe and Windows process declarations. |
uvloop/includes/system.pxd |
Adds Windows compatibility declarations and counter helpers. |
uvloop/includes/stdlib.pxi |
Caches Windows-related constants and standard-library helpers. |
uvloop/includes/python.pxd |
Adds a comment-only frame-helper TODO. |
uvloop/includes/fork_handler.h |
Guards pthread use and adds a Windows stub. |
uvloop/includes/compat.h |
Adds Windows wrappers, platform flags, and stdio checks. |
uvloop/handles/stream.pyx |
Adapts stream writes and pipe reads for Windows. |
uvloop/handles/process.pyx |
Adds Windows startup information and pipe-based subprocess stdio. |
uvloop/handles/process.pxd |
Updates subprocess signatures for startup information. |
uvloop/handles/poll.pyx |
Switches to socket-aware polling initialization. |
uvloop/handles/fsevent.pyx |
Removes an extra blank line. |
uvloop/errors.pyx |
Adds Windows error-code and DNS-message handling. |
uvloop/dns.pyx |
Adds Windows address-conversion and hostname handling. |
uvloop/_testbase.py |
Adds Windows detection and platform-aware test setup. |
tests/test_unix.py |
Skips Unix socket tests on Windows and reformats code. |
tests/test_udp.py |
Adds Windows skips and loop-policy selection. |
tests/test_testbase.py |
Reformats existing test-helper assertions. |
tests/test_sourcecode.py |
Simplifies subprocess output capture and formatting. |
tests/test_sockets.py |
Adds Windows-specific skips and loop-policy selection. |
tests/test_signals.py |
Adapts signal expectations and skips for Windows. |
tests/test_runner.py |
Reformats existing runner tests. |
tests/test_regr1.py |
Reformats multiprocessing regression tests. |
tests/test_process_spawning.py |
Selects Windows C-runtime process functions. |
tests/test_pipes.py |
Skips unsupported Windows pipe and terminal cases. |
tests/test_libuv_api.py |
Reorders imports only. |
tests/test_fs_event.py |
Adds a Windows file-change test skip. |
tests/test_executors.py |
Simplifies iteration and reformats existing tests. |
tests/test_dns.py |
Adds Windows skips for address-result comparisons. |
tests/test_dealloc.py |
Reformats subprocess calls and assertions. |
tests/test_cython.py |
Simplifies coroutine-name assertions and reorders imports. |
tests/test_context.py |
Adapts transport context tests for Windows. |
tests/test_base.py |
Guards fcntl use and adjusts timer-test skips. |
tests/test_aiohttp.py |
Adds Windows loop-policy selection and simplifies client code. |
tests/__main__.py |
Enables multiprocessing freeze support on Windows. |
setup.py |
Adds Windows compiler settings, libraries, and libuv sources. |
pyproject.toml |
Comments out license classifiers. |
.github/workflows/tests.yml |
Adds Windows jobs and adjusts matrix/debug-build coverage. |
Review effort: Max
… on Windows' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* fix more code based on copilot's suggestions * isolate _libuv_autogen away from windows * resize variables in the compat write function and in uv_fileno * add _conn_lost counter instead of rasing a runtime error * ensure posix is set to false * escape backslashes before splitting shell code into tokens * throw error if uv_pipe fails while using __socketpair()
…more notes than winloop had about it.
…tead of shlex (#19) * implement a better shell parser for preventing shell corruption on windows * Used a Python wrapper around `CommandLineToArgvW` instead. * reformat code
|
@fantix I made a pretty unique change that involves using |


This is a redo of my older Pull Request from earlier this year. I want to still thank everybody for staying hyped and keeping me involved.
Let us finish what @1st1 started 10 years ago. My plans after this is merged is to start bringing as many optimizations from winloop to this library as I can, after that
winloopwill begin starting it's deprecation process until eventually it just installsuvloopas a dependency and then thewinlooprepo will be archived.closes #14
closes #536
closes #652
closes #62