From b79d4771cc7b378dac4f58b084a128ae1faa0049 Mon Sep 17 00:00:00 2001 From: Jake Lishman Date: Wed, 14 May 2025 17:35:06 +0100 Subject: [PATCH 1/2] Update development versions of `black` and `pylint` --- pyproject.toml | 2 +- requirements-dev.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7defdd1..09f2718 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ valid-classmethod-first-arg = ["cls"] valid-metaclass-classmethod-first-arg = ["cls"] [tool.pylint.exceptions] # Exceptions that will emit a warning when caught. -overgeneral-exceptions = ["BaseException"] +overgeneral-exceptions = ["builtins.BaseException"] [tool.pylint."messages control"] disable = [ "duplicate-code", diff --git a/requirements-dev.txt b/requirements-dev.txt index 960f750..a21a15a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,5 @@ -black~=22.0 -pylint~=2.14.0 -pytest~=7.0 +black~=25.0 +pylint~=3.3.0 +pytest>=7.0 reno>=3.4.0 Sphinx>=4.0 From 2d9796c4cdce9c88ba9712ce38effb211b768b92 Mon Sep 17 00:00:00 2001 From: Jake Lishman Date: Wed, 14 May 2025 17:24:38 +0100 Subject: [PATCH 2/2] Update out-of-date tool versions This drops official support for Pythons 3.7 and 3.8 which are long since end-of-life. The various versions of GitHub Actions used in the CI pipelines are brought (mostly) up-to-date. --- .github/workflows/release.yml | 14 +++++----- .github/workflows/tests.yml | 28 ++++++------------- pyproject.toml | 6 ++-- .../notes/drop-py38-752c601406733265.yaml | 5 ++++ setup.cfg | 1 - tox.ini | 2 +- 6 files changed, 25 insertions(+), 31 deletions(-) create mode 100644 releasenotes/notes/drop-py38-752c601406733265.yaml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 739fe9f..974874d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,11 +10,11 @@ jobs: name: Publish package runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v5 - name: Install build dependencies run: pip install -U twine build @@ -22,7 +22,7 @@ jobs: - name: Build run: python -mbuild --wheel --sdist . - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: path: | ./dist/*.whl @@ -35,7 +35,7 @@ jobs: run: twine upload dist/*.whl dist/*.tar.gz - name: Publish to GitHub - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: draft: false prerelease: false @@ -49,11 +49,11 @@ jobs: name: Publish documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.13' - name: Install dependencies run: python -m pip install --upgrade pip tox diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 456f4a0..0acd833 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,21 +11,11 @@ jobs: name: Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - # Set up all supported Python versions for tox. - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v5 with: - python-version: '3.7' - - uses: actions/setup-python@v3 - with: - python-version: '3.8' - - uses: actions/setup-python@v3 - with: - python-version: '3.9' - - uses: actions/setup-python@v3 - with: - python-version: '3.10' + python-version: '>=3.9' - name: Update pip run: python -mpip install --upgrade pip @@ -38,10 +28,10 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.13' - name: Update pip run: python -mpip install --upgrade pip - name: Install tox @@ -53,10 +43,10 @@ jobs: name: Docs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.13' - name: Update pip run: python -mpip install --upgrade pip - name: Install tox diff --git a/pyproject.toml b/pyproject.toml index 09f2718..6ea3d9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,14 +1,14 @@ [build-system] -requires = ["setuptools", "wheel"] +requires = ["setuptools"] build-backend = "setuptools.build_meta" [tool.black] line-length = 100 -target-version = ["py37", "py38", "py39", "py310"] +target-version = ["py39", "py310", "py311", "py312", "py313"] [tool.pylint.main] # Minimum supported Python version. -py-version = "3.7" +py-version = "3.9" [tool.pylint.basic] # Naming convention for objects that do not require docstrings. no-docstring-rgx = "^_" diff --git a/releasenotes/notes/drop-py38-752c601406733265.yaml b/releasenotes/notes/drop-py38-752c601406733265.yaml new file mode 100644 index 0000000..3b0c6e0 --- /dev/null +++ b/releasenotes/notes/drop-py38-752c601406733265.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + The officially supported Python versions are now 3.9 onwards. Any remaining support for the + end-of-life Pythons 3.7 and 3.8 is coincidental and may break without warning. diff --git a/setup.cfg b/setup.cfg index bc3ff88..9bcd59b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,6 @@ package_dir = = src install_requires = Pygments ~= 2.0 - importlib_metadata; python_version < "3.8" [options.packages.find] where = src/ diff --git a/tox.ini b/tox.ini index ce9233f..d996a65 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py37, py38, py39, py310 +envlist = py39, py310, py311, py312, py313 isolated_build = true [testenv]