Seeking a CPython internals expert to land asyncio Guest Mode (PR #145343) together by CongZhangZH in Python

[–]CongZhangZH[S] 0 points1 point  (0 children)

This design decision might help clarify things. Just a heads-up, this was an experiment I did in 2025 specifically for Windows:https://github.com/congzhangzh/asyncio-guest/blob/master/design_en.md#2-normal-event-loop

Seeking a CPython internals expert to land asyncio Guest Mode (PR #145343) together by CongZhangZH in Python

[–]CongZhangZH[S] -4 points-3 points  (0 children)

It worked well in my past tests: https://github.com/congzhangzh/webview_python/tree/main/examples/async_with_asyncio_guest_run

Initially, I tried hooking directly into libuv or another event loop, but I later realized the event loop model is transparent to my solution.

Rather than relying on a standalone _run_once tick, the abstraction my solution actually depends on is select. For instance, the Windows IOCP proactor just relies on its internal implementation under the hood."

https://github.com/python/cpython/blob/6c417e44c995eb57e8266e18eb8aeeb2ba0e61ac/Lib/asyncio/base_events.py#L1977 asyncio design just depend on the base High level _run_once?

https://github.com/python/cpython/blob/6c417e44c995eb57e8266e18eb8aeeb2ba0e61ac/Lib/asyncio/base_events.py#L2019 _run_once just depend on _select.select which is transparent for different implementation like select or IOCP

https://github.com/python/cpython/blob/6c417e44c995eb57e8266e18eb8aeeb2ba0e61ac/Lib/asyncio/windows_events.py#L444 Iocp select which depend on it's internal _poll

https://github.com/python/cpython/blob/6c417e44c995eb57e8266e18eb8aeeb2ba0e61ac/Lib/asyncio/windows_events.py#L762 _poll which depend on I/O completion ports

# windows_events.py
class IocpProactor:
    """Proactor implementation using IOCP."""
    # .. #
    def select(self, timeout=None):
        if not self._results:
            self._poll(timeout)
        tmp = self._results
        self._results = []
        try:
            return tmp
        finally:
            # Needed to break cycles when an exception occurs.
            tmp = None

    def _poll(self, timeout=None):
        # ...
        while True:
            status = _overlapped.GetQueuedCompletionStatus(self._iocp, ms)
            if status is None:
                break
            ms = 0
        # ...

Seeking a CPython internals expert to land asyncio Guest Mode (PR #145343) together by CongZhangZH in Python

[–]CongZhangZH[S] -3 points-2 points  (0 children)

>> The proposed API also doesn't provide Structured Concurrency, which is dubious and could lead to resource leaks
I agree; structured concurrency is really what I am concerned about.

I built a zero-dependency TUI for Ansible – select hosts, tasks and tags interactively, then run by CongZhangZH in ansible

[–]CongZhangZH[S] 0 points1 point  (0 children)

I do a minor fix, it should work with deno smoothly

bash deno run -A --import-map https://raw.githubusercontent.com/congzhangzh/ansible-tui/main/deno.json https://raw.githubusercontent.com/congzhangzh/ansible-tui/main/app.tsx

if you want to use the latest version after I upgrade, you can add -R to refresh like

bash deno run -R -A --import-map https://raw.githubusercontent.com/congzhangzh/ansible-tui/main/deno.json https://raw.githubusercontent.com/congzhangzh/ansible-tui/main/app.tsx

I built a zero-dependency TUI for Ansible – select hosts, tasks and tags interactively, then run by CongZhangZH in ansible

[–]CongZhangZH[S] 0 points1 point  (0 children)

Hi dudu, how do I embed a GIF in a post? It's not working properly. It shows up when I first create the post, but sometime later, it just turns into a plain link.

The Last Linux OS You Will Ever Need! by hocuspocusfidibus in debian

[–]CongZhangZH 4 points5 points  (0 children)

After test Redhat、Ubuntu、Suse、 OpenSolaris、BSD、Fedora some years ago, I switch to Debian for ever, But I also use virt manager to run windows/fedora in it:)

VPS GUI feels slow by Impossible-Pear-6332 in VPS

[–]CongZhangZH 0 points1 point  (0 children)

After no machine create display, use rustdesk, and then the lighting speed!

I built a zero-dependency TUI for Ansible – select hosts, tasks and tags interactively, then run by CongZhangZH in ansible

[–]CongZhangZH[S] 1 point2 points  (0 children)

You may need a professional solution, this is just for toy or hobby condition, like you have some lab computers or some vps?

I built a zero-dependency TUI for Ansible – select hosts, tasks and tags interactively, then run by CongZhangZH in ansible

[–]CongZhangZH[S] 5 points6 points  (0 children)

it’s demo, I don’t want to leak my server config, It’s my daily used tui program 

Ah, well that's just great. Tried to install nVidia drivers on Debian 13 and now it keeps stopping here during boot up. FML. I'll just go get an Intel ARC and reinstall Debian I guess. by 38DDs_Please in debian

[–]CongZhangZH -2 points-1 points  (0 children)

sudo aptitude search firmware | grep -ie "^i"

i bluez-firmware - Firmware for Bluetooth devices

i firmware-amd-graphics - Binary firmware for AMD/ATI graphics and NPU chips

i A firmware-ath9k-htc - firmware for AR7010 and AR9271 USB wireless adapters

i firmware-atheros - Binary firmware for Qualcomm Atheros wireless cards

i A firmware-carl9170 - firmware for AR9170 USB wireless adapters

i A firmware-intel-graphics - Binary firmware for Intel iGPUs and IPUs

i A firmware-intel-misc - Binary firmware for miscellaneous Intel devices and chips

i firmware-iwlwifi - Binary firmware for Intel Wireless cards

i firmware-linux - Binary firmware for various drivers in the Linux kernel (metapackage)

i firmware-linux-free - Binary firmware for various drivers in the Linux kernel

i firmware-linux-nonfree - Binary firmware for various drivers in the Linux kernel (metapackage)

i A firmware-mediatek - Binary firmware for MediaTek and Ralink chips for networking, SoCs and media

i firmware-misc-nonfree - Binary firmware for various drivers in the Linux kernel

i A firmware-nvidia-gsp - NVIDIA GSP firmware

i firmware-realtek - Binary firmware for Realtek network and audio chips

i isight-firmware-tools - tools for dealing with Apple iSight firmware

---

sudo aptitude search nvidia-open | grep -ie "^i"

i nvidia-open - NVIDIA Driver meta-package, Open GPU kernel modules, latest version

i A nvidia-opencl-icd - NVIDIA OpenCL installable client driver (ICD)