Improve log output when building wheel from source#10404
Improve log output when building wheel from source#10404radoering merged 12 commits intopython-poetry:mainfrom
Conversation
Reviewer's GuideThis PR replaces the generic “Preparing…” log messages in wheel‐building workflows with a new descriptive formatter that includes Python version, platform, and architecture (using fallbacks when needed), and adds unit tests for the new utility. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @rbogart1990 - I've reviewed your changes - here's some feedback:
- Consider including package.full_pretty_version in the log output so it shows exactly which version (e.g. demo-1.2.3) is being built.
- Remove the leading space inside format_build_wheel_log’s return value and let the caller handle spacing to keep formatting consistent.
- Rename the local variable
platformin format_build_wheel_log to avoid shadowing the stdlib module and improve clarity.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
@Secrus , all tests are passing now. The PR is ready for review. Please let me know if you'd like me to make any changes! |
radoering
left a comment
There was a problem hiding this comment.
Looks good in general. It think text for reason has to be adapted somehow + some minor nitpicks regarding the test (see separate comments).
The format of the message (e.g.,
@unknown-versionvs<unknown-version>) is open to feedback if others have a preference.
I prefer <unknown-version>.
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
This PR improves the log output when building a wheel file from source. Previously, the log message showed a generic:
This change replaces that message with a more descriptive log line that includes environment-specific details like the Python version, platform, and system architecture. This helps users understand why a package is being built from source (e.g., due to lack of a compatible prebuilt wheel).
Example new output:
Implementation Notes
format_build_wheel_log()inpoetry/utils/logging.pyEnvobject<unknown>are used if these values can't be resolved.Open Questions
@unknown-versionvs<unknown-version>) is open to feedback if others have a preference.Pull Request Check List
Resolves: #9865
Summary by Sourcery
Improve wheel build logging by showing detailed environment context when no prebuilt wheel is available.
Enhancements:
Tests: