Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
fzahle opened this issue Mar 21, 2023 · 3 comments · Fixed by #7699
Closed
Labels
area/installer Related to the dependency installer kind/bug Something isn't working as expected

Comments

@fzahle
Copy link
Contributor

fzahle commented Mar 21, 2023

  • Poetry version: 1.4.1

  • Python version: 3.11.2 (Homebrew)

  • OS version and name: macOS 12.2.1

  • pyproject.toml: https://gist.github.com/fzahle/3f0ae0237b325e736246bd467e56e6d5

  • [ x] I am on the latest stable Poetry version, installed using a recommended method.

  • [x ] I have searched the issues of this repo and believe that this is not a duplicate.

  • [x ] I have consulted the FAQ and blog for any relevant entries or release notes.

  • [x ] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

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.

@fzahle fzahle added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Mar 21, 2023
@dimbleby
Copy link
Contributor

not sure why you've summoned me, I don't seem to have had anything to do with that change!

either way, I expect a pull request would be welcome

@fzahle
Copy link
Contributor Author

fzahle commented Mar 21, 2023

not sure why you've summoned me, I don't seem to have had anything to do with that change!

either way, I expect a pull request would be welcome

you're right, it was someone else, got my open tabs mixed up.

@radoering radoering added area/installer Related to the dependency installer and removed status/triage This issue needs to be triaged labels Mar 22, 2023
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/installer Related to the dependency installer kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants