-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
remove pendulum #492
remove pendulum #492
Conversation
966fc3d
to
07e43db
Compare
it looks |
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 PR is great!
I agree to remove pendulum, but can you double check whether we can remove python-dateutil
as well?
for unit, minimum in self.when_lower_than.items(): | ||
if current <= minimum: | ||
if self.future_time: | ||
dt = now.add(**{f"{unit}s": current}) | ||
dt = now + relativedelta(**{f"{unit}s": current}) |
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.
Is it possible we can use builtin timedelta
?
from datetime import tiemdelta
dt = now + timedelta(**{f"{unit}s": current})
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.
That what I went with first, but timedelta doesn't handle month or year units, so I went with python-dateutils.
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.
Oh, got it!
We can't simply remove python-dateutil (but it's not an addition: it was already used underneath by pendulum). Iredis would not be able to do good future/past completion in time without it, thanks to its superior |
Thank you so so much! |
Released v1.15.0 |
You're welcome. Thank you :) |
As it is a pain: pendulum 2 is incompatible with python 3.12 and pendulum 3 has strange build errors we do not understand. The package has governance problems were the sole maintainer won't address problems, and more problematically, won't even answer to questions, see python-pendulum/pendulum#771.
Python-dateutil is a more reliable package to rely on: it's been around for longer, is not a one-person project and the founder is now a python core-maintainer in charge of the datetime module.