AVRO-4232: [Python] Backport uv/ruff tooling to branch-1.12 - #3922
Merged
RyanSkraba merged 2 commits intoAug 6, 2026
Conversation
Backports the Python tooling modernization (AVRO-4232, apache#3658) so that the Java interop workflow's 'uv sync --frozen' step works on branch-1.12. The workflow change was previously backported without the accompanying lang/py migration, leaving no uv.lock or [project] table, which caused 'uv sync --frozen' to fail. - Migrate lang/py from tox/setuptools to uv + ruff - Add uv.lock and [project]/[dependency-groups] to pyproject.toml - Remove tox.ini and setup.cfg - Update build.sh (ruff/coverage/mypy targets) - Convert test-lang-py.yml to uv (drops py3.9 CI, adds 3.14) - Exclude lang/py/uv.lock from RAT license check Version pinned to 1.12.2 and packages.find restricted to avro* to fix flat-layout package discovery.
uvx fetches the latest ruff, whose stricter default lint rules flag 252 pre-existing issues in the (not-yet-modernized) branch-1.12 source. Use 'uv run ruff' to run the version pinned in uv.lock (0.15.1), matching main and keeping lint reproducible.
iemejia
force-pushed
the
AVRO-4232-branch-1.12-uv-backport
branch
from
August 6, 2026 12:19
6532a88 to
ec78070
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Backports the Python tooling modernization from AVRO-4232 (#3658) to
branch-1.12.Why
The Java interop workflow (
test-lang-java.yml) onbranch-1.12runsuv sync --frozeninlang/py, but that workflow change was previously backported without the accompanyinglang/pymigration. There was nouv.lockand no[project]table inpyproject.toml, souv sync --frozenfailed immediately and the workflow was red.Changes
lang/pyfrom tox/setuptools to uv + rufflang/py/uv.lockand[project]/[dependency-groups]topyproject.tomltox.iniandsetup.cfgbuild.sh(ruff / coverage / mypy targets)test-lang-py.ymlto uv (drops Python 3.9 from CI, adds 3.14 — matchesmain)lang/py/uv.lockfrom the RAT license check (pom.xml)branch-1.12 specifics
pyproject.tomlversion pinned to 1.12.2 (matchesshare/VERSION.txt)[tool.setuptools.packages.find] include = ["avro*"]to fix flat-layout "multiple top-level packages" discovery errorVerification (local)
uv sync --frozen✅ruff check/ruff format --diff✅mypy avro/— no issues ✅./build.sh coverage— 561 tests pass (1 skipped) ✅./build.sh interop-data-generate— produces null/deflate/bzip2/snappy/zstandard variants ✅Note
This drops Python 3.9 from CI (
requires-python = ">=3.10"), consistent withmain.