Summary
Migrate the project's build and dependency management from Poetry to uv, a significantly faster Python package installer and resolver written in Rust.
Motivation
Performance Improvements:
- uv is 10-100x faster than pip/Poetry for dependency resolution
- Dramatically reduces CI/CD build times
- Faster local development environment setup
- Near-instant virtual environment creation
Developer Experience:
- Simpler, more reliable dependency management
- Better compatibility with standard Python tooling
- Drop-in replacement for pip/Poetry commands
- Single tool for multiple Python versions
Real-World Impact:
Proposed Changes
1. Project Files
Replace pyproject.toml Poetry-specific sections with standard PEP 621:
[project]
name = "openapi-python-generator"
version = "0.x.x"
dependencies = [
"pydantic>=2.0",
# ... existing deps
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"black>=23.0",
# ... existing dev deps
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
Remove:
poetry.lock (replaced by uv.lock)
- Poetry-specific
[tool.poetry] sections
Add:
uv.lock (generated by uv)
.python-version (for uv Python version management)
2. GitHub Actions Workflow
Before (.github/workflows/test.yml):
- name: Install Poetry
run: pipx install poetry
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run pytest
After:
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install dependencies
run: uv sync
- name: Run tests
run: uv run pytest
3. Developer Workflow
Before:
poetry install
poetry run pytest
poetry add some-package
After:
uv sync
uv run pytest
uv add some-package
4. Documentation Updates
- Update README.md with uv installation instructions
- Update CONTRIBUTING.md with new developer workflow
- Add migration notes for existing contributors
Implementation Plan
Backwards Compatibility
- No impact on generated code - Only affects development workflow
- No impact on published package - Package distribution unchanged
- Contributors need to install uv - One-time setup change
Benefits Summary
✅ 10-100x faster dependency resolution
✅ 4-9 minutes saved per PR CI run (5 Python versions)
✅ Simpler workflow - fewer commands, clearer output
✅ Standard Python - PEP 621 compliant, better interoperability
✅ Future-proof - uv is actively developed by Astral (ruff creators)
Resources
Related Issues
Labels
enhancement
devx (developer experience)
ci
Summary
Migrate the project's build and dependency management from Poetry to uv, a significantly faster Python package installer and resolver written in Rust.
Motivation
Performance Improvements:
Developer Experience:
Real-World Impact:
Proposed Changes
1. Project Files
Replace
pyproject.tomlPoetry-specific sections with standard PEP 621:Remove:
poetry.lock(replaced byuv.lock)[tool.poetry]sectionsAdd:
uv.lock(generated by uv).python-version(for uv Python version management)2. GitHub Actions Workflow
Before (
.github/workflows/test.yml):After:
3. Developer Workflow
Before:
After:
4. Documentation Updates
Implementation Plan
Phase 1: Setup
Phase 2: CI Migration
Phase 3: Documentation
Phase 4: Cleanup
Backwards Compatibility
Benefits Summary
✅ 10-100x faster dependency resolution
✅ 4-9 minutes saved per PR CI run (5 Python versions)
✅ Simpler workflow - fewer commands, clearer output
✅ Standard Python - PEP 621 compliant, better interoperability
✅ Future-proof - uv is actively developed by Astral (ruff creators)
Resources
Related Issues
Labels
enhancementdevx(developer experience)ci