Skip to content

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. #9865

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

Open
yuji38kwmt opened this issue Nov 22, 2024 · 9 comments · May be fixed by #10404
Labels
good first issue kind/feature Feature requests/implementations

Comments

@yuji38kwmt
Copy link

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 yuji38kwmt added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Nov 22, 2024
@radoering radoering added good first issue and removed status/triage This issue needs to be triaged labels Nov 22, 2024
@vaisakh-prod
Copy link

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

@abn
Copy link
Member

abn commented Jan 12, 2025

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

def _prepare_archive(
self, operation: Install | Update, *, output_dir: Path | None = None
) -> Path:
package = operation.package
operation_message = self.get_operation_message(operation)
message = (
f" <fg=blue;options=bold>-</> {operation_message}:"
" <info>Preparing...</info>"
)
self._write(operation, message)
assert package.source_url is not None
archive = Path(package.source_url)
if package.source_subdirectory:
archive = archive / package.source_subdirectory
if not Path(package.source_url).is_absolute() and package.root_dir:
archive = package.root_dir / archive
self._populate_hashes_dict(archive, package)
return self._chef.prepare(
archive, editable=package.develop, output_dir=output_dir
)

if archive.suffix != ".whl":
message = (
f" <fg=blue;options=bold>-</> {self.get_operation_message(operation)}:"
" <info>Preparing...</info>"
)
self._write(operation, message)
archive = self._chef.prepare(archive, output_dir=original_archive.parent)

@jaymegordo
Copy link

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...

@yuji38kwmt
Copy link
Author

@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.

@rbogart1990
Copy link

rbogart1990 commented May 16, 2025

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

@rbogart1990 rbogart1990 linked a pull request May 20, 2025 that will close this issue
2 tasks
@rbogart1990
Copy link

@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!

#10404

@rbogart1990
Copy link

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!

@radoering
Copy link
Member

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

@rbogart1990
Copy link

@radoering , thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue kind/feature Feature requests/implementations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants