-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
Component: PythonStatus: stale-warningIssues and PRs flagged as stale which are due to be closed if no indication otherwiseIssues and PRs flagged as stale which are due to be closed if no indication otherwiseType: enhancement
Description
Currently tzinfo_to_string errors with Not an instance of datetime.tzinfo when timezone is None.
>>> tz = None
>>> import pyarrow
>>> pyarrow.lib.tzinfo_to_string(None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pyarrow/types.pxi", line 2080, in pyarrow.lib.tzinfo_to_string
return frombytes(GetResultValue(TzinfoToString(<PyObject*>tz)))
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
return check_status(status)
File "pyarrow/error.pxi", line 122, in pyarrow.lib.check_status
raise ArrowTypeError(message)
pyarrow.lib.ArrowTypeError: Not an instance of datetime.tzinfotzinfo_to_string should accept None also. With this arrays() in python/pyarrow/tests/strategies.py in case of timestamp dtype should also accept None.
See
- https://github.com/apache/arrow/pull/12522#discussion_r822637011
- ARROW-15580: [Python] Make pytz an actual optional dependency of PyArrow #12522 (comment)
Reporter: Alenka Frim / @AlenkaF
Note: This issue was originally created as ARROW-16056. Please see the migration documentation for further details.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Component: PythonStatus: stale-warningIssues and PRs flagged as stale which are due to be closed if no indication otherwiseIssues and PRs flagged as stale which are due to be closed if no indication otherwiseType: enhancement