Skip to content

Conversation

@rok
Copy link
Member

@rok rok commented Dec 22, 2025

Rationale for this change

This is the second in series of PRs adding type annotations to pyarrow and resolving #32609. It builds on top of and should be merged after #48618.

What changes are included in this PR?

This adds:

  • _types.pyi - Core type definitions including
  • _stubs_typing.pyi - Internal typing protocols and helpers used across stub files
  • error.pyi - Exception classes (ArrowException, ArrowInvalid, ArrowIOError, etc.)
  • Minimal placeholder stubs - lib.pyi, io.pyi, scalar.pyi - using __getattr__ to allow imports to resolve while deferring to subsequent PRs

Are these changes tested?

Via CI type checks established in #48618.

Are there any user-facing changes?

Users will start seeing some minimal annotated types.

@rok rok force-pushed the pyarrow-stubs-pr2-core-types branch from d3c5740 to 27d1c65 Compare January 26, 2026 12:57
@rok
Copy link
Member Author

rok commented Jan 26, 2026

I've rebased this on the annotation infra check PR (#48618) to make sure we're on the right track.

@rok rok force-pushed the pyarrow-stubs-pr2-core-types branch 2 times, most recently from 3f9ed3b to 0ac95b0 Compare January 26, 2026 19:11
@rok rok changed the title GH-32609: [Python] Add internal type system stubs (_types, error, _stubs_typing) GH-49103: [Python] Add internal type system stubs (_types, error, _stubs_typing) Jan 31, 2026
@github-actions
Copy link

⚠️ GitHub issue #49103 has been automatically assigned in GitHub to PR creator.

@rok rok force-pushed the pyarrow-stubs-pr2-core-types branch 2 times, most recently from 4daf6ed to 7873930 Compare February 6, 2026 06:54
@rok rok force-pushed the pyarrow-stubs-pr2-core-types branch from 7873930 to 43e7cc6 Compare February 9, 2026 19:11
Co-authored-by: Dan Redding <125183946+dangotbanned@users.noreply.github.com>
@rok rok marked this pull request as ready for review February 9, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants