This is an automated email from the ASF dual-hosted git repository.

alenka pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new b095098cf6 MINOR: [Python] `Array.from_buffers` accepts `None` buffers 
(#49163)
b095098cf6 is described below

commit b095098cf64c300603b4f0f0841ed6c645e975bb
Author: Robsdedude <[email protected]>
AuthorDate: Thu Mar 5 15:35:56 2026 +0100

    MINOR: [Python] `Array.from_buffers` accepts `None` buffers (#49163)
    
    
    ### Rationale for this change
    Fix the docs. It seems this is a feature and not just happens to work as 
the code a little below even has an explicit comment:
    
    
https://github.com/apache/arrow/blob/0dfae701ef98aa4a26b9abbaaf3bf01130df3702/python/pyarrow/array.pxi#L1347
    
    ### What changes are included in this PR?
    Document that `Array.from_buffers` takes a `list[Buffer | None]` instead of 
strictly `list[Buffer]`.
    
    ### Are these changes tested?
    *not applicable*
    
    ### Are there any user-facing changes?
    Yes, but not in an API sense :)
    
    Authored-by: Robsdedude <[email protected]>
    Signed-off-by: AlenkaF <[email protected]>
---
 python/pyarrow/array.pxi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/python/pyarrow/array.pxi b/python/pyarrow/array.pxi
index ec58ac727e..78db88e884 100644
--- a/python/pyarrow/array.pxi
+++ b/python/pyarrow/array.pxi
@@ -1304,7 +1304,7 @@ cdef class Array(_PandasConvertible):
             The value type of the array.
         length : int
             The number of values in the array.
-        buffers : List[Buffer]
+        buffers : List[Buffer | None]
             The buffers backing this array.
         null_count : int, default -1
             The number of null entries in the array. Negative value means that
@@ -4013,7 +4013,7 @@ cdef class DictionaryArray(Array):
         type : pyarrow.DataType
         length : int
             The number of values in the array.
-        buffers : List[Buffer]
+        buffers : List[Buffer | None]
             The buffers backing the indices array.
         dictionary : pyarrow.Array, ndarray or pandas.Series
             The array of values referenced by the indices.

Reply via email to