-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
Issue #407: Migrate to arrow 1.0.0 #408
Conversation
- requirements.txt: specify arrow==1.00 - frames.py, fullmoon.py, watson.py: change "timestamp" to "int_timestamp"
- cli.py: change "date.tzinfo = tz.tzlocal()" to "date.replace(tzinfo=tz.tzlocal())"
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.
Looks like you'll have to also fix the tests... Thanks! 🙏
This makes sense, especially given that arrow is already up to 1.0.2 Co-authored-by: Julien Maupetit <[email protected]>
I took a quick look and there is an issue with timezone localization, making "add --from" and "add --to" work incorrectly. I need to investigate further. |
- watson.cli.py: use date = date.replace(tzinfo=tz.tzlocal()) (date.replace does not modify the existing object)
Update unit test cases: - tests/test_cli.py: replace arrow.arrow.datetime with arrow.arrow.dt_datetime - tests/test_watson.py: replace .timestamp with .int_timestamp
I fixed the unit test cases and also another issue with the timezone. The proper way to change the timezone of an arrow date is now:
The travis build failed because arrow 1.0.0 is not available for python 3.5. |
Thank you so much @veganjay 🙏
Agreed! Can you add consequent changes in this PR & fill the CHANGELOG to mention arrow major release upgrade + dropped python 3.5 support? Thx ❤️ |
- .travis.yml: remove python 3.5 - setup.py: require python >= 3.6 - CHANGELOG.md: mention arrow upgrade and drop of python 3.5 support
Removed support for 3.5 and updated the CHANGELOG. By the way, I installed td-watson with pipx:
This way the arrow library and other dependencies are installed in their own isolated environment. This is helpful if working on various other virtualenvs during the day. |
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.
Thank you @veganjay 🙏 ❤️
The arrow library moved to 1.0.0 on February 24, 2021 and with it came breaking changes.
This pull request addresses those changes per the arrow migration guide.