MagicStack / MagicStack/uvloop

Empty output when calling Snap command

Open
#457 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Cython
Stars
11.9k
Forks
616
PR merge metrics
No merged PRs in 30d

Description

  • uvloop version: 0.16.0
  • Python version: 3.8.10
  • Platform: Ubuntu 20.04.3
  • Helm version: v3.7.0
  • Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: Yes
  • Does uvloop behave differently from vanilla asyncio? How?: When calling helm version via asyncio.create_subprocess_exec, vanilla asyncio displays the correct result, while uvloop returns empty stdout.

Steps to reproduce:

Download Helm CLI

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh --version v3.7.0

Run the following Python script

import uvloop

async def _async_helm():
    proc = await asyncio.create_subprocess_exec('helm', 'version', stdout=asyncio.subprocess.PIPE)
    stdout, _ = await proc.communicate()
    print(stdout)

asyncio.run(_async_helm())
# Prints b'version.BuildInfo{Version:"v3.7.0", GitCommit:"eeac83883cb4014fe60267ec6373570374ce770b", GitTreeState:"clean", GoVersion:"go1.16.8"}\n'

uvloop.install()

asyncio.run(_async_helm())
# Prints b''

Contributor guide

No contributing guide indexed for this repository

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 the provided Python reproducer using asyncio.create_subprocess_exec and compare its output with and without uvloop.install() on Ubuntu 20.04. Investigate the subprocess path responsible for captured stdout; done when calling helm version through uvloop returns the same non-empty stdout as vanilla asyncio.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.