Merge "Remove workaround for SQLAlchemy < 1.4"

This commit is contained in:
Zuul 2022-08-11 01:53:05 +00:00 committed by Gerrit Code Review
commit f810b41d15
1 changed files with 1 additions and 9 deletions

View File

@ -752,15 +752,7 @@ class CellV2Commands(object):
# worry about parsing and splitting a URL which could have special
# characters in the password, which makes parsing a nightmare.
url = sqla_url.make_url(connection)
# TODO(gibi): remove hasattr() conditional in favor of "url.set()"
# when SQLAlchemy 1.4 is the minimum version in requirements
if hasattr(url, "set"):
url = url.set(database=url.database + '_cell0')
else:
# TODO(zzzeek): remove when SQLAlchemy 1.4
# is the minimum version in requirements
url.database = url.database + '_cell0'
url = url.set(database=url.database + '_cell0')
return urlparse.unquote(str(url))