Closed floxay closed 2 months ago
Hi,
I can't reproduce. I don't know what python version you have, but trying in an empty env works without issues:
$ pip list
Package Version
---------- -------
pip 24.2
setuptools 72.1.0
wheel 0.43.0
$ python
Python 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 15:03:56) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import zoneinfo
>>> zoneinfo.ZoneInfo('UTC')
zoneinfo.ZoneInfo(key='UTC')
>>>
Describe the bug Setting
timezone
to --for example--UTC
on Windows will fail with the errorCan't locate timezone: UTC
as Windows does not have time zone data. Related docs: https://docs.python.org/3/library/zoneinfo.html#data-sourcesExpected behavior Setting
timezone
inalembic.ini
should work on Windows "out of the box". Or alembic should at least provide a better error message in this case.To Reproduce On Windows use this config and attempt to create a new migration.
Error
Versions.
Additional context Adding
tzdata
as a dependency on Windows as recommended in thezoneinfo
documentation solves the issue.