-
-
Notifications
You must be signed in to change notification settings - Fork 945
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
feat(misc): return timezone aware datetime objects #2246
Conversation
let http_date_to_dt validate timezone information from the provided http-date and return timezone aware datetime objects remove tests for timezone naive variants amend tests Breaks any application relying on naiveness of datetimes or interpretation in local time. Closes falconry#2182
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2246 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 63 63
Lines 7329 7335 +6
Branches 1276 1277 +1
=========================================
+ Hits 7329 7335 +6 ☔ View full report in Codecov by Sentry. |
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.
Thanks for the PR!
I've left a couple of comments
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 ok to me. Just left a question over abundance of caution.
Thanks for participating to the sprint!
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.
Thanks for Sprinting, and thanks for this improvement!
It looks great for the most of it, although we need to revise compliance with the RFC(s) in question before merging.
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.
OK, so given the required polishing is quite limited in scope, we can merge this, and follow up with a new PR to address the mentioned points.
Thank you once again for the thorough analysis of the problem, and working on this, @chgad!
let http_date_to_dt validate timezone information from the provided http-date and return timezone aware datetime objects remove tests for timezone naive variants
amend tests
Breaks any application relying on naiveness of datetimes or interpretation in local time. Closes #2182
Summary of Changes
Make the function http_date_to_dt validate timezone inforamtion of a http-date and return timezone aware datetime objects.
Related Issues
#2182
Pull Request Checklist
This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once; it will save you a few review cycles!
If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.
docs/
.docs/
.versionadded
,versionchanged
, ordeprecated
directives.docs/_newsfragments/
, with the file name format{issue_number}.{fragment_type}.rst
. (Runtowncrier --draft
to ensure it renders correctly.)If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!
PR template inspired by the attrs project.