Skip to content

warning: deprecation warning message - Python 2.7#1306

Merged
sriram-mv merged 2 commits intoaws:developfrom
sriram-mv:py27_deprecation
Aug 7, 2019
Merged

warning: deprecation warning message - Python 2.7#1306
sriram-mv merged 2 commits intoaws:developfrom
sriram-mv:py27_deprecation

Conversation

@sriram-mv
Copy link
Contributor

  • if AWS SAM CLI is installed under python2.7 environment, there is a
    warning which says that AWS SAM CLI will no longer be installable
    under python2.7 from October 1st 2019.

Issue #, if available:

Description of changes:

Checklist:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sriram-mv sriram-mv requested a review from sanathkr July 30, 2019 23:02
Copy link
Contributor

@sanathkr sanathkr left a comment

Choose a reason for hiding this comment

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

Actually.. does it make sense add this to main.py instead? Telemetry message is there. It will be good to centralize the prompt messages in one place.

@sriram-mv
Copy link
Contributor Author

Moving to main.py only prints the warning message on sub-commands eg: sam build, sam local invoke. and not on all commands. This way it prints it on all commands. even on info and version

(py2) ➜  aws-sam-cli git:(py27_deprecation) ✗ sam
Warning : AWS SAM CLI will no longer support installations on Python 2.7 starting on October 1st, 2019.

Usage: sam [OPTIONS] COMMAND [ARGS]...

  AWS Serverless Application Model (SAM) CLI

  The AWS Serverless Application Model extends AWS CloudFormation to provide
  a simplified way of defining the Amazon API Gateway APIs, AWS Lambda
  functions, and Amazon DynamoDB tables needed by your serverless
  application. You can find more in-depth guide about the SAM specification
  here: https://github.com/awslabs/serverless-application-model.

Options:
  --debug    Turn on debug logging to print debug message generated by SAM
             CLI.
  --version  Show the version and exit.
  --info
  --help     Show this message and exit.

Commands:
  logs      Fetch logs for a function
  deploy    Deploy an AWS SAM application. This is an alias for 'aws
            cloudformation deploy'.
  package   Package an AWS SAM application. This is an alias for 'aws
            cloudformation package'.
  publish   Publish a packaged AWS SAM template to the AWS Serverless
            Application Repository.
  init
  build     Build your Lambda function code
  validate  Validate an AWS SAM template.
  local     Run your Serverless application locally for...
(py2) ➜  aws-sam-cli git:(py27_deprecation) ✗ sam --version
Warning : AWS SAM CLI will no longer support installations on Python 2.7 starting on October 1st, 2019.

SAM CLI, version 0.19.0
(py2) ➜  aws-sam-cli git:(py27_deprecation) ✗ sam --info
Warning : AWS SAM CLI will no longer support installations on Python 2.7 starting on October 1st, 2019.

{
  "version": "0.19.0"
}

@sanathkr
Copy link
Contributor

Makes sense. Thanks for the clarification

Copy link
Contributor

@sanathkr sanathkr left a comment

Choose a reason for hiding this comment

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

🐍

@sriram-mv sriram-mv requested a review from jfuss August 6, 2019 19:08
- if AWS SAM CLI is installed under python2.7 environment, there is a
  warning which says that AWS SAM CLI will no longer be installable
  under python2.7 from October 1st 2019.
@sriram-mv
Copy link
Contributor Author

Just rebased it.

@sriram-mv sriram-mv merged commit 2d95111 into aws:develop Aug 7, 2019
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.

3 participants