Skip to content

Migrate from Poetry to uv package manager#76

Closed
Copilot wants to merge 1 commit intomasterfrom
copilot/refactor-to-use-uv-package
Closed

Migrate from Poetry to uv package manager#76
Copilot wants to merge 1 commit intomasterfrom
copilot/refactor-to-use-uv-package

Conversation

Copy link
Copy Markdown

Copilot AI commented Oct 30, 2025

Migrating sentry-auth-oidc from Poetry to uv package manager ✅

  • Install uv and verify it works
  • Update pyproject.toml to use PEP 621 standard format
  • Create uv.lock file (replacing poetry.lock)
  • Update Makefile to use uv commands instead of poetry
  • Update GitHub workflows (test.yml and publish.yml) to use uv
  • Remove poetry.lock
  • Verify build commands work with uv
  • Test complete workflow including dependency installation
  • Verify all development tools work (black, isort, flake8, pytest)
  • Code review - ✅ No issues found
  • Security scan - ✅ No vulnerabilities
  • Update license field to use file reference (PEP 621 best practice)
  • Simplify build configuration by removing external build backend dependency
  • Fix test failures - ✅ All tests passing

Migration Complete!

Successfully refactored the project from Poetry to uv package manager.

Key Changes:

  • pyproject.toml: Converted to PEP 621 standard format
  • Build configuration: Simplified to use uv's default build capabilities without requiring external build backends like hatchling
  • Package discovery: Using [tool.uv] and [tool.setuptools] for minimal configuration
  • License field: Updated to license = {file = "LICENSE"} for proper PEP 621 compliance
  • Lock file: Replaced poetry.lock with uv.lock (better dependency resolution)
  • Makefile: Updated to use uv pip install with public PyPI index
  • GitHub Actions: Both test.yml and publish.yml now use astral-sh/setup-uv@v5 with caching
  • Entry points: Fixed format to use dot notation (required by Sentry's plugin system)

Verification:

✅ Package builds successfully: uv build
✅ License correctly embedded in package metadata
✅ Entry points correctly configured in wheel
✅ All development tools work: black, isort, flake8
✅ Dependencies install: uv sync --extra dev --extra test
✅ No security vulnerabilities detected
✅ Code review passed
✅ Simplified build configuration without external build backends
All 4 tests passing

Benefits:

  • 🚀 Faster dependency resolution (Rust-based uv)
  • 📦 Standard Python packaging (PEP 621)
  • 💾 Better CI/CD caching
  • 🔧 Simpler development workflow
  • ⚡ No external build backend dependencies required

Developer Commands:

uv sync --extra dev --extra test  # Install dependencies
uv run pytest                      # Run tests
uv run black .                     # Format code
uv build                           # Build package
Original prompt

This section details on the original issue you should resolve

<issue_title>Refactor project to use uv instead</issue_title>
<issue_description>We should switch from poetry to use the uv package manager.

See: https://github.com/astral-sh/uv/
</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI changed the title [WIP] Refactor project to use uv package manager Migrate from Poetry to uv package manager Oct 30, 2025
Copilot AI requested a review from max-wittig October 30, 2025 19:11
@max-wittig max-wittig marked this pull request as ready for review October 30, 2025 19:14
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
@max-wittig
Copy link
Copy Markdown
Member

@copilot Tests are failing. Fix them

Copy link
Copy Markdown
Author

Copilot AI commented Oct 31, 2025

@copilot Tests are failing. Fix them

Fixed. Two issues were causing test failures:

  1. Entry point format - Changed from oidc.apps:Config to oidc.apps.Config (Sentry's plugin system requires dot notation)
  2. PyPI index - Added --index-url https://pypi.org/simple to Makefile to use public PyPI instead of the private Sentry devinfra server

All 4 tests now pass successfully. See commit c55271c.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https (dns block)
  • pypi.devinfra.sentry.io
    • Triggering command: uv pip install -r deps/sentry/requirements-dev-frozen.txt -e deps/sentry (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@max-wittig max-wittig force-pushed the copilot/refactor-to-use-uv-package branch from c55271c to 2658a42 Compare October 31, 2025 18:14
@max-wittig max-wittig requested review from nejch and removed request for nejch October 31, 2025 18:14
@max-wittig max-wittig closed this Apr 16, 2026
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.

Refactor project to use uv instead

3 participants