Skip to content

_mysql: db -> database, passwd -> password #513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MySQLdb/_mysql.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ _mysql_ConnectionObject_Initialize(
*db = NULL, *unix_socket = NULL;
unsigned int port = 0;
unsigned int client_flag = 0;
static char *kwlist[] = { "host", "user", "passwd", "db", "port",
static char *kwlist[] = { "host", "user", "password", "database", "port",
"unix_socket", "conv",
"connect_timeout", "compress",
"named_pipe", "init_command",
Expand Down
8 changes: 4 additions & 4 deletions MySQLdb/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ class object, used to create cursors (keyword only)

kwargs2 = kwargs.copy()

if "database" in kwargs2:
kwargs2["db"] = kwargs2.pop("database")
if "password" in kwargs2:
kwargs2["passwd"] = kwargs2.pop("password")
if "db" in kwargs2:
kwargs2["database"] = kwargs2.pop("db")
if "passwd" in kwargs2:
kwargs2["password"] = kwargs2.pop("passwd")

if "conv" in kwargs:
conv = kwargs["conv"]
Expand Down