Open kloczek opened 5 months ago
Switch to standard zoneinfo module. Below may help https://github.com/pydantic/pydantic-core/commit/fd262933
zoneinfo
[tkloczko@pers-jacek arrow-1.3.0]$ grep -r pytz CHANGELOG.rst:- [FIX] Fixed a bug that occurred when ``arrow.Arrow()`` was instantiated with a ``pytz`` tzinfo object. CHANGELOG.rst:- [FIX] Fix pytz conversion error (Kudo) README.rst:- Too many modules: datetime, time, calendar, dateutil, pytz and more README.rst:- Support for ``dateutil``, ``pytz``, and ``ZoneInfo`` tzinfo objects arrow/arrow.py: # detect that tzinfo is a pytz object (issue #626) requirements/requirements-tests.txt:pytz==2021.1 tests/test_arrow.py:import pytz tests/test_arrow.py: def test_init_pytz_timezone(self): tests/test_arrow.py: 2013, 2, 2, 12, 30, 45, 999999, tzinfo=pytz.timezone("Europe/Paris") tests/test_formatter.py:import pytz tests/test_formatter.py: dt = datetime(1986, 2, 14, tzinfo=pytz.timezone("UTC")).replace( tests/utils.py:import pytz tests/utils.py: pytz_zones = set(pytz.all_timezones) tests/utils.py: return dateutil_zones.union(pytz_zones) pyproject.toml: "pytz==2021.1",
Hi @kloczek thanks for raising the issue. Contributions are welcome to add this functionality to Arrow :)
Switch to standard
zoneinfo
module. Below may help https://github.com/pydantic/pydantic-core/commit/fd262933