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

Use POSIX shell rules for creating posargs string on non-Windows platforms #1336

Merged
merged 2 commits into from
Jun 5, 2019

Conversation

barneygale
Copy link

@barneygale barneygale commented Jun 5, 2019

subprocess.list2cmdline() uses Windows shell rules, which don't apply on Linux/Mac. This patch changes it to use pipes.quote() (py2) or shlex.quote() (py3)

Contribution checklist:

(also see CONTRIBUTING.rst for details)

  • wrote descriptive pull request text
  • added/updated test(s)
  • updated/extended the documentation
  • added relevant issue keyword
    in message body
  • added news fragment in changelog folder
    • fragment name: <issue number>.<type>.rst for example (588.bugfix.rst)
    • <type> is must be one of bugfix, feature, deprecation,breaking, doc, misc
    • if PR has no issue: consider creating one first or change it to the PR number after creating the PR
    • "sign" fragment with "by :user:<your username>"
    • please use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files - by :user:superuser."
    • also see examples
  • added yourself to CONTRIBUTORS (preserving alphabetical order)

@gaborbernat
Copy link
Member

Hello, thanks for the PR. Please add a changelog entry.

@barneygale barneygale force-pushed the master branch 3 times, most recently from c3e1793 to 165bd6e Compare June 5, 2019 15:23
barneygale added a commit to barneygale/tox that referenced this pull request Jun 5, 2019
@barneygale
Copy link
Author

I've completed the checklist except for docs, which I think might be unnecessary for this bugfix.

@barneygale barneygale changed the title [WIP] Use POSIX shell rules for creating posargs string on non-Windows platforms Use POSIX shell rules for creating posargs string on non-Windows platforms Jun 5, 2019
@gaborbernat
Copy link
Member

Please run tox -e fix_lint to fix linting issues and commit 👍

@barneygale
Copy link
Author

Lint issue looks like a CI setup issue to me: ModuleNotFoundError: No module named '_sqlite3'

@asottile
Copy link
Contributor

asottile commented Jun 5, 2019

@barneygale
Copy link
Author

Would someone be willing to run fix_lint on this patch? My distribution only has 3.5 in official repos, whereas black requires 3.6+. Otherwise I can look at getting pyenv working.

Copy link
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sad for the CI break
sad

but thank you for your contribution

thanks

@gaborbernat
Copy link
Member

@asottile so all projects using pre-commit are then broken in Azure Pipelines?

@asottile
Copy link
Contributor

asottile commented Jun 5, 2019

all projects using sqlite3 are currently broken for python3.5 and python3.7 on azure pipelines -- and yeah :/ pre-commit happens to use sqlite

@gaborbernat gaborbernat merged commit ef843dc into tox-dev:master Jun 5, 2019
@barneygale
Copy link
Author

Thanks for the review + merge. Can I ask when you might be making the next pypi release of tox?

@gaborbernat
Copy link
Member

Can do as soon as Azure gets better 👍 so maybe subscribe to https://github.com/microsoft/azure-pipelines-image-generation/issues/996 😄

@barneygale
Copy link
Author

Great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants