diff options
author | Frederick Muriuki Muriithi | 2023-04-06 12:31:05 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-04-06 12:31:05 +0300 |
commit | 17abad9300e4a96a14f94da486ef8307f7d27e06 (patch) | |
tree | 38fe3bfd36be9a821adfc67b83fbbd587ceb8b5e /gn3/db_utils.py | |
parent | 3d873435f0d464864d4d691d6be4db40931fac05 (diff) | |
download | genenetwork3-17abad9300e4a96a14f94da486ef8307f7d27e06.tar.gz |
Remove deprecated `gn3.db_utils.database_connector` function
Remove the deprecated function and fix a myriad of bugs that arise from
removing the function.
Issue: https://issues.genenetwork.org/issues/bugfix_coupling_current_app_and_db_utils
Diffstat (limited to 'gn3/db_utils.py')
-rw-r--r-- | gn3/db_utils.py | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/gn3/db_utils.py b/gn3/db_utils.py index 4827358..e9db10f 100644 --- a/gn3/db_utils.py +++ b/gn3/db_utils.py @@ -17,15 +17,6 @@ def parse_db_url(sql_uri: str) -> Tuple: parsed_db.path[1:], parsed_db.port) -# This function is deprecated. Use database_connection instead. -def database_connector(sql_uri: str = "") -> mdb.Connection: - """function to create db connector""" - host, user, passwd, db_name, db_port = parse_db_url( - sql_uri or current_app.config["SQL_URI"]) - - return mdb.connect(host, user, passwd, db_name, port=(db_port or 3306)) - - # pylint: disable=missing-class-docstring, missing-function-docstring, too-few-public-methods class Connection(Protocol): """Type Annotation for MySQLdb's connection object""" |