Pass sync_backref=False to relationship call

Need to bump the lower-constraint of sqlalchemy
to a version where 'sync_backref' was introduced [1]

[1] https://docs.sqlalchemy.org/en/13/orm/relationship_api.html#sqlalchemy.orm.relationship.params.sync_backref
Change-Id: I589281d8e77a160adcd48b8d3e4951441f843463
Closes-Bug: #1924806
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
This commit is contained in:
Chuan Miao 2021-03-23 12:16:16 +01:00 committed by Goutham Pacha Ravi
parent faf44b54dc
commit e5d0c0e77a
4 changed files with 9 additions and 2 deletions

View File

@ -113,7 +113,7 @@ Routes==2.4.1
simplejson==3.13.2
six==1.15.0
snowballstemmer==1.2.1
SQLAlchemy==1.3.1
SQLAlchemy==1.3.17
sqlalchemy-migrate==0.11.0
sqlparse==0.2.4
statsd==3.2.2

View File

@ -805,6 +805,7 @@ class ShareSnapshotInstance(BASE, ManilaBase):
),
viewonly=True,
join_depth=2,
sync_backref=False,
)
share_group_snapshot = orm.relationship(
"ShareGroupSnapshot",
@ -815,6 +816,7 @@ class ShareSnapshotInstance(BASE, ManilaBase):
'ShareSnapshotInstance.share_group_snapshot_id'),
viewonly=True,
join_depth=2,
sync_backref=False,
)

View File

@ -0,0 +1,5 @@
---
fixes:
- |
View-only relationships in database objects have been appropriately
tagged to avoid sqlalchemy deprecation messages flooding the log files.

View File

@ -37,7 +37,7 @@ requests>=2.23.0 # Apache-2.0
retrying!=1.3.0,>=1.2.3 # Apache-2.0
Routes>=2.4.1 # MIT
six>=1.15.0 # MIT
SQLAlchemy>=1.3.1 # MIT
SQLAlchemy>=1.3.17 # MIT
stevedore>=3.2.2 # Apache-2.0
tooz>=2.7.1 # Apache-2.0
python-cinderclient!=4.0.0,>=3.3.0 # Apache-2.0