Browse Source

Stop setting a backref on relations that are viewonly

From sqlalachemy 1.3.14 relations that are specifying a backref when
viewonly=True will issue a warning and this will be disallowed in
future releases of sqlalchemy.
So, after checking that these backref were not used in the project,
we have simply removed them.

Source: https://github.com/sqlalchemy/sqlalchemy/releases/tag/rel_1_3_14
which also explains why this behavior is not desired.

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
Pierre-Yves Chibon 4 years ago
parent
commit
5c556b8f05
1 changed files with 0 additions and 4 deletions
  1. 0 4
      pagure/lib/model.py

+ 0 - 4
pagure/lib/model.py

@@ -417,7 +417,6 @@ class Project(BASE):
         primaryjoin="projects.c.id==user_projects.c.project_id",
         secondaryjoin="and_(users.c.id==user_projects.c.user_id,\
                 user_projects.c.access=='admin')",
-        backref="co_projects_admins",
         viewonly=True,
     )
 
@@ -428,7 +427,6 @@ class Project(BASE):
         secondaryjoin="and_(users.c.id==user_projects.c.user_id,\
                 or_(user_projects.c.access=='commit',\
                     user_projects.c.access=='admin'))",
-        backref="co_projects_committers",
         viewonly=True,
     )
 
@@ -453,7 +451,6 @@ class Project(BASE):
         primaryjoin="projects.c.id==projects_groups.c.project_id",
         secondaryjoin="and_(pagure_group.c.id==projects_groups.c.group_id,\
                 projects_groups.c.access=='admin')",
-        backref="projects_admin_groups",
         order_by="PagureGroup.group_name.asc()",
         viewonly=True,
     )
@@ -465,7 +462,6 @@ class Project(BASE):
         secondaryjoin="and_(pagure_group.c.id==projects_groups.c.group_id,\
                 or_(projects_groups.c.access=='admin',\
                     projects_groups.c.access=='commit'))",
-        backref="projects_committer_groups",
         order_by="PagureGroup.group_name.asc()",
         viewonly=True,
     )