Skip to content

chore: migrate to Python 3.13 + hatchling + uv, modernize toolchain#183

Merged
removeknight merged 1 commit into
smartbgp:masterfrom
chenailin11:master
May 21, 2026
Merged

chore: migrate to Python 3.13 + hatchling + uv, modernize toolchain#183
removeknight merged 1 commit into
smartbgp:masterfrom
chenailin11:master

Conversation

@chenailin11
Copy link
Copy Markdown
Contributor

Build system:

  • Replace setup.py/pbr/tox with hatchling + uv (pyproject.toml)
  • Add uv.lock for reproducible installs
  • Version single-sourced from yabgp/init.version
  • Add PEP 735 dependency-groups: test, dev, docs

CI & Docker:

  • GitHub Actions: switch to uv sync + uv run pytest/ruff/pyright
  • Add windows-latest to CI matrix (ubuntu/macos/windows)
  • Dockerfile: migrate from pip to uv sync --locked --no-dev
  • Add .dockerignore to exclude .venv/.git/.claude/tools/doc from image

Lint & type check:

  • Replace flake8 with ruff (E/W/F/I/UP, line-length=120, py313)
  • Add pyright (typeCheckingMode=off, reportDeprecated=error)
  • Fix 300+ lint issues across src and tests (auto-fix + manual)

Bug fixes:

  • Use integer division // instead of / in community/largecommunity parse to avoid intermediate float values (len(value)//2, len(value)//4)

Cleanup:

  • Remove setup.py, setup.cfg, tox.ini, .coveragerc, .testr.conf
  • Remove requirements.txt, test-requirements.txt (superseded by uv.lock)
  • Remove redhat/, run_test.py, tools/rabbit_mongo.sh, yabgp/hooks.py
  • Migrate .coveragerc into pyproject.toml [tool.coverage.run]

Docs:

  • Update README/HACKING.rst to uv-based workflow
  • Update doc/source/install.rst and feature/extension/tutorial pages
  • Bump docs deps: sphinx>=8, sphinx-rtd-theme>=3 via dependency-group

Verified: 284 unit tests pass; BGP-LS RIB output identical between py3.6 and py3.13 against live router (node/link/prefix/srv6_sid).

Build system:
- Replace setup.py/pbr/tox with hatchling + uv (pyproject.toml)
- Add uv.lock for reproducible installs
- Version single-sourced from yabgp/__init__.__version__
- Add PEP 735 dependency-groups: test, dev, docs

CI & Docker:
- GitHub Actions: switch to uv sync + uv run pytest/ruff/pyright
- Add windows-latest to CI matrix (ubuntu/macos/windows)
- Dockerfile: migrate from pip to uv sync --locked --no-dev
- Add .dockerignore to exclude .venv/.git/.claude/tools/doc from image

Lint & type check:
- Replace flake8 with ruff (E/W/F/I/UP, line-length=120, py313)
- Add pyright (typeCheckingMode=off, reportDeprecated=error)
- Fix 300+ lint issues across src and tests (auto-fix + manual)

Bug fixes:
- Use integer division // instead of / in community/largecommunity parse
  to avoid intermediate float values (len(value)//2, len(value)//4)

Cleanup:
- Remove setup.py, setup.cfg, tox.ini, .coveragerc, .testr.conf
- Remove requirements.txt, test-requirements.txt (superseded by uv.lock)
- Remove redhat/, run_test.py, tools/rabbit_mongo.sh, yabgp/hooks.py
- Migrate .coveragerc into pyproject.toml [tool.coverage.run]

Docs:
- Update README/HACKING.rst to uv-based workflow
- Update doc/source/install.rst and feature/extension/tutorial pages
- Bump docs deps: sphinx>=8, sphinx-rtd-theme>=3 via dependency-group

Verified: 284 unit tests pass; BGP-LS RIB output identical between
py3.6 and py3.13 against live router (node/link/prefix/srv6_sid).

Co-authored-by: Cursor <cursoragent@cursor.com>
@removeknight removeknight merged commit f1f0883 into smartbgp:master May 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants