Skip to content
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

Could the dateutil dependency by dropped? #743

Closed
fabioz opened this issue Oct 6, 2022 · 3 comments · Fixed by #782
Closed

Could the dateutil dependency by dropped? #743

fabioz opened this issue Oct 6, 2022 · 3 comments · Fixed by #782
Labels
dependencies Pull requests that update a dependency file refactor Changes that do not affect usage

Comments

@fabioz
Copy link

fabioz commented Oct 6, 2022

From what I see it's only usage is to get the local timezone, but this is available from the datetime directly.

See: https://stackoverflow.com/a/52606421/110451

Or am I missing something here?

@bhirsz
Copy link
Member

bhirsz commented Oct 9, 2022

I see we're using tzlocal() local from dateutil which is improved class over tzinfo from standard datetime. I will ask @rikerfi , do you know why we're using dateutil extra dependency over datetime? Timezones and time conversion are always black magic for me :) I'm asking you since it's used there:

timezone = tz.tzlocal() if self.timezone == "local" else pytz.timezone(self.timezone)

@rikerfi
Copy link
Contributor

rikerfi commented Oct 12, 2022

Hey, this is a good point. I'll study and get back to you.

@mnojek mnojek added the refactor Changes that do not affect usage label Feb 24, 2023
@mnojek
Copy link
Member

mnojek commented Feb 24, 2023

I removed dateutil in #782

@mnojek mnojek added the dependencies Pull requests that update a dependency file label Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file refactor Changes that do not affect usage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants