Skip to content

Remove redundant dependencies and enforce exact pinning#1265

Open
seroperson wants to merge 1 commit into
entrius:testfrom
seroperson:deps-enh
Open

Remove redundant dependencies and enforce exact pinning#1265
seroperson wants to merge 1 commit into
entrius:testfrom
seroperson:deps-enh

Conversation

@seroperson
Copy link
Copy Markdown
Contributor

Closes #1264

Summary

Audited pyproject.toml against the actual import graph and tightened both the dep list and the pinning policy.

Eight redundant packages dropped:

  • bittensor-cli, bittensor-commit-reveal: zero direct imports anywhere, and neither is a transitive of bittensor 10.0.1
  • bittensor-wallet: already a transitive of bittensor; explicit pin only risked fighting the resolver
  • levenshtein, python-dotenv: zero direct imports; env vars are already read via os.environ
  • fastapi, uvicorn from [debug]: already transitives of bittensor; the explicit pins were downgrading what bittensor wanted
  • pytz: only consumer was CHICAGO_TZ + parse_github_timestamp_to_cst in gittensor/validator/utils/datetime_utils.py, which chore: integrate pre-push vulture dead-code scanner #1253 found is dead code

Every remaining direct dep is now exact-pinned (==), replacing the previous mix of ==, >=, and bare names. The lockfile and pyproject.toml now agree on a single resolution by construction.

Held bittensor at 10.0.1: bumping needs more involved changes and is better addressed in a separate PR to avoid widening scope. The same for tree-sitter and tree-sitter-language-pack.

Removed Why
bittensor-cli==9.17.0 (runtime) No import bittensor_cli anywhere; not a transitive of bittensor 10.0.1
bittensor-commit-reveal==0.4.0 (runtime) No import bittensor_commit_reveal anywhere; not a transitive
bittensor-wallet==4.0.0 (runtime) Already a transitive of bittensor; the explicit pin only fought the resolver
levenshtein==0.27.3 (runtime) Zero direct imports (Levenshtein, levenshtein, rapidfuzz) anywhere
python-dotenv==1.2.1 (runtime) load_dotenv() never called; env vars read via os.environ.get already
pytz==2025.2 (runtime) Only consumer was dead code (see below)
fastapi==0.110.1 (from [debug]) Already a transitive of bittensor; explicit pin was downgrading it
uvicorn==0.32.0 (from [debug]) Already a transitive of bittensor; explicit pin was downgrading it
CHICAGO_TZ constant in gittensor/validator/utils/datetime_utils.py Only used inside parse_github_timestamp_to_cst (also dead)
parse_github_timestamp_to_cst() function Never called anywhere in gittensor/, neurons/, tests/, scripts/ (per #1253)
import pytz in datetime_utils.py No remaining consumer after CHICAGO_TZ removed

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Testing

  • Tests added/updated
  • Manually tested

@xiao-xiao-mao xiao-xiao-mao Bot added the refactor Code restructuring without behavior change label May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code restructuring without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove redundant dependencies and enforce exact pinning

1 participant