-
-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update tzlocal to v4.x and remove pytz dependency #1528
Conversation
# Conflicts: # poetry.lock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @outa, thank you for working on this! I just merged the develop branch in after our 3.0 release to update the poetry.lock file, and I still see a couple issues in the Mac tests on this PR. Let us know if you have any questions about those or would like any help.
Hi Micah! So after you merged the develop branch, the tests were failing on my laptop (using Ubuntu). However in the Gitlab pipeline they passed for some reason. I think we are running into this issue: regebro/tzlocal#131 I am trying to work around that now. However debugging the macOS tests is a bit difficult for me, because I don't have access to a macOS machine. Is there some way to test in a mac environment before pushing changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a tricky one, but you nailed it. Thank you!
Conflicts: poetry.lock
Conflicts: poetry.lock
Only an issue with DayOne journals. c.f. jrnl-org/jrnl#1528 c.f. https://github.com/regebro/tzlocal#api-change
Changes
pytz
dependency and replace it with zoneinfo from stdlib (rationale: https://pytz-deprecation-shim.readthedocs.io/en/latest/index.html)Caveats
There are some differences between pytz's
is_dst
and datetime'sfold
argument: https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html#semantic-differences-between-is-dst-and-foldI had to adapt a test for this. I don't know what the implications of this would be for jrnl. Please decide if this is reasonable for you.
Closes: #1338
Checklist
for the same issue.