]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Change generator termination from StopIteration to return.
authorpgjones <philip.graham.jones@googlemail.com>
Fri, 30 Oct 2015 20:20:58 +0000 (20:20 +0000)
committerpgjones <philip.graham.jones@googlemail.com>
Fri, 30 Oct 2015 20:20:58 +0000 (20:20 +0000)
commit6ab120558078bdcbfbe06d2ca55bd7a0d417bbb4
tree9b51224766e3f5faab2d9e313f704187b01edde0
parent98c1dcc6bcade313a254fe11e8efa3c5b5ad959e
Change generator termination from StopIteration to return.

From [PEP 479](https://www.python.org/dev/peps/pep-0479/) the correct way to
terminate a generator is to return (which implicitly raises StopIteration)
rather than raise StopIteration.

Without this change using sqlalchemy in python 3.5 or greater results in
these warnings
    PendingDeprecationWarning: generator '__iter__' raised StopIteration
which this commit should remove.
lib/sqlalchemy/engine/result.py
lib/sqlalchemy/ext/associationproxy.py