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
Contributor

@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

@gaborbernat gaborbernat commented Jun 5, 2019

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 Jun 5, 2019
barneygale added a commit to barneygale/tox that referenced this issue Jun 5, 2019
@barneygale
Copy link
Contributor Author

@barneygale barneygale commented Jun 5, 2019

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

@gaborbernat gaborbernat commented Jun 5, 2019

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

docs/changelog/1336.bugfix.rst Outdated Show resolved Hide resolved
@barneygale
Copy link
Contributor Author

@barneygale barneygale commented Jun 5, 2019

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

@asottile
Copy link
Member

@asottile asottile commented Jun 5, 2019

@barneygale
Copy link
Contributor Author

@barneygale barneygale commented Jun 5, 2019

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

Sad for the CI break
sad

but thank you for your contribution

thanks

@gaborbernat
Copy link
Member

@gaborbernat gaborbernat commented Jun 5, 2019

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

@asottile
Copy link
Member

@asottile 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
1 check was pending
@barneygale
Copy link
Contributor Author

@barneygale barneygale commented Jun 5, 2019

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

@gaborbernat
Copy link
Member

@gaborbernat gaborbernat commented Jun 5, 2019

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
Contributor Author

@barneygale barneygale commented Jun 5, 2019

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
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants