You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Krisztian Szucs (Jira)" <ji...@apache.org> on 2020/09/28 09:25:00 UTC

[jira] [Resolved] (ARROW-9993) [Python] Tzinfo - string roundtrip fails on pytz.StaticTzInfo objects

     [ https://issues.apache.org/jira/browse/ARROW-9993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Krisztian Szucs resolved ARROW-9993.
------------------------------------
    Resolution: Fixed

> [Python] Tzinfo - string roundtrip fails on pytz.StaticTzInfo objects
> ---------------------------------------------------------------------
>
>                 Key: ARROW-9993
>                 URL: https://issues.apache.org/jira/browse/ARROW-9993
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>            Reporter: Krisztian Szucs
>            Assignee: Krisztian Szucs
>            Priority: Major
>             Fix For: 2.0.0
>
>
> Timezone roundtrip fails with {{pytz.StaticTzInfo}} objects on master:
> {code:python}
> tz = pytz.timezone('Etc/GMT+1')
> pa.lib.string_to_tzinfo(pa.lib.tzinfo_to_string(tz))
> {code}
> {code}
> ---------------------------------------------------------------------------
> UnknownTimeZoneError                      Traceback (most recent call last)
> <ipython-input-4-b890180b2fad> in <module>
> ----> 1 pa.lib.string_to_tzinfo(pa.lib.tzinfo_to_string(tz))
> ~/Workspace/arrow/python/pyarrow/types.pxi in pyarrow.lib.string_to_tzinfo()
>    1838         Time zone object
>    1839     """
> -> 1840     cdef PyObject* tz = GetResultValue(StringToTzinfo(name.encode('utf-8')))
>    1841     return PyObject_to_object(tz)
>    1842
> ~/Workspace/arrow/python/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
>     120 cdef api int pyarrow_internal_check_status(const CStatus& status) \
>     121         nogil except -1:
> --> 122     return check_status(status)
> ~/.conda/envs/arrow38/lib/python3.8/site-packages/pytz/__init__.py in timezone(zone)
>     179                 fp.close()
>     180         else:
> --> 181             raise UnknownTimeZoneError(zone)
>     182
>     183     return _tzinfo_cache[zone]
> UnknownTimeZoneError: '-01'
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)