Live data from Hacker News

Whenever: Typed and DST-safe datetimes for Python

github.com

1–10 of 151 posts

Re: Whenever: Typed and DST-safe datetimes for Python

#4
I’ve tried Arrow, Delorean, and Pendulum, plus the stdlib datetime of course, and settled on Whenever. It fits what I actually do with datetimes better, plus it seems more actively maintained. With the others I always seem to have a nagging feeling in the back of my mind that I am missing a whole load of edge cases. With Pendulum that seems more baked into the API.

Re: Whenever: Typed and DST-safe datetimes for Python

#6

Ah nice it solves the Liskov violation that the standard library has. In the standard library, dates can be compared with I wonder what benefits this choice has that outweigh the risks of this behavior.

What do you expect? There are so many ways to handle this behvaiour it's pretty obvious why this is not allowed. Do you take datetime.date and then compare? Do you assume all dates are datetimes at midnight?

Re: Whenever: Typed and DST-safe datetimes for Python

#8
> available in Rust or pure Python.

Hard pass. The complexity of having to use binary packages or build things is not worth the performance benefit. The pure-Python version requires building from source and passing special flags, so it is not possible to specify it in requirements.txt.

Re: Whenever: Typed and DST-safe datetimes for Python

#9
Am I the only one to stick with the std lib, read the docs and changelogs carefully, and implement functions I really need the way my application makes use of them?

I learned the hard way, that dependencies kill projects.

Not saying this isn't great, thanks for creating it! It does have its use cases, of course.

Re: Whenever: Typed and DST-safe datetimes for Python

#10
post #8

> available in Rust or pure Python. Hard pass. The complexity of having to use binary packages or build things is not worth the performance benefit. The pure-Python version requires building from source and passing special flags, so it is not possible to specify it in requirements.txt.

That seems like an easy fix, they could release it as `whenever[pure]`. It would probably take less time to write up the issue than to write your comment.
Post reply on HN