jorisvandenbossche commented on a change in pull request #12421: URL: https://github.com/apache/arrow/pull/12421#discussion_r809251404
########## File path: cpp/src/arrow/python/datetime.cc ########## @@ -427,6 +427,8 @@ Result<PyObject*> StringToTzinfo(const std::string& tz) { Result<std::string> TzinfoToString(PyObject* tzinfo) { OwnedRef module_pytz; // import pytz OwnedRef module_datetime; // import datetime + OwnedRef module_zoneinfo; // import zoneinfo + OwnedRef module_dateutil; // import dateutil Review comment: Since you removed the imports, I think you can remove those declarations as well (they are not used now?) ########## File path: python/pyarrow/tests/test_types.py ########## @@ -297,12 +298,23 @@ def test_is_primitive(): (pytz.timezone('Etc/GMT-9'), 'Etc/GMT-9'), (pytz.FixedOffset(180), '+03:00'), (datetime.timezone.utc, 'UTC'), - (datetime.timezone(datetime.timedelta(hours=1, minutes=30)), '+01:30') + (datetime.timezone(datetime.timedelta(hours=1, minutes=30)), '+01:30'), + (dateutil.tz.gettz('Europe/Brussels'), 'Europe/Brussels'), + (dateutil.tz.UTC, 'UTC') Review comment: Can you also split the dateutil test in its own test, done similarly as the zoneinfo one? Strictly speaking also dateutil is an optional dependency -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org