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

Add format_command_args(). #6290

Merged
merged 4 commits into from Feb 24, 2019

Conversation

Projects
None yet
2 participants
@cjerdonek
Copy link
Member

commented Feb 22, 2019

This PR does mainly two things:

  1. It refactors out from call_subprocess() a simple helper function to format command arguments for display. I called this function format_command_args(). This lets us use this function in the recently created function get_legacy_build_wheel_path(), which I have done in this PR (resulting in a nicer display for that function). Refactoring the function out also (1) makes call_subprocess() simpler, and (2) makes it easier to test the functionality (tests were also added).

  2. It simplifies the implementation using shlex.quote() -- also making it copy-pasteable.

The PR is broken up into separate commits, each of which does something different. For example, simplifying the implementation is done in its own commit.

@cjerdonek cjerdonek added this to the Print Better Error Messages milestone Feb 22, 2019

@cjerdonek cjerdonek force-pushed the cjerdonek:add-format-command branch from 8453d62 to 1c144bb Feb 22, 2019

@cjerdonek cjerdonek force-pushed the cjerdonek:add-format-command branch from 1c144bb to 87f0539 Feb 22, 2019

@pradyunsg

This comment has been minimized.

Copy link
Member

commented Feb 24, 2019

Super clean PR! I learnt stuff here @cjerdonek. :)

@cjerdonek

This comment has been minimized.

Copy link
Member Author

commented Feb 24, 2019

Aw, thank you! 😊

@cjerdonek cjerdonek merged commit b882399 into pypa:master Feb 24, 2019

29 checks passed

Linux Build #20190222.3 succeeded
Details
Linux (Package) Package succeeded
Details
Linux (Test Primary Python27) Test Primary Python27 succeeded
Details
Linux (Test Primary Python36) Test Primary Python36 succeeded
Details
Linux (Test Secondary Python34) Test Secondary Python34 succeeded
Details
Linux (Test Secondary Python35) Test Secondary Python35 succeeded
Details
Linux (Test Secondary Python37) Test Secondary Python37 succeeded
Details
Windows Build #20190222.3 succeeded
Details
Windows (Package) Package succeeded
Details
Windows (Test Primary Python27-x64) Test Primary Python27-x64 succeeded
Details
Windows (Test Primary Python36-x64) Test Primary Python36-x64 succeeded
Details
Windows (Test Secondary Python27-x86) Test Secondary Python27-x86 succeeded
Details
Windows (Test Secondary Python34-x64) Test Secondary Python34-x64 succeeded
Details
Windows (Test Secondary Python34-x86) Test Secondary Python34-x86 succeeded
Details
Windows (Test Secondary Python35-x64) Test Secondary Python35-x64 succeeded
Details
Windows (Test Secondary Python35-x86) Test Secondary Python35-x86 succeeded
Details
Windows (Test Secondary Python36-x86) Test Secondary Python36-x86 succeeded
Details
Windows (Test Secondary Python37-x64) Test Secondary Python37-x64 succeeded
Details
Windows (Test Secondary Python37-x86) Test Secondary Python37-x86 succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
macOS Build #20190222.3 succeeded
Details
macOS (Package) Package succeeded
Details
macOS (Test Primary Python27) Test Primary Python27 succeeded
Details
macOS (Test Primary Python36) Test Primary Python36 succeeded
Details
macOS (Test Secondary Python34) Test Secondary Python34 succeeded
Details
macOS (Test Secondary Python35) Test Secondary Python35 succeeded
Details
macOS (Test Secondary Python37) Test Secondary Python37 succeeded
Details
news-file/pr News files updated and/or change is trivial.
Details

@cjerdonek cjerdonek deleted the cjerdonek:add-format-command branch Feb 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.