-
-
Notifications
You must be signed in to change notification settings - Fork 678
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
allow datetime.timedelta for leeway arg #56
Conversation
Btw, the tests directly call into |
Sigh, Python 2.6 doesn't have |
@wbolster LGTM. Let's also update the README to document this behavior. |
ok will update the readme with examples "José Padilla" notifications@github.com schreef op 2 januari 2015 19:59:36 CET:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
import hashlib | ||
import hmac | ||
import sys | ||
|
||
from datetime import datetime |
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.
I think this would be cleaner if we kept this line and added timedelta
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.
Specifically, it doesn't make sense to add datetime.
in 10+ places when we can just add timedelta to this import.
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.
Agree with this.
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.
Okay, will change. I just have a personal distaste for non-module imports. ;)
I've pushed an updated version. The imports are simpler now, and I've updated the README. The exception approach for Python 2.6 compatibility due to missing |
Looks good to me |
Allow datetime.timedelta for leeway arg
@wbolster thinking about dropping the checks for leeway = leeway.days * 24 * 60 * 60 + leeway.seconds |
Sure, would be fine with a comment explaining why. But think about those poor microseconds! :) |
This fixes #54.