aboutsummaryrefslogtreecommitdiff
path: root/gn3/db_utils.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-04-06 12:31:05 +0300
committerFrederick Muriuki Muriithi2023-04-06 12:31:05 +0300
commit17abad9300e4a96a14f94da486ef8307f7d27e06 (patch)
tree38fe3bfd36be9a821adfc67b83fbbd587ceb8b5e /gn3/db_utils.py
parent3d873435f0d464864d4d691d6be4db40931fac05 (diff)
downloadgenenetwork3-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.py9
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"""