Skip to content

Always create TZ-aware datetime objects. (also drop support for python 2)#267

Merged
solarkennedy merged 3 commits intothefactory:masterfrom
EvanKrall:timezones
Nov 14, 2019
Merged

Always create TZ-aware datetime objects. (also drop support for python 2)#267
solarkennedy merged 3 commits intothefactory:masterfrom
EvanKrall:timezones

Conversation

@EvanKrall
Copy link
Copy Markdown
Contributor

I'm tired of dealing with bugs in Paasta where the "naive" datetime objects returned by marathon-python inevitably are assumed to be in a different timezone than they really are.

We know exactly what timezone Marathon is emitting (it's always UTC); let's not have marathon-python act like we don't know that.

I recommend reading this branch one commit as a time. The goal of the PR is the last two commits, but in the first commit I drop support for py2 because the datetime library interface is different between py2 and py3 (notably, py2 does not have datetime.timezone), and because py2 goes out of support in 6 weeks.

@EvanKrall
Copy link
Copy Markdown
Contributor Author

Seems like the integration tests already broken in master with E: Unable to locate package oracle-java8-installer.

@solarkennedy
Copy link
Copy Markdown
Contributor

Yea, I fought the itests for a while and gave up :(

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants