pytz is known for doing funky things that aren't really compatible with the rest of the python ecosystem and in some cases simply don't make sense. Their timezone objects aren't even compatible with actual Python tzinfo objects.
Here's a discussion from matplotlib where they decided to drop it in favour of dateutil, which has also been recommended by the python documentation for years now:
matplotlib/matplotlib#10443
Alternatively (if you're willing to drop support for Python 3.8 and below), Python 3.9 has a new built-in zoneinfo module in the stdlib that provides the common use case of just loading timezone objects by name with accurate timezone info.
pytz is known for doing funky things that aren't really compatible with the rest of the python ecosystem and in some cases simply don't make sense. Their timezone objects aren't even compatible with actual Python tzinfo objects.
Here's a discussion from matplotlib where they decided to drop it in favour of dateutil, which has also been recommended by the python documentation for years now:
matplotlib/matplotlib#10443
Alternatively (if you're willing to drop support for Python 3.8 and below), Python 3.9 has a new built-in zoneinfo module in the stdlib that provides the common use case of just loading timezone objects by name with accurate timezone info.