demisto / demisto-py

Demisto Client for Python
Apache License 2.0
70 stars 41 forks source link

Address PytzUsageWarning in `demisto_client/__init__.py` #89

Closed lfarvour closed 2 years ago

lfarvour commented 2 years ago

https://github.com/demisto/demisto-py/blob/b7d239e2bafa0d389ee2d85fd38671a4fbe28c1b/demisto_client/__init__.py#L199

Recently while using demisto-client with a fresh installation of python 3.8.6, I started receiving the following warnings:

[USER_DIR]/.pyenv/versions/3.8.6/envs/clean-test/lib/python3.8/site-packages/demisto_client/__init__.py:199: PytzUsageWarning: The localize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
  value = tzlocal.get_localzone().localize(value)
darkushin commented 2 years ago

Hi @lfarvour, We just released a new version which solves this issue. Please run pip install demisto-py --upgrade to get the latest version.