From 5dc679e0eaaa1af450898cc4c73a654ab264937a Mon Sep 17 00:00:00 2001 From: Tony Locke Date: Sun, 30 Jul 2023 08:31:49 +0100 Subject: [PATCH] Remove support for Python 3.7 --- .github/workflows/test.yml | 4 ++-- pyproject.toml | 5 ++--- scramp/__init__.py | 7 ++----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b932f9..fc47f23 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11"] container: python:${{ matrix.python-version }} @@ -35,7 +35,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.11" - uses: actions/checkout@v3 - name: Install dependencies run: | diff --git a/pyproject.toml b/pyproject.toml index ad21093..8d71368 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta" name = "scramp" description = "An implementation of the SCRAM protocol." readme = "README.rst" -requires-python = ">=3.7" +requires-python = ">=3.8" keywords = ["SCRAM", "authentication", "SASL"] license = {text = "MIT No Attribution"} classifiers = [ @@ -18,10 +18,10 @@ classifiers = [ "License :: OSI Approved :: MIT No Attribution License (MIT-0)", "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 :: 3.11", "Programming Language :: Python :: Implementation", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", @@ -29,7 +29,6 @@ classifiers = [ ] dependencies = [ "asn1crypto >= 1.5.1", - 'importlib-metadata >= 1.0 ; python_version < "3.8"', ] dynamic = ["version"] diff --git a/scramp/__init__.py b/scramp/__init__.py index e7a71b0..8bfbcd2 100644 --- a/scramp/__init__.py +++ b/scramp/__init__.py @@ -1,3 +1,5 @@ +from importlib.metadata import version + from scramp.core import ( ScramClient, ScramException, @@ -7,9 +9,4 @@ __all__ = [ScramClient, ScramMechanism, ScramException, make_channel_binding] -try: - from importlib.metadata import version -except ImportError: - from importlib_metadata import version - __version__ = version("scramp")