mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-01-31 09:24:07 +03:00
Name the types after the module they are exposed from
This commit is contained in:
parent
31d07e5029
commit
669e787919
|
@ -152,7 +152,7 @@ asis_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
static PyObject *
|
||||
asis_repr(asisObject *self)
|
||||
{
|
||||
return PyString_FromFormat("<psycopg2._psycopg.AsIs object at %p>", self);
|
||||
return PyString_FromFormat("<psycopg2.extensions.AsIs object at %p>", self);
|
||||
}
|
||||
|
||||
|
||||
|
@ -163,7 +163,7 @@ asis_repr(asisObject *self)
|
|||
|
||||
PyTypeObject asisType = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"psycopg2._psycopg.AsIs",
|
||||
"psycopg2.extensions.AsIs",
|
||||
sizeof(asisObject), 0,
|
||||
asis_dealloc, /*tp_dealloc*/
|
||||
0, /*tp_print*/
|
||||
|
|
|
@ -257,7 +257,7 @@ binary_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
static PyObject *
|
||||
binary_repr(binaryObject *self)
|
||||
{
|
||||
return PyString_FromFormat("<psycopg2._psycopg.Binary object at %p>", self);
|
||||
return PyString_FromFormat("<psycopg2.extensions.Binary object at %p>", self);
|
||||
}
|
||||
|
||||
/* object type */
|
||||
|
@ -267,7 +267,7 @@ binary_repr(binaryObject *self)
|
|||
|
||||
PyTypeObject binaryType = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"psycopg2._psycopg.Binary",
|
||||
"psycopg2.extensions.Binary",
|
||||
sizeof(binaryObject), 0,
|
||||
binary_dealloc, /*tp_dealloc*/
|
||||
0, /*tp_print*/
|
||||
|
|
|
@ -149,7 +149,7 @@ pboolean_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
static PyObject *
|
||||
pboolean_repr(pbooleanObject *self)
|
||||
{
|
||||
return PyString_FromFormat("<psycopg2._psycopg.Boolean object at %p>",
|
||||
return PyString_FromFormat("<psycopg2.extensions.Boolean object at %p>",
|
||||
self);
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ pboolean_repr(pbooleanObject *self)
|
|||
|
||||
PyTypeObject pbooleanType = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"psycopg2._psycopg.Boolean",
|
||||
"psycopg2.extensions.Boolean",
|
||||
sizeof(pbooleanObject), 0,
|
||||
pboolean_dealloc, /*tp_dealloc*/
|
||||
0, /*tp_print*/
|
||||
|
|
|
@ -178,7 +178,7 @@ pfloat_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
static PyObject *
|
||||
pfloat_repr(pfloatObject *self)
|
||||
{
|
||||
return PyString_FromFormat("<psycopg2._psycopg.Float object at %p>",
|
||||
return PyString_FromFormat("<psycopg2.extensions.Float object at %p>",
|
||||
self);
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,7 @@ pfloat_repr(pfloatObject *self)
|
|||
|
||||
PyTypeObject pfloatType = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"psycopg2._psycopg.Float",
|
||||
"psycopg2.extensions.Float",
|
||||
sizeof(pfloatObject), 0,
|
||||
pfloat_dealloc, /*tp_dealloc*/
|
||||
0, /*tp_print*/
|
||||
|
|
|
@ -164,7 +164,7 @@ pint_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
static PyObject *
|
||||
pint_repr(pintObject *self)
|
||||
{
|
||||
return PyString_FromFormat("<psycopg2._psycopg.Int object at %p>",
|
||||
return PyString_FromFormat("<psycopg2.extensions.Int object at %p>",
|
||||
self);
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ pint_repr(pintObject *self)
|
|||
|
||||
PyTypeObject pintType = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"psycopg2._psycopg.Int",
|
||||
"psycopg2.extensions.Int",
|
||||
sizeof(pintObject), 0,
|
||||
pint_dealloc, /*tp_dealloc*/
|
||||
0, /*tp_print*/
|
||||
|
|
|
@ -245,8 +245,8 @@ qstring_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
static PyObject *
|
||||
qstring_repr(qstringObject *self)
|
||||
{
|
||||
return PyString_FromFormat("<psycopg2._psycopg.QuotedString object at %p>",
|
||||
self);
|
||||
return PyString_FromFormat(
|
||||
"<psycopg2.extensions.QuotedString object at %p>", self);
|
||||
}
|
||||
|
||||
/* object type */
|
||||
|
@ -256,7 +256,7 @@ qstring_repr(qstringObject *self)
|
|||
|
||||
PyTypeObject qstringType = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"psycopg2._psycopg.QuotedString",
|
||||
"psycopg2.extensions.QuotedString",
|
||||
sizeof(qstringObject), 0,
|
||||
qstring_dealloc, /*tp_dealloc*/
|
||||
0, /*tp_print*/
|
||||
|
|
|
@ -103,7 +103,7 @@ psyco_conn_cursor(connectionObject *self, PyObject *args, PyObject *kwargs)
|
|||
|
||||
if (PyObject_IsInstance(obj, (PyObject *)&cursorType) == 0) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"cursor factory must be subclass of psycopg2._psycopg.cursor");
|
||||
"cursor factory must be subclass of psycopg2.extensions.cursor");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -787,7 +787,7 @@ psyco_conn_lobject(connectionObject *self, PyObject *args, PyObject *keywds)
|
|||
if (obj == NULL) return NULL;
|
||||
if (PyObject_IsInstance(obj, (PyObject *)&lobjectType) == 0) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"lobject factory must be subclass of psycopg2._psycopg.lobject");
|
||||
"lobject factory must be subclass of psycopg2.extensions.lobject");
|
||||
Py_DECREF(obj);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1214,7 +1214,7 @@ connection_traverse(connectionObject *self, visitproc visit, void *arg)
|
|||
|
||||
PyTypeObject connectionType = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"psycopg2._psycopg.connection",
|
||||
"psycopg2.extensions.connection",
|
||||
sizeof(connectionObject), 0,
|
||||
connection_dealloc, /*tp_dealloc*/
|
||||
0, /*tp_print*/
|
||||
|
|
|
@ -1825,7 +1825,7 @@ cursor_setup(cursorObject *self, connectionObject *conn, const char *name)
|
|||
if (PyObject_IsInstance((PyObject*)conn,
|
||||
(PyObject *)&connectionType) == 0) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"argument 1 must be subclass of psycopg2._psycopg.connection");
|
||||
"argument 1 must be subclass of psycopg2.extensions.connection");
|
||||
return -1;
|
||||
} */
|
||||
Py_INCREF(conn);
|
||||
|
@ -1966,7 +1966,7 @@ cursor_traverse(cursorObject *self, visitproc visit, void *arg)
|
|||
|
||||
PyTypeObject cursorType = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"psycopg2._psycopg.cursor",
|
||||
"psycopg2.extensions.cursor",
|
||||
sizeof(cursorObject), 0,
|
||||
cursor_dealloc, /*tp_dealloc*/
|
||||
0, /*tp_print*/
|
||||
|
|
|
@ -158,7 +158,7 @@ static const char diagnosticsType_doc[] =
|
|||
|
||||
PyTypeObject diagnosticsType = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"psycopg2._psycopg.Diagnostics",
|
||||
"psycopg2.extensions.Diagnostics",
|
||||
sizeof(diagnosticsObject), 0,
|
||||
(destructor)diagnostics_dealloc, /*tp_dealloc*/
|
||||
0, /*tp_print*/
|
||||
|
|
|
@ -406,7 +406,7 @@ lobject_repr(lobjectObject *self)
|
|||
|
||||
PyTypeObject lobjectType = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"psycopg2._psycopg.lobject",
|
||||
"psycopg2.extensions.lobject",
|
||||
sizeof(lobjectObject), 0,
|
||||
lobject_dealloc, /*tp_dealloc*/
|
||||
0, /*tp_print*/
|
||||
|
|
|
@ -142,7 +142,7 @@ isqlquote_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
|
||||
PyTypeObject isqlquoteType = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"psycopg2._psycopg.ISQLQuote",
|
||||
"psycopg2.extensions.ISQLQuote",
|
||||
sizeof(isqlquoteObject), 0,
|
||||
isqlquote_dealloc, /*tp_dealloc*/
|
||||
0, /*tp_print*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user