ultrabug / py3status

py3status is an extensible i3status wrapper written in python

Home Page:https://ultrabug.github.io/py3status/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clock.py:269: PytzUsageWarning: The zone attribute is specific to pytz's interface

valdur55 opened this issue · comments

Describe the bug
clock.py:269: PytzUsageWarning: The zone attribute is specific to pytz's interface; please migrate to a new time zone provider. For more details on how to do so, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html

Your py3status version
py3status version 3.47 (python 3.8.10) on i3
Ubuntu 20.04

To Reproduce
Steps to reproduce the behavior along with your py3status configuration (filter out any private values):

  1. Run clock.py module inside of terminal emulator.

Expected behavior
No warning shown.

thanks for the hint, see proposed PR

Looks good, but it works with python3.9+. (Refered documentation also states New in python 3.9) (https://docs.python.org/3/library/zoneinfo.html )
In tox there are supported python versions 3.7 and 3.8
With python 3.8.10 i get ModuleNotFoundError: No module named 'zoneinfo'

EDIT: With 3.6+ you could use backports.zoneinfo package. ( https://pypi.org/project/backports.zoneinfo/ ) (Can't test it yet, but will do it after work)