diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6cb3f47..0d27111 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -23,9 +23,6 @@ jobs: toxenv: - "pep8" include: - - python-version: "3.5" - os: ubuntu-20.04 - toxenv: py35 - python-version: "3.6" os: ubuntu-20.04 toxenv: py36 @@ -41,6 +38,12 @@ jobs: - python-version: "3.10" os: ubuntu-20.04 toxenv: py310 + - python-version: "3.11" + os: ubuntu-20.04 + toxenv: py311 + - python-version: "3.12.0-alpha - 3.12" + os: ubuntu-20.04 + toxenv: py312 - python-version: pypy3 os: ubuntu-20.04 toxenv: pypy3 diff --git a/setup.py b/setup.py index 892fd32..f5d3d7e 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,19 @@ -import imp +import importlib.machinery +import importlib.util import io from os import path from setuptools import find_packages, setup -VERSION = imp.load_source('version', path.join('.', 'token_bucket', 'version.py')) -VERSION = VERSION.__version__ +loader = importlib.machinery.SourceFileLoader( + 'version', path.join('.', 'token_bucket', 'version.py') +) +spec = importlib.util.spec_from_loader(loader.name, loader) +module = importlib.util.module_from_spec(spec) + +loader.exec_module(module) +VERSION = module.__version__ setup( name='token_bucket', @@ -28,12 +35,13 @@ 'Programming Language :: Python', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', - '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', ], keywords='web http https cloud rate limiting token bucket throttling', author='kgriffs', @@ -41,7 +49,7 @@ url='https://github.com/falconry/token-bucket', license='Apache 2.0', packages=find_packages(exclude=['tests']), - python_requires='>=3.5', + python_requires='>=3.6', install_requires=[], setup_requires=['pytest-runner'], tests_require=['pytest'],