diff --git a/NEWS b/NEWS index a400b90b..84f022d4 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,14 @@ -What's new in psycopg 2.0 beta 8 --------------------------------- +What's new in psycopg 2.0 +------------------------- * Fixed handle leak on win32. +* If available the new "safe" encoding functions of libpq are used. + +* django and tinyerp people, please switch to psycopg 2 _without_ + using a psycopg 1 compatibility layer (this release was anticipated + so that you all stop grumbling about psycopg 2 is still in beta.. :) + What's new in psycopg 2.0 beta 7 -------------------------------- diff --git a/ZPsycopgDA/DA.py b/ZPsycopgDA/DA.py index 87205066..91159e86 100644 --- a/ZPsycopgDA/DA.py +++ b/ZPsycopgDA/DA.py @@ -134,13 +134,11 @@ class Connection(Shared.DC.ZRDB.Connection.Connection): register_type(ZDATETIME) register_type(ZDATE) register_type(ZTIME) - register_type(ZINTERVAL) else: # use the standard register_type(DATETIME) register_type(DATE) register_type(TIME) - register_type(INTERVAL) ## browsing and table/column management ## @@ -238,7 +236,8 @@ def _cast_Time(iso, curs): time.localtime(time.time())[:3]+ time.strptime(iso[:8], "%H:%M:%S")[3:])) -# TODO: DateTime does not support intervals: what's the best we can do? +# NOTE: we don't cast intervals anymore because they are passed +# untouched to Zope. def _cast_Interval(iso, curs): return iso diff --git a/ZPsycopgDA/db.py b/ZPsycopgDA/db.py index 69a3435c..2c90ab8c 100644 --- a/ZPsycopgDA/db.py +++ b/ZPsycopgDA/db.py @@ -105,7 +105,8 @@ class DB(TM, dbi_db.DB): elif typ == ROWID: typs = 'i' typp = ROWID - elif typ == DATETIME or typ == DATE: + # FIXME: shouldn't DATETIME include other types? + elif typ == DATETIME or typ == DATE or typ == TIME: typs = 'd' typp = DATETIME else: