8000 Drop unnecessary dependency on `pytz` - stdlib provides `datetime.timezone.utc` · Issue #720 · twilio/twilio-python · GitHub
[go: up one dir, main page]

Skip to content
Drop unnecessary dependency on pytz - stdlib provides datetime.timezone.utc #720
Closed
@Zac-HD

Description

@Zac-HD

This package currently depends on pytz, which is incompatible with Python's standard timezone handling and thus being removed throughout the ecosystem in favor of the zoneinfo module. When I saw that twilio was using it, my heart sank but I resolved to open an issue.

But there's good news: you're not actually using any pytz interfaces! Literally the only thing you're using is the pytz.utc timezone object, which can be perfectly replaced with the standard library datetime.timezone.utc object in all four places it's used (including tests). Doing so should make your and, all your users', dependency-management ever so slightly easier.

I'll send a PR shortly, if nobody beats me to the punch 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0