]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
fix(requirements): add `tzdata` to `tz` extras; fixes #1556
authorDanipulok <danipulok@gmail.com>
Wed, 6 Nov 2024 17:06:50 +0000 (12:06 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 6 Nov 2024 20:02:14 +0000 (15:02 -0500)
Add `tzdata` to `tz` extras, since `zoneinfo` on its own does not contain any timezones.

Fixes: #1556
Closes: #1558
Pull-request: https://github.com/sqlalchemy/alembic/pull/1558
Pull-request-sha: 9c60d7c1a2d4171511828ae60de0649905297a17

Change-Id: Ibf6d863a7cd277c6abffcf2853f452a5b16c5fd5

alembic/templates/async/alembic.ini.mako
alembic/templates/generic/alembic.ini.mako
alembic/templates/multidb/alembic.ini.mako
docs/build/tutorial.rst
docs/build/unreleased/1556.rst [new file with mode: 0644]
setup.cfg

index 7eee913205bc4b881fb8b44e81bc252f8d5b2bcc..02ddb9e13c612476b8bffc5615915593fd773217 100644 (file)
@@ -15,7 +15,7 @@ prepend_sys_path = .
 
 # timezone to use when rendering the date within the migration file
 # as well as the filename.
-# If specified, requires the python>=3.9 or backports.zoneinfo library.
+# If specified, requires the python>=3.9 or backports.zoneinfo library and tzdata library.
 # Any required deps can installed by adding `alembic[tz]` to the pip requirements
 # string value is passed to ZoneInfo()
 # leave blank for localtime
index f1f76cae80acb4fb39c17ea01378b6f81029a224..fb70923207cc87adf6b45c1ac572035677e0ee10 100644 (file)
@@ -17,7 +17,7 @@ prepend_sys_path = .
 
 # timezone to use when rendering the date within the migration file
 # as well as the filename.
-# If specified, requires the python>=3.9 or backports.zoneinfo library.
+# If specified, requires the python>=3.9 or backports.zoneinfo library and tzdata library.
 # Any required deps can installed by adding `alembic[tz]` to the pip requirements
 # string value is passed to ZoneInfo()
 # leave blank for localtime
index bf383ea1defa566ce67ec0e86c19612787bd4101..687da5701e6f3f0d4ce817cb566838ac441c80cc 100644 (file)
@@ -17,7 +17,7 @@ prepend_sys_path = .
 
 # timezone to use when rendering the date within the migration file
 # as well as the filename.
-# If specified, requires the python>=3.9 or backports.zoneinfo library.
+# If specified, requires the python>=3.9 or backports.zoneinfo library and tzdata library.
 # Any required deps can installed by adding `alembic[tz]` to the pip requirements
 # string value is passed to ZoneInfo()
 # leave blank for localtime
index a5779d29cecb3fb8614fbc7d9a1d701bd056247a..347e856bd9cf548ce286be8ec05d5f7a10ddb2ab 100644 (file)
@@ -141,7 +141,7 @@ The file generated with the "generic" configuration looks like::
 
     # timezone to use when rendering the date within the migration file
     # as well as the filename.
-    # If specified, requires the python>=3.9 or backports.zoneinfo library.
+    # If specified, requires the python>=3.9 or backports.zoneinfo library and tzdata library.
     # Any required deps can installed by adding `alembic[tz]` to the pip requirements
     # string value is passed to ZoneInfo()
     # leave blank for localtime
@@ -299,9 +299,9 @@ This file contains the following features:
 * ``timezone`` - an optional timezone name (e.g. ``UTC``, ``EST5EDT``, etc.)
   that will be applied to the timestamp which renders inside the migration
   file's comment as well as within the filename. This option requires Python>=3.9
-  or installing the ``backports.zoneinfo`` library. If ``timezone`` is specified,
-  the create date object is no longer derived from ``datetime.datetime.now()``
-  and is instead generated as::
+  or installing the ``backports.zoneinfo`` library and the ``tzdata`` library. 
+  If ``timezone`` is specified, the create date object is no longer derived
+  from ``datetime.datetime.now()`` and is instead generated as::
 
       datetime.datetime.utcnow().replace(
         tzinfo=datetime.timezone.utc
diff --git a/docs/build/unreleased/1556.rst b/docs/build/unreleased/1556.rst
new file mode 100644 (file)
index 0000000..d0b96b1
--- /dev/null
@@ -0,0 +1,6 @@
+.. change::
+    :tags: bug, environment
+    :tickets: 1556
+
+    Added `tzdata` to `tz` extras, which is required on some platforms such as
+    Windows.  Pull request courtesy Danipulok.
index e3a51f25c184a2ca0acbc257306358e7931e2db7..89c095f7af4d9f6bf34006a6788b7efceabf7056 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -49,6 +49,7 @@ install_requires =
 [options.extras_require]
 tz =
     backports.zoneinfo;python_version<"3.9"
+    tzdata
 
 [options.package_data]
 alembic = *.pyi, py.typed