Skip to content

Replace Poetry with uv for project management#429

Merged
miketheman merged 7 commits intomainfrom
copilot/fix-428
Jul 14, 2025
Merged

Replace Poetry with uv for project management#429
miketheman merged 7 commits intomainfrom
copilot/fix-428

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jul 13, 2025

This PR migrates the project from Poetry to uv for dependency management and build tooling, providing faster dependency resolution and a more modern Python packaging workflow.

Changes Made

Project Configuration

  • pyproject.toml:
    • Removed [tool.poetry] and [tool.poetry.group.dev.dependencies] sections
    • Migrated dev dependencies to standard [project.optional-dependencies]
    • Updated build backend from poetry.core.masonry.api to hatchling.build

Dependency Management

  • Removed: poetry.lock (1478 lines)
  • Added: uv.lock with proper dependency resolution
  • Dependencies remain identical, only the lock format changed

Build & Development Tools

  • Makefile: Updated all targets to use uv commands:

    - poetry install → uv sync --extra dev
    - poetry run → uv run  
    - poetry build → uv build
    - poetry publish → uv publish
  • GitHub Actions:

    • Replaced Poetry installation with astral-sh/setup-uv@v5
    • Simplified Python setup using uv python install
    • Faster CI builds with native uv caching

Documentation & Infrastructure

  • README.md: Updated installation examples to show uv usage
  • .gitignore: Added .venv/ for uv's virtual environments
  • Removed all Poetry references from active configuration

Verification

All functionality preserved:

  • Package builds successfully (make dist)
  • Tests pass (62/68 - remaining failures are network-related)
  • Coverage maintained at 98%
  • Package imports and works correctly
  • Development workflow unchanged for contributors

Benefits

  • Faster: uv provides significantly faster dependency resolution
  • Modern: Uses standard Python packaging (pyproject.toml without tool-specific extensions)
  • Simpler: Fewer configuration sections and cleaner build process
  • Compatible: Works with existing Python tooling ecosystem

Fixes #428.

Warning

Firewall rules blocked me from connecting to one or more addresses

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

  • amazon.com
    • Triggering command: /home/REDACTED/.cache/pypoetry/virtualenvs/pytest-socket-1cM3NO8Q-py3.12/bin/python /home/REDACTED/.cache/pypoetry/virtualenvs/pytest-socket-1cM3NO8Q-py3.12/bin/coverage run -m pytest (dns block)
    • Triggering command: /home/REDACTED/work/pytest-socket/pytest-socket/.venv/bin/python /home/REDACTED/work/pytest-socket/pytest-socket/.venv/bin/coverage run -m pytest (dns block)
  • astral.sh
    • Triggering command: curl -LsSf REDACTED (dns block)
  • google.com
    • Triggering command: /home/REDACTED/.cache/pypoetry/virtualenvs/pytest-socket-1cM3NO8Q-py3.12/bin/python /home/REDACTED/.cache/pypoetry/virtualenvs/pytest-socket-1cM3NO8Q-py3.12/bin/coverage run -m pytest (dns block)
    • Triggering command: /home/REDACTED/work/pytest-socket/pytest-socket/.venv/bin/python /home/REDACTED/work/pytest-socket/pytest-socket/.venv/bin/coverage run -m pytest (dns block)
  • http.codes
    • Triggering command: /home/REDACTED/.cache/pypoetry/virtualenvs/pytest-socket-1cM3NO8Q-py3.12/bin/python /home/REDACTED/.cache/pypoetry/virtualenvs/pytest-socket-1cM3NO8Q-py3.12/bin/coverage run -m pytest (dns block)
    • Triggering command: /home/REDACTED/work/pytest-socket/pytest-socket/.venv/bin/python /home/REDACTED/work/pytest-socket/pytest-socket/.venv/bin/coverage run -m pytest tests/test_socket.py -k test_disabled -v (dns block)
    • Triggering command: /home/REDACTED/work/pytest-socket/pytest-socket/.venv/bin/python /home/REDACTED/work/pytest-socket/pytest-socket/.venv/bin/coverage run -m pytest (dns block)
  • unresolvable
    • Triggering command: /home/REDACTED/.cache/pypoetry/virtualenvs/pytest-socket-1cM3NO8Q-py3.12/bin/python /home/REDACTED/.cache/pypoetry/virtualenvs/pytest-socket-1cM3NO8Q-py3.12/bin/coverage run -m pytest (dns block)
    • Triggering command: /home/REDACTED/work/pytest-socket/pytest-socket/.venv/bin/python /home/REDACTED/work/pytest-socket/pytest-socket/.venv/bin/coverage run -m pytest (dns block)
  • www.example.com
    • Triggering command: /home/REDACTED/.cache/pypoetry/virtualenvs/pytest-socket-1cM3NO8Q-py3.12/bin/python /home/REDACTED/.cache/pypoetry/virtualenvs/pytest-socket-1cM3NO8Q-py3.12/bin/coverage run -m pytest (dns block)
    • Triggering command: /home/REDACTED/work/pytest-socket/pytest-socket/.venv/bin/python /home/REDACTED/work/pytest-socket/pytest-socket/.venv/bin/coverage run -m pytest (dns block)

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


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: miketheman <529516+miketheman@users.noreply.github.com>
Copilot AI changed the title [WIP] Replace Poetry with uv Replace Poetry with uv for project management Jul 13, 2025
Copilot AI requested a review from miketheman July 13, 2025 22:13
Copy link
Copy Markdown
Owner

@miketheman miketheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good start, some smaller notes inline.

Co-authored-by: miketheman <529516+miketheman@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jul 13, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses

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

  • astral.sh
    • Triggering command: curl -LsSf REDACTED (dns block)

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

…ld backend

Co-authored-by: miketheman <529516+miketheman@users.noreply.github.com>
Co-authored-by: miketheman <529516+miketheman@users.noreply.github.com>
Co-authored-by: miketheman <529516+miketheman@users.noreply.github.com>
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@miketheman miketheman marked this pull request as ready for review July 14, 2025 18:25
@miketheman miketheman merged commit 906d4ef into main Jul 14, 2025
18 checks passed
@miketheman miketheman deleted the copilot/fix-428 branch July 14, 2025 18:25
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.

Replace Poetry with uv

2 participants