apache / apache/arrow

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

Open
#50,968 0 comments 0 reactions 0 assignees View on GitHub
Component: Python Type: enhancement
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### 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](https://github.com/astral-sh/docstring-adder/issues/184) 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

Contributor guide

Open the contributing guide

Research direction

Start by comparing the proposed .pyi file layout with PyArrow's runtime module structure and tracing the annotation imports that bridge the difference. Decide whether the files should mirror the runtime structure or be copied into appropriately named files during wheel builds; done means the chosen layout works without those structural adjustments.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.