diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-10-11 17:17:19 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-10-11 19:48:58 -0400 |
commit | 6c2934661f38833ec2a325bb43f1dd5cdfec9ca1 (patch) | |
tree | 9bbd5288422d85f548cab1a9fa056edf56bc6836 /alembic/script | |
parent | 1b46850adb7004f959b8f894fe4e066b3fef3648 (diff) | |
download | alembic-6c2934661f38833ec2a325bb43f1dd5cdfec9ca1.tar.gz |
Clean up all Python 3.6 warnings
Fixed a few Python3.6 deprecation warnings by replacing ``StopIteration``
with ``return``, as well as using ``getfullargspec()`` instead of
``getargspec()`` under Python 3.
Additionally fixed docstrings with backslashes needing r'', filehandles
not explicitly closed, accommodate for .pyc files not necessarily present.
Change-Id: Id9791c5fa8b4b1f3e4e36f237a8a8ebcef4aaaba
Fixes: #458
Diffstat (limited to 'alembic/script')
-rw-r--r-- | alembic/script/revision.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alembic/script/revision.py b/alembic/script/revision.py index 1e68a7c..3d9a332 100644 --- a/alembic/script/revision.py +++ b/alembic/script/revision.py @@ -656,7 +656,7 @@ class RevisionMap(object): uppers = util.dedupe_tuple(self.get_revisions(upper)) if not uppers and not requested_lowers: - raise StopIteration() + return upper_ancestors = set(self._get_ancestor_nodes(uppers, check=True)) @@ -716,7 +716,7 @@ class RevisionMap(object): # if the requested start is one of those branch points, # then just return empty set if start_from.intersection(upper_ancestors): - raise StopIteration() + return else: # otherwise, they requested nodes out of # order |