Skip to content

Commit

Permalink
Merge pull request #385 from MVrachev/exception-doc
Browse files Browse the repository at this point in the history
Drop python3.6 and make simplifications
  • Loading branch information
lukpueh committed Feb 3, 2022
2 parents 602d3fc + 878897d commit 812fff2
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
# Run tests on each OS/Python combination
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
# TODO: Add windows-latest when gpg issues are solved
os: [ubuntu-latest, macos-latest]
toxenv: [py]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# 1. Use this script to create a pinned requirements file for each Python
# version
# ```
# for v in 3.6 3.7 3.8 3.9; do
# for v in 3.7 3.8 3.9; do
# mkvirtualenv sslib-env-${v} -p python${v};
# pip install pip-tools;
# pip-compile --no-header -o requirements-${v}.txt requirements.txt;
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
Expand All @@ -101,7 +100,7 @@
'Source': 'https://github.com/secure-systems-lab/securesystemslib',
'Issues': 'https://github.com/secure-systems-lab/securesystemslib/issues',
},
python_requires = "~=3.6",
python_requires = "~=3.7",
extras_require = {
'colors': ['colorama>=0.3.9'],
'crypto': ['cryptography>=3.3.2'],
Expand Down
3 changes: 0 additions & 3 deletions tests/test_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ def _is_supported_combination(library, algorithm):
if algorithm in blake_algos:
if library == 'pyca_crypto':
return False
# hashlib does not support blake2* if < 3.6
elif library == 'hashlib' and sys.version_info[:2] < (3, 6):
return False
return True


Expand Down
13 changes: 1 addition & 12 deletions tests/test_signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,7 @@
import securesystemslib.formats
import securesystemslib.keys as KEYS
from securesystemslib.exceptions import FormatError, UnsupportedAlgorithmError

# TODO: Remove case handling when fully dropping support for versions < 3.6
IS_PY_VERSION_SUPPORTED = sys.version_info >= (3, 6)

# Use setUpModule to tell unittest runner to skip this test module gracefully.
def setUpModule():
if not IS_PY_VERSION_SUPPORTED:
raise unittest.SkipTest("requires Python 3.6 or higher")

# Since setUpModule is called after imports we need to import conditionally.
if IS_PY_VERSION_SUPPORTED:
from securesystemslib.signer import Signature, SSlibSigner
from securesystemslib.signer import Signature, SSlibSigner


class TestSSlibSigner(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = mypy, py36, py37, py38, py39, py310, purepy38, py38-no-gpg
envlist = mypy, py37, py38, py39, py310, purepy38, py38-no-gpg
skipsdist = True

[testenv]
Expand Down

0 comments on commit 812fff2

Please sign in to comment.