Skip to content

[Python][Annotations] Should structure of annotations reflect structure of PyArrow at runtime #50968

Open

Description

@rok

Describe the enhancement requested

Currently proposed PyArrow annotations are stored in files to reflecting module names. PyArrow at runtime is structured slightly differently and the difference is adjusted for with annotation imports. As discussed here we should probably structure .pyi files such that they reflect the runtime structure of PyArrow.

Alternatively we could copy annotations into appropriately named files at wheel build time.

Component(s)

Python

Activity

  1. snigdhachoppac commented on Sep 14, 2026

    @snigdhachoppac
    Contributor

    Hi! I’m interested in working on this issue. I’m planning to first inspect how the current .pyi files differ from PyArrow’s runtime module structure, then propose reorganizing them to match the runtime structure while updating the relevant imports and annotation tests. Would that be the preferred approach over copying the files during the wheel build?

  2. rok commented on Sep 14, 2026

    @rok
    MemberAuthor

    Thank you for your interest, however this issue is meant to be addressed only after all the other annotation work is complete. We are organizing a contracted effort to complete that work soon, but before we do work on this issue would likely be counterproductive.
    I would suggest to look for other currently open issues, especially ones labeled with needs champion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions