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?
Whenever: Typed and DST-safe datetimes for Python
11–20 of 151 posts
Re: Whenever: Typed and DST-safe datetimes for Python
#12I am currently enjoying DST-free life in Japan, and feel that people around the world deserve to get this much respect from their own official clocks.
Re: Whenever: Typed and DST-safe datetimes for Python
#13Ah 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.
Re: Whenever: Typed and DST-safe datetimes for Python
#14Ah 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
#15> 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.
You can put any flags in requirements.txt, including -r[equiring] another txt etc.
Your point may apply to modern pyproject.toml tooling though, or at least that it wouldn't be simply another entry in the dependencies array.
Re: Whenever: Typed and DST-safe datetimes for Python
#16Am 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
#17A tangent, but I hope the world gets its shit together and gets rid of DST. I am currently enjoying DST-free life in Japan, and feel that people around the world deserve to get this much respect from their own official clocks.
Re: Whenever: Typed and DST-safe datetimes for Python
#18Am 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.
That's why I use a Flake8 plugin to prohibit especially egregious footguns.
Re: Whenever: Typed and DST-safe datetimes for Python
#19> 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.
> The pure-Python version requires building from source and passing special flags, so it is not possible to specify it in requirements.txt. You can put any flags in requirements.txt, including -r[equiring] another txt etc. Your point may apply to modern pyproject.toml tooling though, or at least that it wouldn't be simply another entry in the dependencies array.
Re: Whenever: Typed and DST-safe datetimes for Python
#20> 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.
An issue was closed as not planned: https://github.com/ariebovenberg/whenever/issues/158