Skip to content

mkio 1.1.0

Choose a tag to compare

@markuskimius markuskimius released this 14 Sep 00:46
· 8 commits to main since this release

mkio 1.1.0 adds the top-level event_loop config key and runs on asyncio's selector loop on Windows by default. A minor release: an addition to the config format, no change to the wire protocol, CLI, clients, expression language or on-disk layout.

Added

  • event_loop config key: "auto" (default), "selector", "proactor" (Windows only, for servers that need more than the 512 sockets select() handles there) or "uvloop". "proactor" is refused at config load anywhere but Windows.
  • mkio.app.loop_factory(event_loop, platform) resolves the key: uvloop where installed, else the selector loop on Windows, else asyncio's default.

Changed

  • MkioApp.run() builds its loop through asyncio.Runner(loop_factory=...). uvloop is no longer installed as a process-wide policy (set_event_loop_policy is deprecated in Python 3.14), so a plain asyncio.new_event_loop() after run() is still asyncio's own.

Fixed

  • On Windows, run() printed a ConnectionResetError: [WinError 10054] traceback for every connection a browser opened ahead of a page load and dropped. The Proactor loop tears a transport down with a shutdown() the peer's reset makes Windows refuse; the selector loop closes the socket quietly. The server kept working either way; the noise was the bug.

Install: pip install mkio==1.1.0 — https://pypi.org/project/mkio/1.1.0/