From 030f3994471bf60dd34b5eecba8209d072395a87 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 13 Dec 2018 16:02:25 +0900 Subject: [PATCH] Remove _mysql.thread_safe() --- MySQLdb/_mysql.c | 16 ---------------- doc/user_guide.rst | 1 - tests/test_MySQLdb_nonstandard.py | 3 --- 3 files changed, 20 deletions(-) diff --git a/MySQLdb/_mysql.c b/MySQLdb/_mysql.c index 08ea9ae0..e90d45eb 100644 --- a/MySQLdb/_mysql.c +++ b/MySQLdb/_mysql.c @@ -225,16 +225,6 @@ _get_encoding(MYSQL *mysql) return cs.csname; } -static char _mysql_thread_safe__doc__[] = -"Indicates whether the client is compiled as thread-safe."; - -static PyObject *_mysql_thread_safe( - PyObject *self, - PyObject *noargs) -{ - return PyInt_FromLong((long)mysql_thread_safe()); -} - static char _mysql_ResultObject__doc__[] = "result(connection, use=0, converter={}) -- Result set from a query.\n\ \n\ @@ -2585,12 +2575,6 @@ _mysql_methods[] = { METH_NOARGS, _mysql_get_client_info__doc__ }, - { - "thread_safe", - (PyCFunction)_mysql_thread_safe, - METH_NOARGS, - _mysql_thread_safe__doc__ - }, {NULL, NULL} /* sentinel */ }; diff --git a/doc/user_guide.rst b/doc/user_guide.rst index c83c3f3f..173918dd 100644 --- a/doc/user_guide.rst +++ b/doc/user_guide.rst @@ -89,7 +89,6 @@ MySQL C API function mapping ``mysql_stat()`` ``conn.stat()`` ``mysql_store_result()`` ``conn.store_result()`` ``mysql_thread_id()`` ``conn.thread_id()`` - ``mysql_thread_safe_client()`` ``conn.thread_safe_client()`` ``mysql_use_result()`` ``conn.use_result()`` ``mysql_warning_count()`` ``conn.warning_count()`` ``CLIENT_*`` ``MySQLdb.constants.CLIENT.*`` diff --git a/tests/test_MySQLdb_nonstandard.py b/tests/test_MySQLdb_nonstandard.py index 55cfc630..2b33c398 100644 --- a/tests/test_MySQLdb_nonstandard.py +++ b/tests/test_MySQLdb_nonstandard.py @@ -35,9 +35,6 @@ def test_version(self): def test_client_info(self): self.assertTrue(isinstance(_mysql.get_client_info(), str)) - def test_thread_safe(self): - self.assertTrue(isinstance(_mysql.thread_safe(), int)) - def test_escape_string(self): self.assertEqual(_mysql.escape_string(b'foo"bar'), b'foo\\"bar', "escape byte string")