Skip to content

Commit 07e784c

Browse files
GH-48102: [Python] Remove deprecated Array.format method (#48324)
### Rationale for this change This PR removes the deprecated `Array.format` method as requested in issue #48102. ### What changes are included in this PR? - Removed the deprecated `Array.format` method from the Python API - The method will be automatically removed from the documentation (https://arrow.apache.org/docs/python/generated/pyarrow.Array.html) as it's auto-generated from the source code ### Are these changes tested? Yes, existing tests continue to pass. ### Are there any user-facing changes? **This PR includes breaking changes to public APIs.** The deprecated `Array.format` method has been removed. Users who have not migrated from this deprecated method should use `Array.to_string()` instead. This change was announced in the deprecation warning since 2020. **Migration:** ```python # Old (deprecated) array.format() # New array.to_string() * GitHub Issue: #48102 Authored-by: Eslam Ahmed <eslamahmedd171@gmail.com> Signed-off-by: AlenkaF <frim.alenka@gmail.com>
1 parent 8040f2a commit 07e784c

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

python/pyarrow/array.pxi

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,22 +1465,6 @@ cdef class Array(_PandasConvertible):
14651465

14661466
return frombytes(result, safe=True)
14671467

1468-
def format(self, **kwargs):
1469-
"""
1470-
DEPRECATED, use pyarrow.Array.to_string
1471-
1472-
Parameters
1473-
----------
1474-
**kwargs : dict
1475-
1476-
Returns
1477-
-------
1478-
str
1479-
"""
1480-
import warnings
1481-
warnings.warn('Array.format is deprecated, use Array.to_string')
1482-
return self.to_string(**kwargs)
1483-
14841468
def __str__(self):
14851469
return self.to_string()
14861470

0 commit comments

Comments
 (0)