diff --git a/ChangeLog b/ChangeLog index 104728eb..30403285 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-08-02 Federico Di Gregorio + + * Release 2.0.4. + + * Fixed bug in float conversion (check for NULL string was + erroneously removed in 2.0.3!) + 2006-07-31 Federico Di Gregorio * Release 2.0.3. diff --git a/ZPsycopgDA/DA.py b/ZPsycopgDA/DA.py index c0bd8e9e..a336376b 100644 --- a/ZPsycopgDA/DA.py +++ b/ZPsycopgDA/DA.py @@ -18,7 +18,7 @@ # See the LICENSE file for details. -ALLOWED_PSYCOPG_VERSIONS = ('2.0.1', '2.0.2', '2.0.3') +ALLOWED_PSYCOPG_VERSIONS = ('2.0.1', '2.0.2', '2.0.3', '2.0.4') import sys import time diff --git a/psycopg/typecast_basic.c b/psycopg/typecast_basic.c index 00f9480a..f59e5c32 100644 --- a/psycopg/typecast_basic.c +++ b/psycopg/typecast_basic.c @@ -55,6 +55,8 @@ static PyObject * typecast_FLOAT_cast(char *s, int len, PyObject *curs) { char *pend; + + if (s == NULL) {Py_INCREF(Py_None); return Py_None;} PyObject *str = PyString_FromStringAndSize(s, len); PyObject *flo = PyFloat_FromString(str, &pend); Py_DECREF(str); diff --git a/setup.py b/setup.py index 3160fe30..f89a9482 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ from distutils.command.build_ext import build_ext from distutils.sysconfig import get_python_inc from distutils.ccompiler import get_default_compiler -PSYCOPG_VERSION = '2.0.3' +PSYCOPG_VERSION = '2.0.4' version_flags = [] # to work around older distutil limitations