Skip to content

Empty output when calling Snap command #457

@GlassOfWhiskey

Description

@GlassOfWhiskey
  • 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''

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions