mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-03-13 04:15:46 +03:00
Avoid printing the typecast name in debug statement
The way we were doing it is unsafe and causes assertion failures on Py3. Fixes ticket #188 Conflicts: NEWS
This commit is contained in:
parent
7faedd0a90
commit
7ed593504c
2
NEWS
2
NEWS
|
@ -12,6 +12,8 @@ What's new in psycopg 2.4.7
|
|||
Alexey Borzenkov (:ticket:`#173`).
|
||||
- Manually creating `lobject` with the wrong parameter doesn't segfault
|
||||
(:ticket:`#187`).
|
||||
- Fixed unsafe access to object names causing assertion failures in
|
||||
Python 3 debug builds (:ticket:`#188`).
|
||||
- Avoid blocking async connections on connect (:ticket:`#194`). Thanks to
|
||||
Adam Petrovich for the bug report and diagnosis.
|
||||
- Fixed handling of dsn and closed attributes in connection subclasses
|
||||
|
|
|
@ -1101,9 +1101,8 @@ _pq_fetch_tuples(cursorObject *curs)
|
|||
cast = psyco_default_cast;
|
||||
}
|
||||
|
||||
Dprintf("_pq_fetch_tuples: using cast at %p (%s) for type %d",
|
||||
cast, Bytes_AS_STRING(((typecastObject*)cast)->name),
|
||||
PQftype(curs->pgres,i));
|
||||
Dprintf("_pq_fetch_tuples: using cast at %p for type %d",
|
||||
cast, PQftype(curs->pgres,i));
|
||||
Py_INCREF(cast);
|
||||
PyTuple_SET_ITEM(casts, i, cast);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user