From 8f3e95d127719cce567a5bb0df41ea90331901af Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Wed, 23 Oct 2024 17:54:09 -0700 Subject: [PATCH] Drop Python 3.8 support due to end-of-life --- .github/workflows/main.yml | 2 +- justfile | 4 ++-- pyproject.toml | 28 ++++++++++++---------------- tests/test_sphinxext.py | 7 ------- 4 files changed, 15 insertions(+), 26 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e1d9bec..793793c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] name: Python ${{ matrix.python-version}} steps: diff --git a/justfile b/justfile index 188e7f4..d87bbdc 100644 --- a/justfile +++ b/justfile @@ -13,11 +13,11 @@ test: devenv # Format files format: devenv - uv run tox exec -e py38-lint -- ruff format + uv run tox exec -e py39-lint -- ruff format # Lint files lint: devenv - uv run tox -e py38-lint + uv run tox -e py39-lint # Wipe devenv and build artifacts clean: diff --git a/pyproject.toml b/pyproject.toml index 88ad3c9..3bb9e7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ readme = "README.rst" keywords = ["conf", "config", "configuration", "ini", "env", "yaml"] authors = [{name = "Will Kahn-Greene"}] license = {text = "MPLv2"} -requires-python = ">=3.8" +requires-python = ">=3.9" dependencies = [] classifiers = [ "Development Status :: 5 - Production/Stable", @@ -14,7 +14,6 @@ classifiers = [ "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Natural Language :: English", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -48,8 +47,7 @@ dev = [ "tox-uv", "twine", "types-PyYAML", - "Sphinx==7.2.6; python_version > '3.8'", - "Sphinx==6.2.1; python_version <= '3.8'", + "Sphinx==7.2.6", "sphinx_rtd_theme", ] @@ -60,7 +58,7 @@ build-backend = "setuptools.build_meta" [tool.ruff] -target-version = "py38" +target-version = "py39" src = ["src"] line-length = 88 @@ -77,7 +75,7 @@ docstring-quotes = "double" [tool.mypy] -python_version = "3.8" +python_version = "3.9" disallow_untyped_defs = true [[tool.mypy.overrides]] @@ -104,11 +102,10 @@ filterwarnings = [ legacy_tox_ini = """ [tox] envlist = - py38 - py38-doctest - py38-lint - py38-typecheck py39 + py39-doctest + py39-lint + py39-typecheck py310 py311 py312 @@ -117,7 +114,6 @@ uv_python_preference = only-managed [gh-actions] python = - 3.8: py38 3.9: py39 3.10: py310 3.11: py311 @@ -128,19 +124,19 @@ python = extras = dev,ini,sphinx,yaml commands = pytest {posargs} tests/ -[testenv:py38-doctest] +[testenv:py39-doctest] commands = pytest --doctest-modules src/ -[testenv:py38-lint] +[testenv:py39-lint] allowlist_externals = ruff -basepython = python3.8 +basepython = python3.9 changedir = {toxinidir} commands = ruff format --check tests docs examples ruff check src tests docs examples -[testenv:py38-typecheck] -basepython = python3.8 +[testenv:py39-typecheck] +basepython = python3.9 changedir = {toxinidir} commands = mypy src/everett/ diff --git a/tests/test_sphinxext.py b/tests/test_sphinxext.py index ff5d2ea..9432a4c 100644 --- a/tests/test_sphinxext.py +++ b/tests/test_sphinxext.py @@ -4,7 +4,6 @@ """Test sphinxext directives.""" -import sys from textwrap import dedent import pytest @@ -530,12 +529,6 @@ def test_option_parser(self, tmpdir, capsys): assert "WARNING" not in captured.err -@pytest.mark.skipif( - # NOTE(willkg): The automodule stuff doesn't work with Python < 3.8 because - # ast.get_source_segment() isn't available. - sys.version_info < (3, 8), - reason="requires Python 3.8 or higher", -) class Test_automoduleconfig: def test_basic(self, tmpdir, capsys): rst = dedent(