summaryrefslogtreecommitdiff
path: root/alembic/command.py
diff options
context:
space:
mode:
authorCaselIT <cfederico87@gmail.com>2021-06-15 22:32:05 +0200
committerCaselIT <cfederico87@gmail.com>2021-06-15 23:38:07 +0200
commit7756b35e23ec11b64a1ac37afcb41dda3ca29913 (patch)
treea2c46870a195f22c7489bface5a890cf90acff5c /alembic/command.py
parentc0f0a3238fe1ec8029d66ad6ac518b60c78c36ed (diff)
downloadalembic-7756b35e23ec11b64a1ac37afcb41dda3ca29913.tar.gz
Revendor editor and make dateutil optional
Re-implemented the ``python-editor`` dependency as a small internal function to avoid the need for external dependencies. The implementation is based on the original version in 7b91b325ff43a0e9235e0f15b57391fa92352626. Make the ``python-dateutil`` library an optional dependency. This library is only required if the ``timezone`` option is used in the Alembic configuration. An extra require named ``tz`` is available with ``pip install alembic[tz]`` to install it. Fixes: #674 Fixes: #856 Change-Id: I07f17b2fea01e3a3d677ce95333fe3e8d8d438fd
Diffstat (limited to 'alembic/command.py')
-rw-r--r--alembic/command.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/alembic/command.py b/alembic/command.py
index 6a4a3d0..ada458d 100644
--- a/alembic/command.py
+++ b/alembic/command.py
@@ -587,7 +587,7 @@ def edit(config, rev):
if not rev:
raise util.CommandError("No current revisions")
for sc in script.get_revisions(rev):
- util.edit(sc.path)
+ util.open_in_editor(sc.path)
return []
with EnvironmentContext(config, script, fn=edit_current):
@@ -599,4 +599,4 @@ def edit(config, rev):
"No revision files indicated by symbol '%s'" % rev
)
for sc in revs:
- util.edit(sc.path)
+ util.open_in_editor(sc.path)