@@ -607,17 +607,6 @@ static int _mysql_ConnectionObject_clear(
607
607
return 0 ;
608
608
}
609
609
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
-
621
610
static char _mysql_ConnectionObject_close__doc__ [] =
622
611
"Close the connection. No further activity possible." ;
623
612
@@ -1036,71 +1025,6 @@ _mysql_escape(
1036
1025
}
1037
1026
}
1038
1027
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
-
1104
1028
static char _mysql_ResultObject_describe__doc__ [] =
1105
1029
"Returns the sequence of 7-tuples required by the DB-API for\n\
1106
1030
the Cursor.description attribute.\n\
@@ -2169,12 +2093,6 @@ static PyMethodDef _mysql_ConnectionObject_methods[] = {
2169
2093
METH_NOARGS ,
2170
2094
_mysql_ConnectionObject_close__doc__
2171
2095
},
2172
- {
2173
- "fileno" ,
2174
- (PyCFunction )_mysql_ConnectionObject_fileno ,
2175
- METH_NOARGS ,
2176
- _mysql_ConnectionObject_fileno__doc__
2177
- },
2178
2096
{
2179
2097
"dump_debug_info" ,
2180
2098
(PyCFunction )_mysql_ConnectionObject_dump_debug_info ,
@@ -2612,20 +2530,6 @@ _mysql_methods[] = {
2612
2530
METH_VARARGS ,
2613
2531
_mysql_escape__doc__
2614
2532
},
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
- },
2629
2533
{
2630
2534
"escape_string" ,
2631
2535
(PyCFunction )_mysql_escape_string ,
0 commit comments