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/29 08:49:22 UTC

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

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



##########
File path: python/pyarrow/tests/strategies.py
##########
@@ -96,10 +103,14 @@
     pa.time64('us'),
     pa.time64('ns')
 ])
+if tzst and zoneinfo:
+    timezones = st.one_of(st.none(), tzst.timezones(), st.timezones())
+else:

Review comment:
       ```suggestion
   if tzst and zoneinfo:
       timezones = st.one_of(st.none(), tzst.timezones(), st.timezones())
   elif tzst:
       timezones = st.one_of(st.none(), tzst.timezones())
   elif zoneinfo:
       timezones = st.one_of(st.none(), st.timezones())
   else:
   ```

##########
File path: python/pyarrow/tests/strategies.py
##########
@@ -261,17 +274,23 @@ def arrays(draw, type, size=None, nullable=True):
     elif pa.types.is_date(ty):
         value = st.dates()
     elif pa.types.is_timestamp(ty):
+        if zoneinfo is None:
+            pytest.skip('no module named zoneinfo')
+        if ty.tz is None:
+            pytest.skip('requires timezone not None')

Review comment:
       We can maybe try to tackle this as a follow-up JIRA?




-- 
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