Skip to content

ARROW-5248: [Python] support zoneinfo / dateutil timezones#12421

Closed
AlenkaF wants to merge 10 commits into
apache:masterfrom
AlenkaF:ARROW-5248
Closed

ARROW-5248: [Python] support zoneinfo / dateutil timezones#12421
AlenkaF wants to merge 10 commits into
apache:masterfrom
AlenkaF:ARROW-5248

Conversation

@AlenkaF

@AlenkaF AlenkaF commented Feb 14, 2022

Copy link
Copy Markdown
Member

This PR tries to add support for zoneinfo and dateutil timezones.

  • Add support for the zoneinfo
  • Add tests for zoneinfo support
  • Add support for dateutil
  • Add tests for dateutil support

@github-actions

Copy link
Copy Markdown

Comment thread cpp/src/arrow/python/datetime.cc Outdated
@AlenkaF AlenkaF force-pushed the ARROW-5248 branch 2 times, most recently from 2251387 to 9a1d393 Compare February 15, 2022 05:28

@jorisvandenbossche jorisvandenbossche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good!

From talking about it:

  • Dateutil is optional dependency, and zoneinfo only available from Python 3.9 onwards, so in C++ we (for now) can remove the imports
  • The tests will need to add a skip if the package is not available (pytest has a importorskip helper that can be used for this)

Comment thread cpp/src/arrow/python/datetime.cc Outdated
@AlenkaF

AlenkaF commented Feb 15, 2022

Copy link
Copy Markdown
Member Author

Thanks for reviewing Joris! Currently:

  • imports are removed
  • test is split and skipped in case zoneinfo is not available
  • comments for the check in case of zoneinfo and dateutil objects are added

I would leave the handling of zoneinfo and dateutil objects in TzinfoToString as is (looking up 'key' and '_filename' attribute) and plan to restructure (to check for an instance of the object) together with pytz change for https://issues.apache.org/jira/browse/ARROW-15580.

There is a CI error with appveyor: 43 - arrow-dataset-file-csv-test (Failed) in ctest. Don't know what would cause that -will look into it a bit more.

@AlenkaF AlenkaF marked this pull request as ready for review February 15, 2022 14:12
@jorisvandenbossche

jorisvandenbossche commented Feb 15, 2022

Copy link
Copy Markdown
Member

There is a CI error with appveyor: 43 - arrow-dataset-file-csv-test (Failed) in ctest. Don't know what would cause that -will look into it a bit more.

That looks like an unrelated error (although I don't see it happening on master). I restarted Appveyor to see if that fixes it.

Comment thread cpp/src/arrow/python/datetime.cc Outdated
Comment thread python/pyarrow/tests/test_types.py Outdated
@AlenkaF

AlenkaF commented Feb 22, 2022

Copy link
Copy Markdown
Member Author

@jorisvandenbossche it looks like the error on Travis isn't connected, so this PR should be ready.

Comment thread python/pyarrow/tests/test_types.py
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
@AlenkaF

AlenkaF commented Feb 24, 2022

Copy link
Copy Markdown
Member Author

@jorisvandenbossche unrelated Ci issue again, I think ...

@jorisvandenbossche

Copy link
Copy Markdown
Member

Thanks!

@ursabot

ursabot commented Feb 24, 2022

Copy link
Copy Markdown

Benchmark runs are scheduled for baseline = 094c5ba and contender = 82f8ee3. 82f8ee3 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️25.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️0.17% ⬆️0.0%] test-mac-arm
[Finished ⬇️0.71% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.0% ⬆️0.04%] ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants