# HG changeset patch # User Mads Kiilerich # Date 1559871427 -7200 # Node ID b0ed41df0282315d0e57edf8ff8c557ee0e1e331 # Parent 50b376bcdcdaf294afd0c2898399f882510c184d db: drop __mapper_args__ that cause SQLAlchemy deprecation warnings We don't really need them. There were only few uses left, and we seem to be using .order_by() in all places where we really care about the ordering. Gets rid of :2 :2: SADeprecationWarning: Mapper.order_by is deprecated.Use Query.order_by() in order to affect the ordering of ORM result sets. diff -r 50b376bcdcda -r b0ed41df0282 kallithea/model/db.py --- a/kallithea/model/db.py Fri Jun 07 03:37:07 2019 +0200 +++ b/kallithea/model/db.py Fri Jun 07 03:37:07 2019 +0200 @@ -706,7 +706,6 @@ Index('uak_api_key_expires_idx', 'api_key', 'expires'), _table_args_default_dict, ) - __mapper_args__ = {} user_api_key_id = Column(Integer(), primary_key=True) user_id = Column(Integer(), ForeignKey('users.user_id'), nullable=False) @@ -728,7 +727,6 @@ Index('uem_email_idx', 'email'), _table_args_default_dict, ) - __mapper_args__ = {} email_id = Column(Integer(), primary_key=True) user_id = Column(Integer(), ForeignKey('users.user_id'), nullable=False) @@ -758,7 +756,6 @@ UniqueConstraint('user_id', 'ip_addr'), _table_args_default_dict, ) - __mapper_args__ = {} ip_id = Column(Integer(), primary_key=True) user_id = Column(Integer(), ForeignKey('users.user_id'), nullable=False) @@ -1470,7 +1467,6 @@ __table_args__ = ( _table_args_default_dict, ) - __mapper_args__ = {'order_by': 'group_name'} # TODO: Deprecated as of SQLAlchemy 1.1. SEP = ' » '