Skip to content

Conversation

@dingo4dev
Copy link
Contributor

Rationale for this change

This PR adds pyarrow-stubs to the project's development dependencies which provide suggestions and parameter hints, speeding up development.

Are these changes tested?

Tested the type hint

Are there any user-facing changes?

No. This is strictly a development dependency and does not affect the runtime package distributed to users.

Copilot AI review requested due to automatic review settings November 18, 2025 07:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds the pyarrow-stubs package as a development dependency to provide type hints and IDE suggestions for PyArrow, improving the development experience without affecting the runtime package.

  • Added pyarrow-stubs>=20.0.0.20251107 to the dev dependency group
  • Updated the lock file to include the new dependency and its transitive dependencies

Reviewed Changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
pyproject.toml Added pyarrow-stubs to the dev dependency group for improved type hints during development
uv.lock Updated lock file with pyarrow-stubs package metadata and dependency resolution

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Sounds reasonable to me, we have more of them already. I'm a bit disappointed that mypy is silent, and we didn't voilated any annotations :D Thanks @dingo4dev for working on this 🙌

Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

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

LGTM!

Should we also look to add this in the precommit configs?

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
hooks:
- id: mypy
args:
[--config=pyproject.toml]
additional_dependencies:
- types-cachetools
- types-pytest-lazy-fixture
- types-pytz
- types-requests

@rok
Copy link
Member

rok commented Nov 19, 2025

Hi all! As of pyarrow 23.0.0 pyarrow will come with annotations included (pyarrow-stubs will likely not be maintained). We have an open PR that refactors and ingests pyarrow-stubs. We would really appreciate input from downstream libraries!

@dingo4dev
Copy link
Contributor Author

@rok Thanks for the heads up. This is great news from arrow community! As pyarrow-stubs is independent dev package just for type annotation & checking, I think we might seamlessly switch to pyarrow 23.0.0 if released

@dingo4dev
Copy link
Contributor Author

dingo4dev commented Nov 21, 2025

LGTM!

Should we also look to add this in the precommit configs?

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
hooks:
- id: mypy
args:
[--config=pyproject.toml]
additional_dependencies:
- types-cachetools
- types-pytest-lazy-fixture
- types-pytz
- types-requests

@kevinjqliu I added and tried this, I found it not compactible with mypy though.
https://github.com/apache/iceberg-python/actions/runs/19558312158/job/56005297343#step:7:60

@Fokko Fokko merged commit 6806207 into apache:main Nov 25, 2025
8 checks passed
@Fokko
Copy link
Contributor

Fokko commented Nov 25, 2025

Thanks for working on this @dingo4dev. Let's move this forward until pyarrow comes with typing. Thanks @rok for letting us know, we're very much looking forward to that 👍

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.

4 participants