Skip to content

Remove redundant dependencies and enforce exact pinning #1264

@pahuchi-joe

Description

@pahuchi-joe

Summary

pyproject.toml carries dependencies that nothing imports and pins them inconsistently, so a fresh uv sync can quietly resolve to a different version graph than what uv.lock records.

Concrete redundancies found in the current file:

  • Direct deps with zero call sites: bittensor-cli, bittensor-commit-reveal, levenshtein, python-dotenv
  • Direct deps that are already transitives of bittensor: bittensor-wallet, plus fastapi and uvicorn in [debug] (their explicit pins were downgrading what bittensor's resolver wanted)
  • pytz, whose only consumer is CHICAGO_TZ + parse_github_timestamp_to_cst in gittensor/validator/utils/datetime_utils.py, both unreferenced anywhere in gittensor/, neurons/, tests/, or scripts/ (already noted in chore: integrate pre-push vulture dead-code scanner #1253)

Pinning is also inconsistent: click, rich, substrate-interface, and pyright are unpinned, while everything else is exact-pinned.

Motivation

CONTRIBUTING.md:129 says "Avoid adding unnecessary dependencies". This brings pyproject.toml in line with that rule, retroactively. The exact-pinning makes installs reproducible across every contributor machine, every CI runner, and every validator in the network.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrefactorCode restructuring without behavior change

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions