diff --git a/.github/workflows/publication.yml b/.github/workflows/publication.yml index d169f58..2a84345 100644 --- a/.github/workflows/publication.yml +++ b/.github/workflows/publication.yml @@ -6,10 +6,10 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.7' + python-version: "3.9" - run: python -m pip install --upgrade tox-gh-actions - env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index a613bf4..bb27d32 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -5,10 +5,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - run: python -m pip install --upgrade tox-gh-actions diff --git a/pyproject.toml b/pyproject.toml index d7a1549..54754f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,16 +2,14 @@ name = "git-rebase-branches" description = "Rebase multiple branches at once" readme = "README.md" -requires-python = ">= 3.7" +requires-python = ">= 3.9" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)", - "Programming Language :: Python :: 3.7", ] dynamic = ["version"] dependencies = [ - 'importlib-metadata >= 1.4; python_version < "3.8"', ] [[project.authors]] @@ -28,7 +26,7 @@ git-rebase-branches = "git_rebase_branches:main" homepage = "https://github.com/dmtucker/git-rebase-branches" [build-system] -requires = ["setuptools ~= 65.4", "setuptools-scm ~= 7.0", "wheel ~= 0.37.0"] +requires = ["setuptools >= 80.0", "setuptools-scm >= 8.0"] build-backend = "setuptools.build_meta" [tool.bandit] diff --git a/src/git_rebase_branches.py b/src/git_rebase_branches.py index ce094b8..6a360ca 100755 --- a/src/git_rebase_branches.py +++ b/src/git_rebase_branches.py @@ -6,13 +6,10 @@ import argparse -try: - from importlib.metadata import version -except ModuleNotFoundError: # py37 - from importlib_metadata import version import shlex import subprocess import sys +from importlib.metadata import version from typing import Any, Dict, List, Optional diff --git a/tests/test_git_rebase_branches.py b/tests/test_git_rebase_branches.py index 3992604..9b05bca 100644 --- a/tests/test_git_rebase_branches.py +++ b/tests/test_git_rebase_branches.py @@ -1,6 +1,5 @@ """Test git_rebase_branches.""" - import pytest import git_rebase_branches diff --git a/tox.ini b/tox.ini index 3a28509..211c0d8 100644 --- a/tox.ini +++ b/tox.ini @@ -1,24 +1,29 @@ [tox] -minversion = 3.14.0 +minversion = 4.0 isolated_build = true envlist = publish static - py{37,38,39,310} + py39 + py310 + py311 + py312 + py313 [gh-actions] python = - 3.7: py37 - 3.8: py38 3.9: py39 3.10: py310, static, publish + 3.11: py311 + 3.12: py312 + 3.13: py313 [testenv] deps = - pytest ~= 7.1.0 - pytest-cov ~= 4.0.0 - pytest-randomly ~= 3.12.0 - pytest-xdist ~= 2.5.0 + pytest ~= 8.4.0 + pytest-cov ~= 6.2.0 + pytest-randomly ~= 3.16.0 + pytest-xdist ~= 3.8.0 commands = pytest --cov git_rebase_branches --cov-branch --cov-fail-under 20 --cov-report term-missing {posargs:-n auto} @@ -26,17 +31,14 @@ commands = testpaths = tests [testenv:static] -basepython = python3.10 deps = - bandit[toml] ~= 1.7.0 - black ~= 22.10.0 - flake8 ~= 5.0.0 - flake8-bugbear ~= 22.9.23 - flake8-docstrings ~= 1.6.0 - mypy >= 0.980, < 0.990 - pylint ~= 2.15.0 - types-setuptools ~= 65.4.0 - importlib-metadata ~= 5.0.0 # for type-checking non-py37 + bandit[toml] ~= 1.8.0 + black ~= 25.1.0 + flake8 ~= 7.3.0 + flake8-bugbear ~= 24.12.12 + mypy ~= 1.17.0 + pylint ~= 3.3.0 + types-setuptools ~= 80.0.0 commands = black --check src tests flake8 src tests @@ -51,10 +53,9 @@ extend-ignore = E203 [testenv:publish] passenv = TWINE_* -basepython = python3.10 deps = - build ~= 0.8.0 - twine ~= 4.0.0 + build ~= 1.3.0 + twine ~= 6.1.0 commands = - {envpython} -m build --outdir {distdir} . - twine {posargs:check} {distdir}/* + {envpython} -m build --outdir {envtmpdir} . + twine {posargs:check} {envtmpdir}/*