Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 10 Jul 19:35

Minor Changes

  • #4 e25c754 - feat: publish prebuilt binaries on GitHub releases.

    Releases now attach binaries for ten targets (Linux gnu/musl on x86_64, aarch64, and armv7; macOS x86_64 and aarch64; Windows x86_64 and aarch64) with sha256 checksums, so cargo binstall pyproject-udeps works and CI can install via taiki-e/install-action without a compile.

  • #4 e25c754 - feat: rename poetry-udeps to pyproject-udeps.

    The tool is no longer poetry-only, so the name follows the file it actually analyzes. Install it with cargo install pyproject-udeps (or cargo binstall pyproject-udeps); the binary is now pyproject-udeps. The ignorefile is .pyprojectudepsignore, and an existing .poetryudepsignore keeps working as a fallback. One last poetry-udeps release on crates.io points here.

  • #4 e25c754 - feat: parse Python with ruff's parser instead of scanning text for import statements.

    Imports are now collected from a real AST, which fixes a family of accuracy bugs: from x import a, b counted only a, from x import * counted nothing, '''-quoted docstrings were not skipped, and text like x = "import os" produced phantom imports. Imports nested in functions and try/except ImportError blocks are found, files with syntax errors still contribute whatever parses, and importlib.import_module("...") and __import__("...") calls with literal arguments now count as usage. Reports may legitimately change on upgrade: dependencies that only appeared inside strings or docstrings will newly show up as unused.

  • #4 e25c754 - feat: support uv and plain PEP 621 projects, not just poetry.

    Dependencies are now read from every place pyproject.toml can declare them: [project.dependencies], every [project.optional-dependencies] extra, [tool.poetry.dependencies], every [tool.poetry.group.*] (previously only the dev group was checked), PEP 735 [dependency-groups], and the legacy [tool.uv] dev-dependencies array. Hybrid layouts take the union, so a wrong guess about which tool manages the project can never drop a declaration. --virtualenv also stopped assuming poetry: the environment is discovered from the lockfile and tool tables, using poetry env info -p for poetry projects, $UV_PROJECT_ENVIRONMENT or .venv for uv projects, and $VIRTUAL_ENV or .venv otherwise.

Patch Changes

  • #4 e25c754 - fix: stop reporting used dev dependencies that import under a different name.

    A dev dependency imported through an alias (for example scikit-learn imported as sklearn) was still reported as unused under --dev, because the match removed the wrong bookkeeping entry.

  • #4 e25c754 - fix: stop crashing on import dbt.adapters and on non-UTF-8 Python files.

    A bare two-segment import dbt.adapters panicked the matcher, and a single .py file with non-UTF-8 bytes (latin-1 comments in legacy code, say) crashed the project scan. Both now behave: the dbt heuristic only fires with an adapter segment present, and files are read lossily everywhere.

  • #4 e25c754 - fix: honor the --no-ignore flag.

    The flag was accepted but never read, so there was no way to see the report without ignorefile filtering. It now bypasses the ignorefile as documented.

All notable changes to this project will be documented in this file. See conventional commits for commit guidelines.

$ git-stats v0.2.10..v0.3.0
Author      Commits  Changed Files  Insertions  Deletions  Net Δ
Luke Hsiao       25            101       +6233      -1906  +4327
Total            25            101       +6233      -1906  +4327