You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/24 15:08:48 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #12522: ARROW-15580: [Python] Make pytz an actual optional dependency of PyArrow

pitrou commented on a change in pull request #12522:
URL: https://github.com/apache/arrow/pull/12522#discussion_r834413860



##########
File path: cpp/src/arrow/python/datetime.cc
##########
@@ -461,18 +564,19 @@ Result<std::string> TzinfoToString(PyObject* tzinfo) {
     return PyTZInfo_utcoffset_hhmm(tzinfo);
   }
 
-  // try to look up zone attribute
-  if (PyObject_HasAttrString(tzinfo, "zone")) {
+  // if pytz is installed and tzinfo is and instance of pytz.BaseTzInfo

Review comment:
       ```suggestion
     // if pytz is installed and tzinfo is an instance of pytz.BaseTzInfo
   ```

##########
File path: cpp/src/arrow/python/datetime.cc
##########
@@ -482,7 +586,9 @@ Result<std::string> TzinfoToString(PyObject* tzinfo) {
 
   // try to look up _filename attribute
   // in case of dateutil.tz object

Review comment:
       Did you mean to keep these comments?




-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org