diff options
author | Federico Di Gregorio <fog@initd.org> | 2005-05-09 08:54:32 +0000 |
---|---|---|
committer | Federico Di Gregorio <fog@initd.org> | 2005-05-09 08:54:32 +0000 |
commit | b1745ff139bac8890bb73e09c3965f22304753ac (patch) | |
tree | 181508f7eb7a997adcba484ace6ab8835db52dc2 | |
parent | 65a4b86fa2facb766b33f52813a341661dedd643 (diff) | |
download | psycopg2-b1745ff139bac8890bb73e09c3965f22304753ac.tar.gz |
Various fixes.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | NEWS | 27 | ||||
-rw-r--r-- | psycopg/adapter_binary.c | 2 | ||||
-rw-r--r-- | psycopg/typecast_datetime.c | 4 |
4 files changed, 37 insertions, 3 deletions
@@ -1,5 +1,12 @@ 2005-05-09 Federico Di Gregorio <fog@debian.org> + * psycopg/typecast_datetime.c (typecast_PYDATETIME_cast): fixed a + typo (pyDateTimeModuleP->pyDateTimeTypeP) that was causing errors + with infinite datetime values. + + * psycopg/adapter_binary.c (binary_str): Py_XINCREF on the buffer + that can be NULL on error. + * psycopg/typecast_binary.*: applied slightly modified chunk/buffer object patch to allow round-trip of buffer objects (BYTEA columns.) @@ -1,3 +1,30 @@ +What's new in psycopg 2.0 beta 1 +-------------------------------- + +* Officially in beta (i.e., no new features will be added.) + +* Array support: list objects can be passed as bound variables and are + correctly returned for array columns. + +* Added the psycopg.psycopg1 compatibility module (if you want instant + psycopg 1 compatibility just "from psycopg import psycopg1 as psycopg".) + +* Complete support for BYTEA columns and buffer objects. + +* The AsIs adapter is now exported by default (also Decimal objects are + adapter using the AsIs adapter (when str() is called on them they + already format themselves using the right precision and scale.) + +* The connect() function now takes "connection_factory" instead of + "factory" as keyword argument. + +* New setup.py code to build on win32 using mingw and better error + messages on missing datetime headers, + +* Internal changes that allow much better user-defined type casters. + +* A lot of bugfixes (binary, datetime, 64 bit arches, GIL, .executemany()) + What's new in psycopg 1.99.13 ----------------------------- diff --git a/psycopg/adapter_binary.c b/psycopg/adapter_binary.c index 37ea50f..9b82e45 100644 --- a/psycopg/adapter_binary.c +++ b/psycopg/adapter_binary.c @@ -154,7 +154,7 @@ binary_str(binaryObject *self) if (self->buffer == NULL) { binary_quote(self); } - Py_INCREF(self->buffer); + Py_XINCREF(self->buffer); return self->buffer; } diff --git a/psycopg/typecast_datetime.c b/psycopg/typecast_datetime.c index b02da58..1a1bff4 100644 --- a/psycopg/typecast_datetime.c +++ b/psycopg/typecast_datetime.c @@ -81,10 +81,10 @@ typecast_PYDATETIME_cast(unsigned char *str, int len, PyObject *curs) /* check for infinity */ if (!strcmp(str, "infinity") || !strcmp(str, "-infinity")) { if (str[0] == '-') { - obj = PyObject_GetAttrString(pyDateTimeModuleP, "min"); + obj = PyObject_GetAttrString(pyDateTimeTypeP, "min"); } else { - obj = PyObject_GetAttrString(pyDateTimeModuleP, "max"); + obj = PyObject_GetAttrString(pyDateTimeTypeP, "max"); } } |