diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2a1d119..812f811a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: os: [macos-latest, ubuntu-latest, windows-latest] - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] steps: - name: Checkout code @@ -26,6 +26,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Install dependencies run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index a4c4a9f7..1a944eb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,14 @@ -# next (unreleased) +# 2.13 (2024-10-02) -* Use `ruff` for linting (Anh Trinh, #347). -* Use `ruff` for formatting (Anh Trinh, #349). +* Add support for Python 3.13 (Jendrik Seipp, #369). +* Add PyPI and conda-forge badges to README file (Trevor James Smith, #356). +* Include `tests/**/*.toml` in sdist (Colin Watson). + +# 2.12 (2024-09-17) + +* Use `ruff` for linting and formatting (Anh Trinh, #347, #349). * Replace `tox` by `pre-commit` for linting and formatting (Anh Trinh, #349). -* Add `--config` flag to specify path to pyproject.toml configuration file (Glen Robertson #352). +* Add `--config` flag to specify path to pyproject.toml configuration file (Glen Robertson, #352). # 2.11 (2024-01-06) diff --git a/MANIFEST.in b/MANIFEST.in index df6df808..22e0ead7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,6 @@ include *.md include *.txt include tests/*.py +include tests/**/*.toml include tox.ini include vulture/whitelists/*.py diff --git a/README.md b/README.md index 7275f6cd..45bb3c44 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Vulture - Find dead code +[![PyPI Version](https://img.shields.io/pypi/v/vulture.svg)](https://pypi.python.org/pypi/vulture) +[![Conda Version](https://img.shields.io/conda/vn/conda-forge/vulture.svg)](https://anaconda.org/conda-forge/vulture) ![CI:Test](https://github.com/jendrikseipp/vulture/workflows/CI/badge.svg) [![Codecov Badge](https://codecov.io/gh/jendrikseipp/vulture/branch/main/graphs/badge.svg)](https://codecov.io/gh/jendrikseipp/vulture?branch=main) @@ -189,7 +191,7 @@ Vulture will automatically look for a `pyproject.toml` in the current working di To use a `pyproject.toml` in another directory, you can use the `--config path/to/pyproject.toml` flag. -## Version control integration +## Integrations You can use a [pre-commit](https://pre-commit.com/#install) hook to run Vulture before each commit. For this, install pre-commit and add the @@ -207,6 +209,8 @@ Then run `pre-commit install`. Finally, create a `pyproject.toml` file in your repository and specify all files that Vulture should check under `[tool.vulture] --> paths` (see above). +There's also a [GitHub Action for Vulture](https://github.com/gtkacz/vulture-action). + ## How does it work? Vulture uses the `ast` module to build abstract syntax trees for all diff --git a/setup.py b/setup.py index d9187eac..e9a453f8 100644 --- a/setup.py +++ b/setup.py @@ -46,6 +46,7 @@ def find_version(*parts): "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Quality Assurance", diff --git a/tests/__init__.py b/tests/__init__.py index 58e1da85..c54b3877 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -8,7 +8,10 @@ REPO = pathlib.Path(__file__).resolve().parents[1] WHITELISTS = [ - str(path) for path in (REPO / "vulture" / "whitelists").glob("*.py") + str(path) + for path in (REPO / "vulture" / "whitelists").glob("*.py") + # Pint is incompatible with Python 3.13 (https://github.com/hgrecco/pint/issues/1969). + if sys.version_info < (3, 13) or path.name != "pint_whitelist.py" ] diff --git a/tox.ini b/tox.ini index ff16a568..9318ed13 100644 --- a/tox.ini +++ b/tox.ini @@ -1,21 +1,21 @@ [tox] -envlist = cleanup, py{38,310,311,312}, style # Skip py39 since it chokes on distutils. +envlist = cleanup, py{38,310,311,312,313}, style # Skip py39 since it chokes on distutils. skip_missing_interpreters = true # Erase old coverage results, then accumulate them during this tox run. [testenv:cleanup] deps = - coverage==7.0.5 + coverage commands = coverage erase [testenv] deps = - coverage==7.0.5 + coverage pint # Use latest version to catch API changes. - pytest==7.4.2 - pytest-cov==4.0.0 - pytype==2024.9.13 + pytest + pytest-cov + pytype commands = pytest {posargs} # Install package as wheel in all envs (https://hynek.me/articles/turbo-charge-tox/). diff --git a/vulture/version.py b/vulture/version.py index 3e58dd32..a7e46e76 100644 --- a/vulture/version.py +++ b/vulture/version.py @@ -1 +1 @@ -__version__ = "2.11" +__version__ = "2.13"