[Python] `Array.from_buffers` docs should mention safety issues

Open Beginner friendly
#49,717 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
documentation

Research direction

Locate the Python docstrings for Array.from_buffers and similar subclass methods such as StringArray.from_buffers. Update them to state that callers must provide valid Arrow data or call validate on the result, and consider the work done when the safety warning is present for the relevant methods.

Written by the indexing model from the issue text.

Description

Component: Python Type: enhancement
Describe the enhancement requested

The docstring for Array.from_buffers (and similar methods on subclasses, e.g. StringArray.from_buffers) should explicitly mention that the caller is responsible for passing valid Arrow data (or calling validate on the result), otherwise they could encounter crashes when using the result.

Component(s)

Python

Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
93

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/arrow

All issues in apache/arrow

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.