mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-11 03:26:37 +03:00
Dropped debug info for microprotocols/adapters initialization
Not useful anymore (guess they were when those layers were created). Much shorter stream of messages on module init now.
This commit is contained in:
parent
d61c902230
commit
0935c9d8ca
|
@ -38,8 +38,6 @@
|
|||
RAISES_NEG int
|
||||
psyco_adapter_datetime_init(void)
|
||||
{
|
||||
Dprintf("psyco_adapter_datetime_init: datetime init");
|
||||
|
||||
PyDateTime_IMPORT;
|
||||
|
||||
if (!PyDateTimeAPI) {
|
||||
|
|
|
@ -38,8 +38,6 @@
|
|||
int
|
||||
psyco_adapter_mxdatetime_init(void)
|
||||
{
|
||||
Dprintf("psyco_adapter_mxdatetime_init: mx.DateTime init");
|
||||
|
||||
if (mxDateTime_ImportModuleAndAPI()) {
|
||||
Dprintf("psyco_adapter_mxdatetime_init: mx.DateTime initialization failed");
|
||||
PyErr_Clear();
|
||||
|
|
|
@ -68,8 +68,6 @@ microprotocols_add(PyTypeObject *type, PyObject *proto, PyObject *cast)
|
|||
|
||||
if (proto == NULL) proto = (PyObject*)&isqlquoteType;
|
||||
|
||||
Dprintf("microprotocols_add: cast %p for (%s, ?)", cast, type->tp_name);
|
||||
|
||||
if (!(key = PyTuple_Pack(2, (PyObject*)type, proto))) { goto exit; }
|
||||
if (0 != PyDict_SetItem(psyco_adapters, key, cast)) { goto exit; }
|
||||
|
||||
|
|
|
@ -303,7 +303,7 @@ adapters_init(PyObject *module)
|
|||
|
||||
if (0 > microprotocols_init(module)) { goto exit; }
|
||||
|
||||
Dprintf("psycopgmodule: configuring adapters");
|
||||
Dprintf("psycopgmodule: initializing adapters");
|
||||
|
||||
if (0 > microprotocols_add(&PyFloat_Type, NULL, (PyObject*)&pfloatType)) {
|
||||
goto exit;
|
||||
|
@ -935,7 +935,7 @@ datetime_init(void)
|
|||
{
|
||||
PyObject *dt = NULL;
|
||||
|
||||
Dprintf("psycopgmodule: datetime module");
|
||||
Dprintf("psycopgmodule: initializing datetime module");
|
||||
|
||||
/* import python builtin datetime module, if available */
|
||||
if (!(dt = PyImport_ImportModule("datetime"))) {
|
||||
|
|
|
@ -198,8 +198,6 @@ psyco_repl_curs_send_feedback(replicationCursorObject *self,
|
|||
RAISES_NEG int
|
||||
psyco_repl_curs_datetime_init(void)
|
||||
{
|
||||
Dprintf("psyco_repl_curs_datetime_init: datetime init");
|
||||
|
||||
PyDateTime_IMPORT;
|
||||
|
||||
if (!PyDateTimeAPI) {
|
||||
|
|
|
@ -33,8 +33,6 @@
|
|||
RAISES_NEG int
|
||||
psyco_replmsg_datetime_init(void)
|
||||
{
|
||||
Dprintf("psyco_replmsg_datetime_init: datetime init");
|
||||
|
||||
PyDateTime_IMPORT;
|
||||
|
||||
if (!PyDateTimeAPI) {
|
||||
|
|
|
@ -271,8 +271,6 @@ typecast_init(PyObject *module)
|
|||
/* insert the cast types into the 'types' dictionary and register them in
|
||||
the module dictionary */
|
||||
for (i = 0; typecast_builtins[i].name != NULL; i++) {
|
||||
Dprintf("typecast_init: initializing %s", typecast_builtins[i].name);
|
||||
|
||||
t = (typecastObject *)typecast_from_c(&(typecast_builtins[i]), dict);
|
||||
if (t == NULL) { goto exit; }
|
||||
if (typecast_add((PyObject *)t, NULL, 0) < 0) { goto exit; }
|
||||
|
@ -295,7 +293,6 @@ typecast_init(PyObject *module)
|
|||
#ifdef HAVE_MXDATETIME
|
||||
if (0 == psyco_typecast_mxdatetime_init()) {
|
||||
for (i = 0; typecast_mxdatetime[i].name != NULL; i++) {
|
||||
Dprintf("typecast_init: initializing %s", typecast_mxdatetime[i].name);
|
||||
t = (typecastObject *)typecast_from_c(&(typecast_mxdatetime[i]), dict);
|
||||
if (t == NULL) { goto exit; }
|
||||
PyDict_SetItem(dict, t->name, (PyObject *)t);
|
||||
|
@ -307,7 +304,6 @@ typecast_init(PyObject *module)
|
|||
|
||||
if (0 > psyco_typecast_datetime_init()) { goto exit; }
|
||||
for (i = 0; typecast_pydatetime[i].name != NULL; i++) {
|
||||
Dprintf("typecast_init: initializing %s", typecast_pydatetime[i].name);
|
||||
t = (typecastObject *)typecast_from_c(&(typecast_pydatetime[i]), dict);
|
||||
if (t == NULL) { goto exit; }
|
||||
PyDict_SetItem(dict, t->name, (PyObject *)t);
|
||||
|
@ -331,23 +327,15 @@ typecast_add(PyObject *obj, PyObject *dict, int binary)
|
|||
|
||||
typecastObject *type = (typecastObject *)obj;
|
||||
|
||||
Dprintf("typecast_add: object at %p, values refcnt = "
|
||||
FORMAT_CODE_PY_SSIZE_T,
|
||||
obj, Py_REFCNT(type->values)
|
||||
);
|
||||
|
||||
if (dict == NULL)
|
||||
dict = (binary ? psyco_binary_types : psyco_types);
|
||||
|
||||
len = PyTuple_Size(type->values);
|
||||
for (i = 0; i < len; i++) {
|
||||
val = PyTuple_GetItem(type->values, i);
|
||||
Dprintf("typecast_add: adding val: %ld", PyInt_AsLong(val));
|
||||
PyDict_SetItem(dict, val, obj);
|
||||
}
|
||||
|
||||
Dprintf("typecast_add: base caster: %p", type->bcast);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -531,9 +519,6 @@ typecast_new(PyObject *name, PyObject *values, PyObject *cast, PyObject *base)
|
|||
obj = PyObject_GC_New(typecastObject, &typecastType);
|
||||
if (obj == NULL) return NULL;
|
||||
|
||||
Dprintf("typecast_new: new type at = %p, refcnt = " FORMAT_CODE_PY_SSIZE_T,
|
||||
obj, Py_REFCNT(obj));
|
||||
|
||||
Py_INCREF(values);
|
||||
obj->values = values;
|
||||
|
||||
|
@ -560,8 +545,6 @@ typecast_new(PyObject *name, PyObject *values, PyObject *cast, PyObject *base)
|
|||
|
||||
PyObject_GC_Track(obj);
|
||||
|
||||
Dprintf("typecast_new: typecast object created at %p", obj);
|
||||
|
||||
return (PyObject *)obj;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
RAISES_NEG static int
|
||||
psyco_typecast_datetime_init(void)
|
||||
{
|
||||
Dprintf("psyco_typecast_datetime_init: datetime init");
|
||||
|
||||
PyDateTime_IMPORT;
|
||||
|
||||
if (!PyDateTimeAPI) {
|
||||
|
|
|
@ -31,8 +31,6 @@
|
|||
static int
|
||||
psyco_typecast_mxdatetime_init(void)
|
||||
{
|
||||
Dprintf("psyco_typecast_mxdatetime_init: mx.DateTime init");
|
||||
|
||||
if (mxDateTime_ImportModuleAndAPI()) {
|
||||
Dprintf("psyco_typecast_mxdatetime_init: mx.DateTime initialization failed");
|
||||
PyErr_Clear();
|
||||
|
|
Loading…
Reference in New Issue
Block a user