Toblerity / Fiona

Fiona reads and writes geographic data files
https://fiona.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.14k stars 201 forks source link

RFE: use `zoneinfo` instead of `pytz` #1398

Open kloczek opened 1 month ago

kloczek commented 1 month ago

Switch to standard zoneinfo module. Below may help https://github.com/pydantic/pydantic-core/commit/fd262933

pyproject.toml:    "pytz",
requirements-dev.txt:pytz==2022.6
tests/test_datetime.py:import pytz
tests/test_datetime.py:from pytz import timezone
tests/test_datetime.py:                datetime.datetime(2020, 1, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
tests/test_datetime.py:                datetime.datetime(2020, 1, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
tests/test_datetime.py:                datetime.datetime(2020, 1, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
tests/test_datetime.py:                datetime.datetime(2020, 1, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
tests/test_datetime.py:    d1 = datetime.datetime(2020, 1, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
tests/test_datetime.py:    d2 = datetime.datetime(2020, 1, 21, 12, 0, 0, tzinfo=pytz.utc)
tests/test_datetime.py:    d1 = datetime.datetime(2020, 1, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
tests/test_datetime.py:    d2 = datetime.datetime(2020, 1, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
tests/test_datetime.py:    d1 = datetime.datetime(2020, 6, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
tests/test_datetime.py:    d2 = datetime.datetime(2020, 6, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
tests/test_datetime.py:        datetime.datetime(2020, 6, 21, 12, 0, 0, tzinfo=pytz.utc)
tests/test_datetime.py:        datetime.datetime(2020, 6, 21, 12, 0, 0, tzinfo=pytz.utc)
sgillies commented 1 month ago

@kloczek it's a good suggestion, thank you! Is this something you'd be interested in working on, along with the use of backports.zoneinfo for Python 3.8?

kloczek commented 1 month ago

AFAIK none know still supported distros is using 3.8. In distro which I'm using is used 3.10.14 (soon will be migration to 3.11)