mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-10 19:16:34 +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
This commit is contained in:
parent
ca98167ae4
commit
9036299d54
2
NEWS
2
NEWS
|
@ -19,6 +19,8 @@ What's new in psycopg 2.5.3
|
|||
Chris Withers (:ticket:`#193`).
|
||||
- Avoid blocking async connections on connect (:ticket:`#194`). Thanks to
|
||||
Adam Petrovich for the bug report and diagnosis.
|
||||
- Fixed unsafe access to object names causing assertion failures in
|
||||
Python 3 debug builds (:ticket:`#188`).
|
||||
- Fixed handling of dsn and closed attributes in connection subclasses
|
||||
failing to connect (from :ticket:`#192` discussion).
|
||||
- Fixed overflow opening a lobject with an oid not fitting in a signed int
|
||||
|
|
|
@ -1134,9 +1134,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