poetry icon indicating copy to clipboard operation
poetry copied to clipboard

I want the `poetry add` command to output information to the log so that it can be seen that the wheel file is being built.

Open yuji38kwmt opened this issue 1 year ago • 2 comments

Issue Kind

Change in current behaviour

Description

$ python --version
Python 3.12.4
$ poetry --version
Poetry (version 1.8.4)

For pandas 2.0.1, there is no wheel file built with Python 3.12.

https://pypi.org/project/pandas/2.0.1/#files

Therefore, poetry tries to build a wheel file with Python 3.12. But the log only shows "Preparing...", so it is not clear that poetry build a wheel file. This message alone doesn't tell me why it's taking so long.

$ poetry add "pandas=2.0.1"

Updating dependencies
Resolving dependencies... (0.1s)

Package operations: 0 installs, 1 update, 0 removals

  - Downgrading pandas (2.0.3 -> 2.0.1): Preparing...

I would like a message like "Building a wheel file" to be output to the log.

Impact

Once users know what you're building, users can take action, such as changing the version of Pandas you're using.

Workarounds

When adding the "-vvv" option, the message "Getting build dependencies for wheel..." will be output to the log.

$ poetry add "pandas=2.0.1" -vvv

[build:build] Getting build dependencies for wheel...

yuji38kwmt avatar Nov 22 '24 02:11 yuji38kwmt

@radoering @yuji38kwmt I'd like to have a go at it

ghost avatar Jan 12 '25 12:01 ghost

@yuji38kwmt isn't this already the case? The message "Preparing ..." is shown when a wheel is being prepared (ie. built).

https://github.com/python-poetry/poetry/blob/bd500dd3bdfaec3de6894144c9cedb3a9358be84/src/poetry/installation/executor.py#L587-L610

https://github.com/python-poetry/poetry/blob/bd500dd3bdfaec3de6894144c9cedb3a9358be84/src/poetry/installation/executor.py#L707-L714

abn avatar Jan 12 '25 20:01 abn

Agree with this. Facing a similar issue where I have a slow (7 min) build on a gh actions runner, but even with -vvv there's no output to actually tell me which wheel this is.

All I see is [build:build] Building wheel...

jaymegordo avatar Jan 15 '25 22:01 jaymegordo

@yuji38kwmt isn't this already the case? The message "Preparing ..." is shown when a wheel is being prepared (ie. built).

No, that's not the case. The message "Preparing ..." alone does not make it clear whether a wheel file is being built. I thought it was taking time to download the wheel file.

yuji38kwmt avatar Jan 23 '25 02:01 yuji38kwmt

@radoering , @yuji38kwmt , @python-poetry/triage, if this issue hasn't been addressed yet, I would be interested in working on it!

rbogart1990 avatar May 16 '25 19:05 rbogart1990

@radoering , @yuji38kwmt , @python-poetry/triage, I opened a pull request that addresses this issue. Please review and let me know if you have any feedback!

https://github.com/python-poetry/poetry/pull/10404

rbogart1990 avatar May 20 '25 15:05 rbogart1990

Hi @radoering and @yuji38kwmt , I wanted to follow up on my PR, which I opened about a week ago and hasn't been reviewed yet. Do you know if there is a particular maintainer that I should tag in order to get it looked at?

This is my first contribution for the poetry project, so I'm not entirely sure what the usual process or review timeline looks like. Happy to make any changes if needed, just let me know!

rbogart1990 avatar May 27 '25 15:05 rbogart1990

I will try to take a look at the end of the week.

radoering avatar May 27 '25 16:05 radoering

@radoering , thank you very much!

rbogart1990 avatar May 27 '25 16:05 rbogart1990

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[bot] avatar Jul 08 '25 00:07 github-actions[bot]