From cf5d26b9eb0276f3adcc2691e66da17ddf386522 Mon Sep 17 00:00:00 2001 From: 0x26res Date: Wed, 31 Dec 2025 10:29:34 +0000 Subject: [PATCH 1/3] add 3.14 --- .github/workflows/ci.yaml | 6 ++--- .pre-commit-config.yaml | 12 +++++----- docs/contributing.md | 12 +++++----- docs/requirements.txt | 48 ++++++++++++++++++++++----------------- pyproject.toml | 3 ++- 5 files changed, 44 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e422371..c0fc8ea 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] fail-fast: false steps: - name: Checkout sources @@ -41,12 +41,12 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 - if: "matrix.python-version == '3.11'" + if: "matrix.python-version == '3.12'" with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} - name: Run pre-commit - if: "matrix.python-version == '3.11'" + if: "matrix.python-version == '3.12'" run: | uv run pre-commit run --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a8a20a3..3e9bd6c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,27 +2,27 @@ default_language_version: python: python3.12 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-toml - id: check-yaml - id: end-of-file-fixer - id: mixed-line-ending - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.11.5 + rev: v0.14.10 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - repo: https://github.com/PyCQA/bandit - rev: 1.8.3 + rev: 1.9.2 hooks: - id: bandit additional_dependencies: - ".[toml]" args: [--config=pyproject.toml] - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: v2.14.0 + rev: v2.15.0 hooks: - id: pretty-format-toml files: "^.*.toml" @@ -31,11 +31,11 @@ repos: - repo: https://github.com/astral-sh/uv-pre-commit # uv version. - rev: 0.9.6 + rev: 0.9.21 hooks: - id: uv-lock - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.44.0 + rev: v0.47.0 hooks: - id: markdownlint exclude: ^(CHANGELOG.md) diff --git a/docs/contributing.md b/docs/contributing.md index efe6039..f95ef24 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -20,14 +20,14 @@ Tests convert randomly generated data from protobuf to arrow and back, making su The tests take a long time to run. To run them faster: ```shell -pytest --numprocesses=auto -p no:benchmark ./tests +uv run pytest --numprocesses=auto -p no:benchmark ./tests ``` To Get coverage: ```shell -coverage run --branch --include "./protarrow/*" -m pytest tests -coverage report --show-missing +uv run coverage run --branch --include "./protarrow/*" -m pytest tests +uv run coverage report --show-missing ``` ## Generating the change log @@ -63,13 +63,13 @@ The CI will deploy to pypi automatically from then. ## Testing the documentation ```shell -mkdocs serve --livereload --watch=./ +uv run mkdocs serve --livereload --watch=./ ``` ## Updating dependencies -- For the repo `uv update` -- For the doc: `(cd docs/;uvx --from=pip pip-compile ./requirements.in > ./requirements.txt)` +- For the repo `uv lock --upgrade` +- For the doc: `(cd docs/;uv pip compile ./requirements.in > ./requirements.txt)` - For pre-commit: `pre-commit autoupdate; pre-commit run --all-files` ## Resources diff --git a/docs/requirements.txt b/docs/requirements.txt index ce71694..aaed3cb 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,18 +1,14 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile ./requirements.in -# +# This file was autogenerated by uv via the following command: +# uv pip compile ./requirements.in babel==2.17.0 # via mkdocs-material -backrefs==5.9 +backrefs==6.1 # via mkdocs-material -certifi==2025.10.5 +certifi==2025.11.12 # via requests charset-normalizer==3.4.4 # via requests -click==8.3.0 +click==8.1.8 # via mkdocs colorama==0.4.6 # via @@ -24,12 +20,18 @@ griffe==1.14.0 # via mkdocstrings-python idna==3.11 # via requests +importlib-metadata==8.7.1 + # via + # markdown + # mkdocs + # mkdocs-get-deps + # mkdocstrings jinja2==3.1.6 # via # mkdocs # mkdocs-material # mkdocstrings -markdown==3.10 +markdown==3.9 # via # markdown-include # mkdocs @@ -38,7 +40,7 @@ markdown==3.10 # mkdocstrings # pymdown-extensions markdown-include==0.8.1 - # via -r requirements.in + # via -r ./requirements.in markupsafe==3.0.3 # via # jinja2 @@ -51,7 +53,7 @@ mergedeep==1.3.4 # mkdocs-get-deps mkdocs==1.6.1 # via - # -r requirements.in + # -r ./requirements.in # mkdocs-autorefs # mkdocs-material # mkdocstrings @@ -61,15 +63,15 @@ mkdocs-autorefs==1.4.3 # mkdocstrings-python mkdocs-get-deps==0.2.0 # via mkdocs -mkdocs-material==9.6.23 - # via -r requirements.in +mkdocs-material==9.7.1 + # via -r ./requirements.in mkdocs-material-extensions==1.3.1 # via - # -r requirements.in + # -r ./requirements.in # mkdocs-material -mkdocstrings[python]==0.30.1 +mkdocstrings==0.30.1 # via - # -r requirements.in + # -r ./requirements.in # mkdocstrings-python mkdocstrings-python==1.18.2 # via mkdocstrings @@ -79,13 +81,13 @@ paginate==0.5.7 # via mkdocs-material pathspec==0.12.1 # via mkdocs -platformdirs==4.5.0 +platformdirs==4.4.0 # via mkdocs-get-deps pygments==2.19.2 # via mkdocs-material -pymdown-extensions==10.16.1 +pymdown-extensions==10.19.1 # via - # -r requirements.in + # -r ./requirements.in # mkdocs-material # mkdocstrings python-dateutil==2.9.0.post0 @@ -102,7 +104,11 @@ requests==2.32.5 # via mkdocs-material six==1.17.0 # via python-dateutil -urllib3==2.5.0 +typing-extensions==4.15.0 + # via mkdocstrings-python +urllib3==2.6.2 # via requests watchdog==6.0.0 # via mkdocs +zipp==3.23.0 + # via importlib-metadata diff --git a/pyproject.toml b/pyproject.toml index 5415f36..8b71895 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,8 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13" + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14" ] dependencies = [ "googleapis-common-protos", From 62d339c354812ed2c8bb43f5645bd734e0e0b871 Mon Sep 17 00:00:00 2001 From: 0x26res Date: Fri, 13 Mar 2026 15:43:39 +0000 Subject: [PATCH 2/3] Post rebase --- .pre-commit-config.yaml | 21 +++----- docs/requirements.txt | 48 +++++++----------- pyproject.toml | 105 +++++++++++++++++----------------------- 3 files changed, 71 insertions(+), 103 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3e9bd6c..d60cf38 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,29 +9,20 @@ repos: - id: end-of-file-fixer - id: mixed-line-ending - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.14.10 + rev: v0.15.6 hooks: - - id: ruff + - id: ruff-check args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - repo: https://github.com/PyCQA/bandit - rev: 1.9.2 + rev: 1.9.4 hooks: - id: bandit additional_dependencies: - ".[toml]" args: [--config=pyproject.toml] - - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: v2.15.0 - hooks: - - id: pretty-format-toml - files: "^.*.toml" - args: - - "--autofix" - - repo: https://github.com/astral-sh/uv-pre-commit - # uv version. - rev: 0.9.21 + rev: 0.10.9 hooks: - id: uv-lock - repo: https://github.com/igorshubovych/markdownlint-cli @@ -42,3 +33,7 @@ repos: args: - "--disable=MD013" - "--fix" + - repo: https://github.com/tox-dev/pyproject-fmt + rev: v2.18.1 + hooks: + - id: pyproject-fmt diff --git a/docs/requirements.txt b/docs/requirements.txt index aaed3cb..94e8925 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,37 +1,29 @@ # This file was autogenerated by uv via the following command: # uv pip compile ./requirements.in -babel==2.17.0 +babel==2.18.0 # via mkdocs-material -backrefs==6.1 +backrefs==6.2 # via mkdocs-material -certifi==2025.11.12 +certifi==2026.2.25 # via requests -charset-normalizer==3.4.4 +charset-normalizer==3.4.5 # via requests -click==8.1.8 +click==8.3.1 # via mkdocs colorama==0.4.6 - # via - # griffe - # mkdocs-material + # via mkdocs-material ghp-import==2.1.0 # via mkdocs -griffe==1.14.0 +griffelib==2.0.0 # via mkdocstrings-python idna==3.11 # via requests -importlib-metadata==8.7.1 - # via - # markdown - # mkdocs - # mkdocs-get-deps - # mkdocstrings jinja2==3.1.6 # via # mkdocs # mkdocs-material # mkdocstrings -markdown==3.9 +markdown==3.10.2 # via # markdown-include # mkdocs @@ -57,35 +49,35 @@ mkdocs==1.6.1 # mkdocs-autorefs # mkdocs-material # mkdocstrings -mkdocs-autorefs==1.4.3 +mkdocs-autorefs==1.4.4 # via # mkdocstrings # mkdocstrings-python -mkdocs-get-deps==0.2.0 +mkdocs-get-deps==0.2.2 # via mkdocs -mkdocs-material==9.7.1 +mkdocs-material==9.7.5 # via -r ./requirements.in mkdocs-material-extensions==1.3.1 # via # -r ./requirements.in # mkdocs-material -mkdocstrings==0.30.1 +mkdocstrings==1.0.3 # via # -r ./requirements.in # mkdocstrings-python -mkdocstrings-python==1.18.2 +mkdocstrings-python==2.0.3 # via mkdocstrings -packaging==25.0 +packaging==26.0 # via mkdocs paginate==0.5.7 # via mkdocs-material -pathspec==0.12.1 +pathspec==1.0.4 # via mkdocs -platformdirs==4.4.0 +platformdirs==4.9.4 # via mkdocs-get-deps pygments==2.19.2 # via mkdocs-material -pymdown-extensions==10.19.1 +pymdown-extensions==10.21 # via # -r ./requirements.in # mkdocs-material @@ -104,11 +96,7 @@ requests==2.32.5 # via mkdocs-material six==1.17.0 # via python-dateutil -typing-extensions==4.15.0 - # via mkdocstrings-python -urllib3==2.6.2 +urllib3==2.6.3 # via requests watchdog==6.0.0 # via mkdocs -zipp==3.23.0 - # via importlib-metadata diff --git a/pyproject.toml b/pyproject.toml index 8b71895..311e76d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,82 +1,67 @@ [build-system] build-backend = "hatchling.build" -requires = ["hatchling", "uv-dynamic-versioning"] - -[dependency-groups] -dev = [ - "Jinja2>=3.1.2", - "coverage>=6.5.0", - "flake8>=5.0.4", - "git-changelog>=2.2.0", - "grpcio-tools>=1.46.0", - "inflection>=0.5.1", - "isort>=5.10.1", - "mkdocs>=1.4.2", - "mkdocs-material>=9.0.3", - "mkdocstrings[python]>=0.21.2", - "pip-tools>=6.12.1", - "pre-commit>=2.20.0", - "pylint>=2.15.0", - "pytest>=7.2.0", - "pytest-benchmark>=4.0.0", - "pytest-cov", - "pytest-xdist>=3.1.0", - "ruff" -] +requires = [ "hatchling", "uv-dynamic-versioning" ] [project] -authors = [{name = "Tradewell Tech", email = "engineering@tradewelltech.co"}] +name = "protarrow" +description = "Convert from protobuf to arrow and back" +readme = "README.md" +keywords = [ "apache-arrow", "data", "protobuf" ] +license = "Apache-2.0" +maintainers = [ { name = "0x26res", email = "0x26res@gmail.com" } ] +authors = [ { name = "Tradewell Tech", email = "engineering@tradewelltech.co" } ] +requires-python = ">=3.9,<4" classifiers = [ "Development Status :: 4 - Beta", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", + "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.14" -] -dependencies = [ - "googleapis-common-protos", - "protobuf", - "pyarrow" + "Programming Language :: Python :: 3.14", ] -description = "Convert from protobuf to arrow and back" +dynamic = [ "version" ] +dependencies = [ "googleapis-common-protos", "protobuf", "pyarrow" ] +urls."Bug Tracker" = "https://github.com/tradewelltech/protarrow/issues" +urls.Changelog = "https://github.com/tradewelltech/protarrow/blob/main/CHANGELOG.md" documentation = "https://protarrow.readthedocs.io/en/latest/" -dynamic = ["version"] -keywords = ["apache-arrow", "protobuf", "data"] -license = "Apache-2.0" -maintainers = [{name = "0x26res", email = "0x26res@gmail.com"}] -name = "protarrow" -packages = [ - {include = "protarrow"} -] -readme = "README.md" +packages = [ { include = "protarrow" } ] repository = "https://github.com/tradewelltech/protarrow" -requires-python = ">=3.9,<4" - -[project.urls] -"Bug Tracker" = "https://github.com/tradewelltech/protarrow/issues" -"Changelog" = "https://github.com/tradewelltech/protarrow/blob/main/CHANGELOG.md" -[tool.bandit] -skips = ["B101", "B311"] - -[tool.hatch.build.hooks.version] -path = "protarrow/_version.py" -template = ''' -version = "{version}" -''' +[dependency-groups] +dev = [ + "coverage>=6.5", + "flake8>=5.0.4", + "git-changelog>=2.2", + "grpcio-tools>=1.46", + "inflection>=0.5.1", + "isort>=5.10.1", + "jinja2>=3.1.2", + "mkdocs>=1.4.2", + "mkdocs-material>=9.0.3", + "mkdocstrings[python]>=0.21.2", + "pip-tools>=6.12.1", + "pre-commit>=2.20", + "pylint>=2.15", + "pytest>=7.2", + "pytest-benchmark>=4", + "pytest-cov", + "pytest-xdist>=3.1", + "ruff" +] -[tool.hatch.version] -source = "uv-dynamic-versioning" +[tool.hatch] +build.hooks.version.path = "protarrow/_version.py" +build.hooks.version.template = """version = "{version}" +""" +version.source = "uv-dynamic-versioning" [tool.ruff] line-length = 88 +lint.select = [ "C", "E", "F", "I", "PERF" ] -[tool.ruff.lint] -select = ["E", "F", "C", "I", "PERF"] - -[tool.ruff.lint.isort] -known-first-party = ["protarrow", "protarrow_protos"] +[tool.bandit] +skips = [ "B101", "B311" ] From c94a696f5cf92d0a9c28a2b6eed7e5de33675bc4 Mon Sep 17 00:00:00 2001 From: 0x26res Date: Fri, 13 Mar 2026 15:45:10 +0000 Subject: [PATCH 3/3] feat: fix warning --- tests/test_coverage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_coverage.py b/tests/test_coverage.py index f3a3c0e..3229546 100644 --- a/tests/test_coverage.py +++ b/tests/test_coverage.py @@ -517,14 +517,14 @@ def test_arrow_missing_function(): with pytest.raises( pa.ArrowNotImplementedError, match="DictionaryArray converter for type" - " dictionary\ not implemented", + r" dictionary\ not implemented", ): pa.array([], pa.dictionary(pa.int32(), pa.large_string())) with pytest.raises( pa.ArrowNotImplementedError, match="DictionaryArray converter for type" - " dictionary\ not implemented", + r" dictionary\ not implemented", ): pa.array([], pa.dictionary(pa.int32(), pa.large_binary()))