Removing unnecessary dependencies from requirements file #416
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thierPython installation from installing the AWS CLI. We use boto3 in
only one place, which is to get the region_name from
boto3.session.Sessionwhich 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: Thesepackages 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'tuse 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 dependencysix: Reducing the specificity of version requirement~=: Using this operator in order to accept to a compatible minor/patch versionbut preventing a major version change.
Testing:
make prandmake testpass. Built a tar.gz distribution usingpython setup.py sdistand installed it in a clean virtualenvsuccessfully. 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.