diff --git a/.github/workflows/ci_static-analysis.yaml b/.github/workflows/ci_static-analysis.yaml index 8230a8f6..6b42c0f6 100644 --- a/.github/workflows/ci_static-analysis.yaml +++ b/.github/workflows/ci_static-analysis.yaml @@ -28,7 +28,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.10' - run: | python -m pip install --upgrade pip pip install --upgrade -r dev_requirements/ci-requirements.txt diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 9d508e33..1fe313d5 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -18,11 +18,8 @@ jobs: # x86 builds are only meaningful for Windows - os: windows-latest architecture: x86 - - os: macos-13 - architecture: x64 + - os: macos-14 python: - - 3.8 - - 3.9 - "3.10" - "3.11" - "3.12" diff --git a/.github/workflows/python-examples.yml b/.github/workflows/python-examples.yml index 8986644a..0f79b6cf 100644 --- a/.github/workflows/python-examples.yml +++ b/.github/workflows/python-examples.yml @@ -9,12 +9,8 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12'] include: - - python-version: '3.8' - tox-env: 'py38-examples' - - python-version: '3.9' - tox-env: 'py39-examples' - python-version: '3.10' tox-env: 'py310-examples' - python-version: '3.11' diff --git a/.github/workflows/python-integration.yml b/.github/workflows/python-integration.yml index 2a400f52..5f9147dd 100644 --- a/.github/workflows/python-integration.yml +++ b/.github/workflows/python-integration.yml @@ -9,12 +9,8 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12'] include: - - python-version: '3.8' - tox-env: 'py38-integ' - - python-version: '3.9' - tox-env: 'py39-integ' - python-version: '3.10' tox-env: 'py310-integ' - python-version: '3.11' diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 82c9c983..9fa906b7 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,7 +9,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.8" + python: "3.10" # Build documentation in the doc/ directory with Sphinx sphinx: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 61fc67e9..8bb55522 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,7 @@ Changelog Deprecation ----------- +* The AWS Encryption SDK CLI no longer supports Python < 3.10 as of major version 4.3.x; only Python 3.10+ is supported. * Removed ``pkg_resources`` in favor of ``importlib.metadata`` `#428 `_ diff --git a/README.rst b/README.rst index f978a199..57c68e22 100644 --- a/README.rst +++ b/README.rst @@ -44,7 +44,7 @@ Getting Started Required Prerequisites ====================== -* Python 3.8+ +* Python 3.10+ * aws-encryption-sdk >= 3.1.0 Installation diff --git a/api_compatibility_tests/setup.py b/api_compatibility_tests/setup.py index f32d4a19..3b2cd339 100644 --- a/api_compatibility_tests/setup.py +++ b/api_compatibility_tests/setup.py @@ -46,16 +46,10 @@ def get_requirements(): "Natural Language :: English", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Security", "Topic :: Security :: Cryptography", diff --git a/dev_requirements/linter-requirements.txt b/dev_requirements/linter-requirements.txt index 3c0b55da..0eea3531 100644 --- a/dev_requirements/linter-requirements.txt +++ b/dev_requirements/linter-requirements.txt @@ -1,13 +1,13 @@ -bandit==1.7.5 +bandit==1.9.2 black==22.8.0 doc8==1.0.0 -flake8==4.0.1 -flake8-docstrings==1.6.0 -flake8-print==4.0.0 +flake8==5.0.4 +flake8-docstrings==1.7.0 +flake8-print==5.0.0 isort==5.10.1 mock==4.0.3 -pyflakes==2.4.0 -pylint==2.12.2 +pyflakes==2.5.0 +pylint==3.0.3 pytest==7.4.0 pytest-cov==4.1.0 pytest-mock==3.11.1 diff --git a/examples/setup.py b/examples/setup.py index 4da279d4..8692980f 100644 --- a/examples/setup.py +++ b/examples/setup.py @@ -48,9 +48,6 @@ def get_requirements(): "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Security", diff --git a/setup.py b/setup.py index 258c1c87..29c21a4c 100644 --- a/setup.py +++ b/setup.py @@ -49,8 +49,6 @@ def get_requirements(): "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", diff --git a/src/aws_encryption_sdk_cli/internal/arg_parsing.py b/src/aws_encryption_sdk_cli/internal/arg_parsing.py index f87dde9b..8926458e 100644 --- a/src/aws_encryption_sdk_cli/internal/arg_parsing.py +++ b/src/aws_encryption_sdk_cli/internal/arg_parsing.py @@ -664,6 +664,6 @@ def parse_args(raw_args=None): if parsed_args.caching is not None: parsed_args.caching = _process_caching_config(parsed_args.caching) except ParameterParseError as error: - parser.error(*error.args) + parser.error(*error.args) # pylint: disable=no-value-for-parameter return parsed_args diff --git a/src/aws_encryption_sdk_cli/internal/io_handling.py b/src/aws_encryption_sdk_cli/internal/io_handling.py index e3bdc88f..fad76647 100644 --- a/src/aws_encryption_sdk_cli/internal/io_handling.py +++ b/src/aws_encryption_sdk_cli/internal/io_handling.py @@ -374,7 +374,7 @@ def process_single_file(self, stream_args, source, destination): operation_result = OperationResult.FAILED raise finally: - if operation_result.needs_cleanup and destination != "-": # pylint: disable=no-member + if operation_result.needs_cleanup and destination != "-": # pylint:disable=no-member,used-before-assignment _LOGGER.warning("Operation failed: deleting output file: %s", destination) try: os.remove(destination) diff --git a/src/aws_encryption_sdk_cli/internal/master_key_parsing.py b/src/aws_encryption_sdk_cli/internal/master_key_parsing.py index c273e68e..c5bc4711 100644 --- a/src/aws_encryption_sdk_cli/internal/master_key_parsing.py +++ b/src/aws_encryption_sdk_cli/internal/master_key_parsing.py @@ -47,7 +47,7 @@ def _discover_entry_points(): _LOGGER.debug("Discovering master key provider plugins") for dist in distributions(): - dist_name = dist.metadata.get("Name") or dist.metadata.get("name") or "unknown" + dist_name = dist.metadata['Name'] or dist.metadata['name'] or "unknown" for entry_point in dist.entry_points: if entry_point.group != MASTER_KEY_PROVIDERS_ENTRY_POINT: diff --git a/src/pylintrc b/src/pylintrc index 2116655c..cf052ecb 100644 --- a/src/pylintrc +++ b/src/pylintrc @@ -1,4 +1,5 @@ [MESSAGES CONTROL] +errors-only = yes # Disabling messages that we either don't care about # for tests or are necessary to break for tests. disable = diff --git a/test/pylintrc b/test/pylintrc index 71b8420d..87fcba1f 100644 --- a/test/pylintrc +++ b/test/pylintrc @@ -1,4 +1,5 @@ [MESSAGES CONTROL] +errors-only = yes # Disabling messages that we either don't care about # for tests or are necessary to break for tests. # diff --git a/tox.ini b/tox.ini index 4204b64d..3f052ddb 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{38,39,310,311,312}-{local,integ,examples}, + py{310,311,312}-{local,integ,examples}, mypy-py{3}, bandit, doc8, readme, docs, flake8{,-tests,-examples}, pylint{,-tests,-examples},