Skip to content

Conversation

@sanathkr
Copy link
Contributor

@sanathkr sanathkr commented May 2, 2018

Issue #, if available:
Requirements file lists transitive dependencies of boto3 and not the own dependencies. This makes pip install fail in several of my machines because older version of these libraries were already installed.

Description of changes:
boto3: Many users might have this library already available in thier
Python installation from installing the AWS CLI. We use boto3 in
only one place, which is to get the region_name from boto3.session.Session
which hasn't changed since 2016. Updating the requirement to depend on
boto3 >=1.5.0 allows us to be compatible with existing installations that
might already have an older version of boto3

botocore, docutils, futures, jmespath, python-dateutil, s3transfer: These
packages are not used in the SAM translator but come as a dependency through
boto3. Hence removing the direct dependency.

functools32: Grepped for every single method offered by this package. We don't
use any of it directly within SAM Translator. This might have come as a
dependency through boto3.

PyYAML: Only required by the tests. So moving to dev dependency

six: Reducing the specificity of version requirement

~=: Using this operator in order to accept to a compatible minor/patch version
but preventing a major version change.

Testing:

  • make pr and make test pass. Built a tar.gz distribution using
    python setup.py sdist and installed it in a clean virtualenv
    successfully. Tests ran successfully too. I was also able to import

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

`boto3`: Many users might have this library already available in thier
Python installation from installing the AWS CLI. We use boto3 in
only one place, which is to get the region_name from `boto3.session.Session`
which hasn't changed since 2016. Updating the requirement to depend on
boto3 >=1.5.0 allows us to be compatible with existing installations that
might already have an older version of boto3

`botocore, docutils, futures, jmespath, python-dateutil, s3transfer`: These
packages are not used in the SAM translator but come as a dependency through
boto3. Hence removing the direct dependency.

`functools32`: Grepped for every single method offered by this package. We don't
use any of it directly within SAM Translator. This might have come as a
dependency through boto3.

`PyYAML`: Only required by the tests. So moving to dev dependency

`six`: Reducing the specificity of version requirement

`~=`: Using this operator in order to accept to a compatible minor/patch version
but preventing a major version change.

**Testing**:
- `make pr` and `make test` pass. Built a tar.gz distribution using
  `python setup.py sdist` and installed it in a clean virtualenv
  successfully. Tests ran successfully too. I was also able to import
Copy link
Contributor

@jfuss jfuss left a comment

Choose a reason for hiding this comment

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

Nice! Like the ~= addition.

@sanathkr sanathkr merged commit 0bb8ef7 into aws:develop May 3, 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.

3 participants