Drop unnecessary dependency on `pytz` - stdlib provides `datetime.timezone.utc`
Zac-HD opened this issue · comments
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 🙂
Hi @Zac-HD, This PR is reviewed and approved by our team. Please merge once the checks are successful