arrow-py / arrow

🏹 Better dates & times for Python
https://arrow.readthedocs.io
Apache License 2.0
8.71k stars 673 forks source link

Pinned `pytz` version is not latest #874

Closed ashleysommer closed 3 years ago

ashleysommer commented 3 years ago

Issue Description

The pytz library in requirements.txt is pinned to 2019.*. pytz v2020.1 has been out since April. Just wondering if there is a reason arrow hasn't moved the pin to "2020.*" ?

ashleysommer commented 3 years ago

Update: Nevermind, I just realized that dependencies in requirements.txt are not installed by default. The setup.py has its own install_requires list. Looks like the dependencies in requirements.txt are only used in the test suite for checking conformance and compatibility.

jadchaar commented 3 years ago

Hi @ashleysommer, we have not upgraded our pytz dependency yet since we are waiting on dateutil to release a new version with an updated tz database. Paul, dateutil's maintainer, has been quite busy lately since he spearheaded the zoneinfo feature of Python 3.9.

We have some tests that iterate through all the timezones included in pytz and dateutil: https://github.com/arrow-py/arrow/blob/fe9602e2171d49d0d95d775e71f9735c3aaf92e4/tests/test_parser.py#L344-L361

Our parsing logic (e.g. calls to getttz) relies on dateutil to interpret the timezones, so our tests fail if pytz is updated since it has a newer tz database than dateutil.

danieldjewell commented 3 years ago

At the very least, perhaps clarifying/renaming/moving the requirements.txt file to reduce the possibility of the issue @ashleysommer ran into (I just did the same thing ... so in the habit of looking at requirements.txt and had to check setup.py for the actual list.) Perhaps renaming it to test_requirements.txt if that's appropriate?

jadchaar commented 3 years ago

At the very least, perhaps clarifying/renaming/moving the requirements.txt file to reduce the possibility of the issue @ashleysommer ran into (I just did the same thing ... so in the habit of looking at requirements.txt and had to check setup.py for the actual list.) Perhaps renaming it to test_requirements.txt if that's appropriate?

Thanks for bringing this up, it is a good idea! I have filed a new issue for it: https://github.com/arrow-py/arrow/issues/926.