Skip to content

Commit 4b40c8c

Browse files
authored
Remove _mysql.thread_safe() (#311)
1 parent aca63e5 commit 4b40c8c

File tree

3 files changed

+0
-20
lines changed

3 files changed

+0
-20
lines changed

MySQLdb/_mysql.c

-16
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,6 @@ _get_encoding(MYSQL *mysql)
225225
return cs.csname;
226226
}
227227

228-
static char _mysql_thread_safe__doc__[] =
229-
"Indicates whether the client is compiled as thread-safe.";
230-
231-
static PyObject *_mysql_thread_safe(
232-
PyObject *self,
233-
PyObject *noargs)
234-
{
235-
return PyInt_FromLong((long)mysql_thread_safe());
236-
}
237-
238228
static char _mysql_ResultObject__doc__[] =
239229
"result(connection, use=0, converter={}) -- Result set from a query.\n\
240230
\n\
@@ -2585,12 +2575,6 @@ _mysql_methods[] = {
25852575
METH_NOARGS,
25862576
_mysql_get_client_info__doc__
25872577
},
2588-
{
2589-
"thread_safe",
2590-
(PyCFunction)_mysql_thread_safe,
2591-
METH_NOARGS,
2592-
_mysql_thread_safe__doc__
2593-
},
25942578
{NULL, NULL} /* sentinel */
25952579
};
25962580

doc/user_guide.rst

-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ MySQL C API function mapping
8989
``mysql_stat()`` ``conn.stat()``
9090
``mysql_store_result()`` ``conn.store_result()``
9191
``mysql_thread_id()`` ``conn.thread_id()``
92-
``mysql_thread_safe_client()`` ``conn.thread_safe_client()``
9392
``mysql_use_result()`` ``conn.use_result()``
9493
``mysql_warning_count()`` ``conn.warning_count()``
9594
``CLIENT_*`` ``MySQLdb.constants.CLIENT.*``

tests/test_MySQLdb_nonstandard.py

-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ def test_version(self):
3535
def test_client_info(self):
3636
self.assertTrue(isinstance(_mysql.get_client_info(), str))
3737

38-
def test_thread_safe(self):
39-
self.assertTrue(isinstance(_mysql.thread_safe(), int))
40-
4138
def test_escape_string(self):
4239
self.assertEqual(_mysql.escape_string(b'foo"bar'),
4340
b'foo\\"bar', "escape byte string")

0 commit comments

Comments
 (0)