Fix TypeError: can't subtract offset-naive and offset-aware datetimes error when using default basedates. Basedates must always contain timezone information.
Use timezone.utc rather than datetime.UTC for compatibility with older Python versions.
Fixes #23
Testing
Please test all changes, however trivial, against the supplied pytest suite tests/test_*.py. Please describe any test cases you have amended or added to this suite to maintain >= 90% code coverage.
[x] static tests updated to use timezoned timestamps
[x] stream tests updated to use timezoned timestamps
pyspartn Pull Request Template
Description
FIXES:
TypeError: can't subtract offset-naive and offset-aware datetimes
error when using default basedates. Basedates must always contain timezone information.timezone.utc
rather thandatetime.UTC
for compatibility with older Python versions.Fixes #23
Testing
Please test all changes, however trivial, against the supplied pytest suite
tests/test_*.py
. Please describe any test cases you have amended or added to this suite to maintain >= 90% code coverage.Checklist:
CONTRIBUTING.MD
).tests/test_*.py
pytest suite to maintain >= 85% code coverage.tests/test_*.py
unittest suite.