apache / apache/arrow

[Python] Repr of Date scalars and arrays error if they are outside range of stdlib datetime.date

Open
#38,444 1 comment 0 reactions 1 assignee Claimed by @emecii View on GitHub
Component: Python Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the bug, including details regarding any error messages, version, and platform.

Similar to https://github.com/apache/arrow/issues/36323

Repro:

```
import pyarrow as pa
import numpy as np

int32_max = np.iinfo('int32').max
int32_min = np.iinfo('int32').min

print(pa.scalar(int32_max, pa.date32())) # Throws
print(pa.scalar(int32_min, pa.data32())) # Throws
print(pa.array([int32_min, int32_max], pa.date32())) # has error message in repr but doesn't throw, output below
```

```
[
,

]
```

### Component(s)

Python

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.