From d6d0320598238d250f464811bc0e24c323e2ea90 Mon Sep 17 00:00:00 2001 From: mattsb42-aws Date: Wed, 14 Feb 2018 15:12:32 -0800 Subject: [PATCH 1/4] removing unnecessary print statements in basic example --- examples/src/basic_encryption.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/examples/src/basic_encryption.py b/examples/src/basic_encryption.py index cf73bc83e..5c6d6c422 100644 --- a/examples/src/basic_encryption.py +++ b/examples/src/basic_encryption.py @@ -11,8 +11,6 @@ # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. """Example showing basic encryption and decryption of a value already in memory.""" -from __future__ import print_function - import aws_encryption_sdk @@ -35,7 +33,6 @@ def cycle_string(key_arn, source_plaintext, botocore_session=None): source=source_plaintext, key_provider=master_key_provider ) - print('Ciphertext: ', ciphertext) # Decrypt the ciphertext cycled_plaintext, decrypted_header = aws_encryption_sdk.decrypt( @@ -55,5 +52,3 @@ def cycle_string(key_arn, source_plaintext, botocore_session=None): pair in decrypted_header.encryption_context.items() for pair in encryptor_header.encryption_context.items() ) - - print('Decrypted: ', cycled_plaintext) From eb894c5815820011133d79b4b567fceef95ad69a Mon Sep 17 00:00:00 2001 From: mattsb42-aws Date: Wed, 14 Feb 2018 15:13:19 -0800 Subject: [PATCH 2/4] bumping flake8-print minimum version to version that finally fixed the pytest 3.0 integration --- tox.ini | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index 143e68c1c..fb28328a1 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,8 @@ envlist = py{27,34,35,36}-{local,integ,accept,examples}, bandit, doc8, readme, docs, - {flake8,pylint}{,-tests,-examples} + {flake8,pylint}{,-tests,-examples}, + vulture # Additional test environments: # vulture :: Runs vulture. Prone to false-positives. @@ -22,14 +23,15 @@ passenv = # Identifies AWS KMS key id to use in integration tests AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID \ # Pass through AWS credentials - AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN \ + # Pass through AWS profile name (useful for local testing) + AWS_PROFILE sitepackages = False deps = mock pytest>=3.3.1 pytest-cov pytest-mock - coverage commands = local: pytest --cov aws_encryption_sdk -m local -l {posargs} integ: pytest --cov aws_encryption_sdk -m integ -l {posargs} @@ -44,7 +46,8 @@ deps = flake8 flake8-docstrings flake8-import-order - flake8-print>=3.0.1 + # https://github.com/JBKahn/flake8-print/pull/30 + flake8-print>=3.1.0 commands = flake8 src/aws_encryption_sdk/ setup.py From 3aff0313b852ddc6e83e2d8580bd7838dd4367cd Mon Sep 17 00:00:00 2001 From: mattsb42-aws Date: Wed, 14 Feb 2018 15:13:44 -0800 Subject: [PATCH 3/4] disabling Bandit run in Travis pending resolution of https://bugs.launchpad.net/bandit/+bug/1749603 --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4f9efddeb..9aa2e548c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,8 +34,9 @@ matrix: env: TOXENV=py36-accept - python: 3.6 env: TOXENV=py36-examples - - python: 3.6 - env: TOXENV=bandit +# disabling Bandit run in Travis pending resolution of https://bugs.launchpad.net/bandit/+bug/1749603 +# - python: 3.6 +# env: TOXENV=bandit - python: 3.6 env: TOXENV=doc8 - python: 3.6 From 35d670ae1dd38d6191faca1c1f42da6bb8e89b96 Mon Sep 17 00:00:00 2001 From: mattsb42-aws Date: Wed, 14 Feb 2018 15:13:59 -0800 Subject: [PATCH 4/4] ignore pytest cache --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9285010d1..7d2d6d9d3 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ dist docs/build test/integration/test_values.conf .python-version +.pytest_cache