-
-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A timezone error on python3.12
and alembic[tz]
?
#1556
Comments
if you're on python 3.12 the per zoneinfo: https://docs.python.org/3/library/zoneinfo.html it uses system databases if available otherwise will fall back to tzdata @CaselIT why do we have this target in the first place and should it install tzdata on all versions? |
Thanks a lot for the quick response! Hm, this seems really strange, because if I uninstall $ python -c "from zoneinfo import available_timezones; print(available_timezones())"
set() When I install $ python -c "from zoneinfo import available_timezones; print(available_timezones())"
{'America/Puerto_Rico', 'America/Panama', 'America/Port_of_Spain', 'Pacific/Saipan', 'Europe/Bratislava', 'Pacific/Honolulu', 'Europe/Luxembourg', 'America/Recife', 'America/Cuiaba', 'America/Paramarib
o', 'Europe/Sarajevo', 'America/North_Dakota/New_Salem', 'Asia/Gaza', 'America/Ojinaga', 'Asia/Macau', 'Asia/Manila', 'Asia/Oral', 'America/Buenos_Aires', 'Europe/Ljubljana', 'Australia/North', 'Asia/C
hita', 'US/Samoa', 'Pacific/Galapagos' ... So I think it would be useful if |
I incorrectly assumed that utc etc was always included, if not then I think it makes sense to always install tzdata in the tz extra |
Maybe then I should create a PR for this? The question is should I pin the |
that would be great!
I don't think we need to, unless zoneinfo requires a min version to work |
Danipulok has proposed a fix for this issue in the main branch: fix(requirements): add |
1 similar comment
Danipulok has proposed a fix for this issue in the main branch: fix(requirements): add |
Describe the bug
Async API mode.
I used config templates from here.
I used
pip install alembic[tz]
:But when I run
alembic revision --autogenerate -m "msg"
, I get:Expected behavior
Everything should work if I installed
alembic[tz]
?But I also found this issue on SO: https://stackoverflow.com/questions/77698777/how-to-change-timezone-in-alembic-for-sqlalchemy
After I install
tzdata
, the same command stated working.To Reproduce
Use this
alembic.ini
: https://github.com/sqlalchemy/alembic/blob/bd50ba325b10a1a9cdb452fe40c96f959825797c/alembic/templates/async/alembic.ini.makoAnd add:
Versions.
The text was updated successfully, but these errors were encountered: