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

fix: Pass script_runner commands as a single sequence #2221

Merged
merged 2 commits into from
May 23, 2023

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented May 23, 2023

Description

  • Require pytest-console-scripts v1.4.0+ in test extra. pytest-console-scripts v1.4.0 introduces a DeprecationWarning:

script_runner commands should be passed as a single sequence, not as multiple arguments.
Replace script_runner.run(a, b, c) calls with script_runner.run([a, b, c])

  • Remove unpacking of the command to be passed to script_runner with shlex.split to pass a list and not multiple arguments.

Checklist Before Requesting Reviewer

  • Tests are passing
  • "WIP" removed from the title of the pull request
  • Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • Summarize commit messages into a comprehensive review of the PR
* Require pytest-console-scripts v1.4.0+ in 'test' extra. pytest-console-scripts v1.4.0
  introduces a DeprecationWarning:
  > script_runner commands should be passed as a single sequence, not as multiple arguments.
  > Replace `script_runner.run(a, b, c)` calls with `script_runner.run([a, b, c])`
* Remove unpacking of the command to be passed to script_runner with shlex.split
  to pass a list and not multiple arguments.

* pytest-console-scripts v1.4.0 introduces

DeprecationWarning: script_runner commands should be passed as a single sequence, not as multiple arguments.
Replace `script_runner.run(a, b, c)` calls with `script_runner.run([a, b, c])`
@matthewfeickert matthewfeickert added tests pytest fix A bug fix need-to-backport tmp label until can be backported to patch release branch labels May 23, 2023
@matthewfeickert matthewfeickert self-assigned this May 23, 2023
@matthewfeickert matthewfeickert added the build Changes that affect the build system or external dependencies label May 23, 2023
@codecov
Copy link

codecov bot commented May 23, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (a7e06c0) 98.30% compared to head (f6ff813) 98.30%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2221   +/-   ##
=======================================
  Coverage   98.30%   98.30%           
=======================================
  Files          69       69           
  Lines        4533     4533           
  Branches      802      802           
=======================================
  Hits         4456     4456           
  Misses         45       45           
  Partials       32       32           
Flag Coverage Δ
contrib 97.88% <ø> (ø)
doctest 61.08% <ø> (ø)
unittests-3.10 96.31% <ø> (ø)
unittests-3.11 96.31% <ø> (ø)
unittests-3.8 96.33% <ø> (ø)
unittests-3.9 96.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@matthewfeickert
Copy link
Member Author

I'm going to approve and merge this myself. As always, PRs approved by a single core dev can be reverted as needed by the rest of the dev team.

@matthewfeickert matthewfeickert merged commit 2219abf into main May 23, 2023
@matthewfeickert matthewfeickert deleted the fix/pytest-console-scripts-script-runner branch May 23, 2023 00:52
@matthewfeickert matthewfeickert removed the need-to-backport tmp label until can be backported to patch release branch label May 23, 2023
matthewfeickert added a commit that referenced this pull request May 23, 2023
* Backport PR #2221
* Require pytest-console-scripts v1.4.0+ in 'test' extra. pytest-console-scripts v1.4.0
  introduces a DeprecationWarning:
  > script_runner commands should be passed as a single sequence, not as multiple arguments.
  > Replace `script_runner.run(a, b, c)` calls with `script_runner.run([a, b, c])`
* Remove unpacking of the command to be passed to script_runner with shlex.split
  to pass a list and not multiple arguments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Changes that affect the build system or external dependencies fix A bug fix tests pytest
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant