@@ -607,17 +607,6 @@ static int _mysql_ConnectionObject_clear(
607607 return 0 ;
608608}
609609
610- static char _mysql_ConnectionObject_fileno__doc__ [] =
611- "Return underlaying fd for connection (deprecated)" ;
612-
613- static PyObject *
614- _mysql_ConnectionObject_fileno (
615- _mysql_ConnectionObject * self )
616- {
617- check_connection (self );
618- return PyInt_FromLong (self -> connection .net .fd );
619- }
620-
621610static char _mysql_ConnectionObject_close__doc__ [] =
622611"Close the connection. No further activity possible." ;
623612
@@ -1036,71 +1025,6 @@ _mysql_escape(
10361025 }
10371026}
10381027
1039- static char _mysql_escape_sequence__doc__ [] =
1040- "escape_sequence(seq, dict) -- escape any special characters in sequence\n\
1041- seq using mapping dict to provide quoting functions for each type.\n\
1042- Returns a tuple of escaped items." ;
1043- static PyObject *
1044- _mysql_escape_sequence (
1045- PyObject * self ,
1046- PyObject * args )
1047- {
1048- PyObject * o = NULL , * d = NULL , * r = NULL , * item , * quoted ;
1049- int i , n ;
1050- if (!PyArg_ParseTuple (args , "OO:escape_sequence" , & o , & d ))
1051- goto error ;
1052- if (!PyMapping_Check (d )) {
1053- PyErr_SetString (PyExc_TypeError ,
1054- "argument 2 must be a mapping" );
1055- return NULL ;
1056- }
1057- if ((n = PyObject_Length (o )) == -1 ) goto error ;
1058- if (!(r = PyTuple_New (n ))) goto error ;
1059- for (i = 0 ; i < n ; i ++ ) {
1060- item = PySequence_GetItem (o , i );
1061- if (!item ) goto error ;
1062- quoted = _escape_item (item , d );
1063- Py_DECREF (item );
1064- if (!quoted ) goto error ;
1065- PyTuple_SET_ITEM (r , i , quoted );
1066- }
1067- return r ;
1068- error :
1069- Py_XDECREF (r );
1070- return NULL ;
1071- }
1072-
1073- static char _mysql_escape_dict__doc__ [] =
1074- "escape_sequence(d, dict) -- escape any special characters in\n\
1075- dictionary d using mapping dict to provide quoting functions for each type.\n\
1076- Returns a dictionary of escaped items." ;
1077- static PyObject *
1078- _mysql_escape_dict (
1079- PyObject * self ,
1080- PyObject * args )
1081- {
1082- PyObject * o = NULL , * d = NULL , * r = NULL , * item , * quoted , * pkey ;
1083- Py_ssize_t ppos = 0 ;
1084- if (!PyArg_ParseTuple (args , "O!O:escape_dict" , & PyDict_Type , & o , & d ))
1085- goto error ;
1086- if (!PyMapping_Check (d )) {
1087- PyErr_SetString (PyExc_TypeError ,
1088- "argument 2 must be a mapping" );
1089- return NULL ;
1090- }
1091- if (!(r = PyDict_New ())) goto error ;
1092- while (PyDict_Next (o , & ppos , & pkey , & item )) {
1093- quoted = _escape_item (item , d );
1094- if (!quoted ) goto error ;
1095- if (PyDict_SetItem (r , pkey , quoted )== -1 ) goto error ;
1096- Py_DECREF (quoted );
1097- }
1098- return r ;
1099- error :
1100- Py_XDECREF (r );
1101- return NULL ;
1102- }
1103-
11041028static char _mysql_ResultObject_describe__doc__ [] =
11051029"Returns the sequence of 7-tuples required by the DB-API for\n\
11061030the Cursor.description attribute.\n\
@@ -2169,12 +2093,6 @@ static PyMethodDef _mysql_ConnectionObject_methods[] = {
21692093 METH_NOARGS ,
21702094 _mysql_ConnectionObject_close__doc__
21712095 },
2172- {
2173- "fileno" ,
2174- (PyCFunction )_mysql_ConnectionObject_fileno ,
2175- METH_NOARGS ,
2176- _mysql_ConnectionObject_fileno__doc__
2177- },
21782096 {
21792097 "dump_debug_info" ,
21802098 (PyCFunction )_mysql_ConnectionObject_dump_debug_info ,
@@ -2612,20 +2530,6 @@ _mysql_methods[] = {
26122530 METH_VARARGS ,
26132531 _mysql_escape__doc__
26142532 },
2615- {
2616- // deprecated.
2617- "escape_sequence" ,
2618- (PyCFunction )_mysql_escape_sequence ,
2619- METH_VARARGS ,
2620- _mysql_escape_sequence__doc__
2621- },
2622- {
2623- // deprecated.
2624- "escape_dict" ,
2625- (PyCFunction )_mysql_escape_dict ,
2626- METH_VARARGS ,
2627- _mysql_escape_dict__doc__
2628- },
26292533 {
26302534 "escape_string" ,
26312535 (PyCFunction )_mysql_escape_string ,
0 commit comments