mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +03:00
Small DA fixes.
This commit is contained in:
parent
122925a7fa
commit
2e2b4ad01a
10
NEWS
10
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.
|
* 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
|
What's new in psycopg 2.0 beta 7
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
|
|
|
@ -134,13 +134,11 @@ class Connection(Shared.DC.ZRDB.Connection.Connection):
|
||||||
register_type(ZDATETIME)
|
register_type(ZDATETIME)
|
||||||
register_type(ZDATE)
|
register_type(ZDATE)
|
||||||
register_type(ZTIME)
|
register_type(ZTIME)
|
||||||
register_type(ZINTERVAL)
|
|
||||||
else:
|
else:
|
||||||
# use the standard
|
# use the standard
|
||||||
register_type(DATETIME)
|
register_type(DATETIME)
|
||||||
register_type(DATE)
|
register_type(DATE)
|
||||||
register_type(TIME)
|
register_type(TIME)
|
||||||
register_type(INTERVAL)
|
|
||||||
|
|
||||||
## browsing and table/column management ##
|
## browsing and table/column management ##
|
||||||
|
|
||||||
|
@ -238,7 +236,8 @@ def _cast_Time(iso, curs):
|
||||||
time.localtime(time.time())[:3]+
|
time.localtime(time.time())[:3]+
|
||||||
time.strptime(iso[:8], "%H:%M:%S")[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):
|
def _cast_Interval(iso, curs):
|
||||||
return iso
|
return iso
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,8 @@ class DB(TM, dbi_db.DB):
|
||||||
elif typ == ROWID:
|
elif typ == ROWID:
|
||||||
typs = 'i'
|
typs = 'i'
|
||||||
typp = ROWID
|
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'
|
typs = 'd'
|
||||||
typp = DATETIME
|
typp = DATETIME
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user