Skip to content

Commit 204fb12

Browse files
authored
_mysql: db -> database, passwd -> password (#513)
1 parent 16d139c commit 204fb12

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

MySQLdb/_mysql.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ _mysql_ConnectionObject_Initialize(
414414
*db = NULL, *unix_socket = NULL;
415415
unsigned int port = 0;
416416
unsigned int client_flag = 0;
417-
static char *kwlist[] = { "host", "user", "passwd", "db", "port",
417+
static char *kwlist[] = { "host", "user", "password", "database", "port",
418418
"unix_socket", "conv",
419419
"connect_timeout", "compress",
420420
"named_pipe", "init_command",

MySQLdb/connections.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ class object, used to create cursors (keyword only)
148148

149149
kwargs2 = kwargs.copy()
150150

151-
if "database" in kwargs2:
152-
kwargs2["db"] = kwargs2.pop("database")
153-
if "password" in kwargs2:
154-
kwargs2["passwd"] = kwargs2.pop("password")
151+
if "db" in kwargs2:
152+
kwargs2["database"] = kwargs2.pop("db")
153+
if "passwd" in kwargs2:
154+
kwargs2["password"] = kwargs2.pop("passwd")
155155

156156
if "conv" in kwargs:
157157
conv = kwargs["conv"]

0 commit comments

Comments
 (0)