Skip to content

Conversation

geruh
Copy link
Contributor

@geruh geruh commented Oct 10, 2025

Closes #2553

Rationale for this change

During the release process cleanup, I also had prototyped a migration from Poetry to UV. I used the https://github.com/mkniewallner/migrate-to-uv package to migrate to UV and ran a release workflow and some others like doc serve for validation.

This PR also migrates the Makefile to use UV. I'll still need to upgrade the docs to reflect the UV contribution workflow. I think it would be a good start to push up as a prototype, and have others checkout and give it a try.

Build System Changes

Build Backend

UV doesn't have a build backend like poetry that supports hooks or custom build scripts. So I've switched to use Hatchling as the build backend with the existing (build-module.py) to ensure Avro files are properly compiled and included.

Build Verification

Release builds can be verified using:

uv build --sdist  # Build source distribution
uv build --wheel  # Build wheel distribution

Both commands ensure parity with the previous Poetry build outputs.

Are these changes tested?

Yes

  • make install Environment setup and dependency installation
  • make test - Unit tests
  • make test-integration - Integration tests with all extras
  • make lint - Linting and code quality checks
  • make doc-install && make doc-serve - Documentation

Are there any user-facing changes?

No user facing changes. Contributors will need to use UV instead of Poetry for development, but all make targets remain the same. So not really?

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

This looks great @geruh, I hear a lot of good stuff around uv 🙌

"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice one, maybe we should add pretty-format-toml to pre-commit to format the toml files 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a great idea. #2605 if you want to merge it in


[project.optional-dependencies]
pyarrow = [
"pyarrow>=17.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, maybe find a way to deduplicate the constraints. pyarrow is mentioned multiple times.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good! it looks like poetry had a way of doing this before with the [tool.poetry.extras], kind of acting as a version catalog. UV doesn't have support for this but respects the PEP standard for project dependencies. In this case one way we can de-duplicate is by using the PEP 508 Extras grammar which allows for self referencing other dependencies in the project like:

[project.optional-dependencies]
pyarrow = [
    "pyarrow>=17.0.0",
    "pyiceberg-core>=0.5.1,<0.7.0",
]

pandas = [
    "pyiceberg[pyarrow]",
    "pandas>=1.0.0,<3.0.0",
]

What do you think @Fokko?

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.

Switch from Poetry to uv for dependency management

3 participants