Merge "Fix SQLAlchemy backref warnings for viewonly columns"

This commit is contained in:
Zuul 2021-04-28 18:40:41 +00:00 committed by Gerrit Code Review
commit 57f34438c9
4 changed files with 6 additions and 4 deletions

View File

@ -116,7 +116,7 @@ simplejson==3.5.1
smmap==0.9.0 smmap==0.9.0
snowballstemmer==1.2.1 snowballstemmer==1.2.1
sqlalchemy-migrate==0.11.0 sqlalchemy-migrate==0.11.0
SQLAlchemy==1.2.0 SQLAlchemy==1.3.23
sqlparse==0.2.2 sqlparse==0.2.2
statsd==3.2.1 statsd==3.2.1
stestr==1.0.0 stestr==1.0.0

View File

@ -27,5 +27,6 @@ class Tag(model_base.BASEV2):
tag = sa.Column(sa.String(255), nullable=False, primary_key=True) tag = sa.Column(sa.String(255), nullable=False, primary_key=True)
standard_attr = orm.relationship( standard_attr = orm.relationship(
'StandardAttribute', load_on_pending=True, 'StandardAttribute', load_on_pending=True,
backref=orm.backref('tags', lazy='subquery', viewonly=True)) backref=orm.backref('tags', lazy='subquery', viewonly=True),
sync_backref=False)
revises_on_change = ('standard_attr', ) revises_on_change = ('standard_attr', )

View File

@ -59,7 +59,8 @@ class QosNetworkPolicyBinding(model_base.BASEV2):
primaryjoin='QosNetworkPolicyBinding.network_id == Port.network_id', primaryjoin='QosNetworkPolicyBinding.network_id == Port.network_id',
foreign_keys=network_id, foreign_keys=network_id,
backref=sa.orm.backref('qos_network_policy_binding', uselist=False, backref=sa.orm.backref('qos_network_policy_binding', uselist=False,
viewonly=True, lazy='joined')) viewonly=True, lazy='joined'),
sync_backref=False)
class QosFIPPolicyBinding(model_base.BASEV2): class QosFIPPolicyBinding(model_base.BASEV2):

View File

@ -19,7 +19,7 @@ netifaces>=0.10.4 # MIT
neutron-lib>=2.10.1 # Apache-2.0 neutron-lib>=2.10.1 # Apache-2.0
python-neutronclient>=6.7.0 # Apache-2.0 python-neutronclient>=6.7.0 # Apache-2.0
tenacity>=6.0.0 # Apache-2.0 tenacity>=6.0.0 # Apache-2.0
SQLAlchemy>=1.2.0 # MIT SQLAlchemy>=1.3.23 # MIT
WebOb>=1.8.2 # MIT WebOb>=1.8.2 # MIT
keystoneauth1>=3.14.0 # Apache-2.0 keystoneauth1>=3.14.0 # Apache-2.0
alembic>=0.9.6 # MIT alembic>=0.9.6 # MIT