tadeja commented on code in PR #55264:
URL: https://github.com/apache/arrow/pull/55264#discussion_r4585525058


##########
python/pyarrow-stubs-tests/test_array.py:
##########
@@ -23,13 +23,13 @@
 
 import pyarrow as pa
 from pyarrow._compute import CastOptions
+from pyarrow.lib import asarray

Review Comment:
   ok, so `asarray` is internal, not exported from `pa`, not documented, 
doesn't have own runtime tests.
   If you @jorisvandenbossche and @AlenkaF both approve removal, then these 
details would be removed:
   
   <details><summary>Details</summary>
   <p>
   
   
   ```diff
   diff --git a/python/pyarrow-stubs-tests/test_array.py 
b/python/pyarrow-stubs-tests/test_array.py
   @@ -23,16 +23,10 @@ from typing_extensions import CapsuleType
    
    import pyarrow as pa
    from pyarrow._compute import CastOptions
   -from pyarrow.lib import asarray
    
    from _check import assert_type, check
    
    
   -class _PyArrowArrayProvider:
   -    def __arrow_array__(self, type: pa.DataType | None = None) -> pa.Array:
   -        return pa.array([1, 2], type=type)
   -
   -
    def test_array() -> None:
   @@ -80,10 +74,6 @@ def test_array() -> None:
    
    def test_array_constructors() -> None:
        check(assert_type(pa.array([1, 2]), pa.Array), pa.Int64Array)
   -    check(assert_type(asarray([1, 2]), pa.Array), pa.Int64Array)
   -    check(assert_type(asarray(pa.chunked_array([[1, 2]])), pa.ChunkedArray),
   -          pa.ChunkedArray)
   -    check(assert_type(asarray(_PyArrowArrayProvider()), pa.Array), 
pa.Int64Array)
        check(assert_type(pa.nulls(2, pa.int8()), pa.Array), pa.Int8Array)
    
   diff --git a/python/pyarrow-stubs/__lib/array.pyi 
b/python/pyarrow-stubs/__lib/array.pyi
   @@ -43,7 +43,6 @@ from pyarrow._stubs_typing import (
    from pyarrow.lib import (
        BaseExtensionType,
        Buffer,
   -    ChunkedArray,
        DataType,
        Device,
        DeviceAllocationType,
   @@ -72,19 +71,6 @@ def array(
        safe: bool = True,
        memory_pool: MemoryPool | None = None,
    ) -> Array: ...
   -@overload
   -def asarray(  # type: ignore[overload-overlap]
   -    values: ChunkedArray, type: Any | None = None
   -) -> ChunkedArray: ...
   -@overload
   -def asarray(
   -    values: Array
   -    | Iterable[Any]
   -    | SupportsArrowArray
   -    | SupportsArrowDeviceArray
   -    | SupportsPyArrowArray,
   -    type: Any | None = None,
   -) -> Array: ...
    def nulls(
        size: int,
        type: Any | None = None,
   @@ -574,7 +560,6 @@ def _empty_array(type: DataType) -> Array: ...
    
    __all__ = [
        "array",
   -    "asarray",
        "nulls",
        "repeat",
        "infer_type",
   ``` 
   
   
   </p>
   </details> 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to