-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
TypeError: can't subtract offset-naive and offset-aware datetimes #122
Comments
ErikKalkoken
added a commit
to ErikKalkoken/humanize
that referenced
this issue
Jun 30, 2023
ErikKalkoken
added a commit
to ErikKalkoken/humanize
that referenced
this issue
Jun 30, 2023
lemon24
added a commit
to lemon24/reader
that referenced
this issue
Jul 15, 2023
jan-di
added a commit
to jan-di/toggl-track-companion
that referenced
this issue
Jul 17, 2023
Do we know what the expected release/date is for this fix? I'm trying to decide if I should release pinning to 4.6 or wait. |
I've not had chance to check the PR yet, and no-one else has reviewed either. Would you be able to check it? I could probably release next week if all is well. Thanks! |
I use patch from #123 , it works fine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What did you do?
I wanted to calculate naturaltime between two timezone aware datatimes.
What did you expect to happen?
Get a string the with naturaltime between those datetimes.
What actually happened?
A TypeError exception was raised:
What versions are you using?
Please include code that reproduces the issue.
The best reproductions are self-contained scripts with minimal dependencies.
Additional information
This bug was introduced with 4.7, the code works fine with 4.6.
As a workaround one could remove the
when=my_now
part (a workaround to get it the function working with aware datetimes), but then it no longer works with humanize < 4.7, which would make 4.7 a breaking change. And it would also not work for whenwhen
is used in any other way.The text was updated successfully, but these errors were encountered: