diff --git a/HISTORY.rst b/HISTORY.rst index a20ffe1..0b5003d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -18,6 +18,9 @@ Release: TBD * Remove ``waiter`` option from Connection. +* Remove ``fileno``, ``escape_sequence``, and ``escape_dict`` methods + from Connection class. + ====================== What's new in 1.3.14 ====================== diff --git a/MySQLdb/__init__.py b/MySQLdb/__init__.py index ad2057b..fa52a83 100644 --- a/MySQLdb/__init__.py +++ b/MySQLdb/__init__.py @@ -93,7 +93,7 @@ __all__ = [ 'BINARY', 'Binary', 'Connect', 'Connection', 'DATE', 'MySQLError', 'NULL', 'NUMBER', 'NotSupportedError', 'DBAPISet', 'OperationalError', 'ProgrammingError', 'ROWID', 'STRING', 'TIME', 'TIMESTAMP', 'Warning', 'apilevel', 'connect', 'connections', - 'constants', 'converters', 'cursors', 'debug', 'escape', 'escape_dict', - 'escape_sequence', 'escape_string', 'get_client_info', + 'constants', 'converters', 'cursors', 'debug', 'escape', + 'escape_string', 'get_client_info', 'paramstyle', 'string_literal', 'threadsafety', 'version_info'] diff --git a/MySQLdb/_mysql.c b/MySQLdb/_mysql.c index 04eadb7..0a52782 100644 --- a/MySQLdb/_mysql.c +++ b/MySQLdb/_mysql.c @@ -607,17 +607,6 @@ static int _mysql_ConnectionObject_clear( return 0; } -static char _mysql_ConnectionObject_fileno__doc__[] = -"Return underlaying fd for connection (deprecated)"; - -static PyObject * -_mysql_ConnectionObject_fileno( - _mysql_ConnectionObject *self) -{ - check_connection(self); - return PyInt_FromLong(self->connection.net.fd); -} - static char _mysql_ConnectionObject_close__doc__[] = "Close the connection. No further activity possible."; @@ -1036,71 +1025,6 @@ _mysql_escape( } } -static char _mysql_escape_sequence__doc__[] = -"escape_sequence(seq, dict) -- escape any special characters in sequence\n\ -seq using mapping dict to provide quoting functions for each type.\n\ -Returns a tuple of escaped items."; -static PyObject * -_mysql_escape_sequence( - PyObject *self, - PyObject *args) -{ - PyObject *o=NULL, *d=NULL, *r=NULL, *item, *quoted; - int i, n; - if (!PyArg_ParseTuple(args, "OO:escape_sequence", &o, &d)) - goto error; - if (!PyMapping_Check(d)) { - PyErr_SetString(PyExc_TypeError, - "argument 2 must be a mapping"); - return NULL; - } - if ((n = PyObject_Length(o)) == -1) goto error; - if (!(r = PyTuple_New(n))) goto error; - for (i=0; i