Skip to content

Python extensions that print very long build logs to stdout causes poetry install to hang  #7698

@fzahle

Description

@fzahle

Issue

I have a package with an extension I compile with CMake via build.py, which happens to produce an enormous amount of warnings. The code compiles fine, and executing poetry build works, but poetry install hangs during the call to the build.py script. I've isolated the problem to this change by @dimbleby: 012fcb9#diff-a0b29e9c4cccbaeea08eefe3abe15e6cffe0fdcb998ad87a4a39bfeaa5aec27fR1540 where stdout=subprocess.PIPE was added to the subprocess call. I believe the issue is exactly what is written in the warning box of the subprocess.call doc string (https://docs.python.org/3/library/subprocess.html#subprocess.call), that using PIPE can fill the OS pipe buffer causing the process not to return. Indeed, removing subprocess.PIPE from the subprocess call in L1540 fixes the problem.

In the gist the problem can be reproduced with a very simple example where build.py prints 10000 lines. Changing it to print only 10 lines install works.

I've also reproduced the issue in a Docker container. I used quay.io/pypa/manylinux2014_x86_64:latest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/installerRelated to the dependency installerkind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions