MagicStack / MagicStack/uvloop
Empty output when calling Snap command
Open
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
PYTHONASYNCIODEBUGin env?: Yes - Does uvloop behave differently from vanilla asyncio? How?: When calling
helm versionviaasyncio.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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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