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

Don't use py3.5+ only subprocess.run in python invoke local #5500

Merged
merged 1 commit into from Nov 19, 2018

Conversation

dschep
Copy link
Contributor

@dschep dschep commented Nov 16, 2018

What did you implement:

Fixes #5499

invoke local was changed in #5355 to check for a tty by calling the tty executable, but it was implemented with subprocess.run which was added in Python 3.5 so it doesn't work with Python 2.7 projects

How did you implement it:

Switched to the older subprocess.check_call

How can we verify it:

npm i -g serverless/serverless#fix-py27-invoke-local
sls create -t aws-python
sls invoke local -f hello

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@dschep
Copy link
Contributor Author

dschep commented Nov 16, 2018

@filanthropic mind testing this in the project you ran into #5499? Install as indicated in the PR description ☝️

Copy link
Contributor

@alexdebrie alexdebrie left a comment

Choose a reason for hiding this comment

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

LGTM. Tested sls invoke local with 1.33.1 and I got the error. Ran with this branch, and sls invoke local worked successfully.

@dschep dschep merged commit 3033540 into master Nov 19, 2018
@dschep dschep deleted the fix-py27-invoke-local branch November 19, 2018 14:18
dschep added a commit that referenced this pull request Nov 19, 2018
dschep added a commit that referenced this pull request Nov 19, 2018
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.

After upgrade to 1.33.1 Getting error on local invoke
2 participants