mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +03:00
Merge branch 'python3_mintimeloggingconnection' into maint_2_7
This commit is contained in:
commit
1619bae1e3
1
NEWS
1
NEWS
|
@ -5,6 +5,7 @@ What's new in psycopg 2.7.4
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- Fixed Solaris 10 support (:ticket:`#532`).
|
||||
- Fixed `MinTimeLoggingCursor` on Python 3 (:ticket:`#609`).
|
||||
- Fixed parsing of array of points as floats (:ticket:`#613`).
|
||||
|
||||
|
||||
|
|
|
@ -455,6 +455,8 @@ class MinTimeLoggingConnection(LoggingConnection):
|
|||
def filter(self, msg, curs):
|
||||
t = (_time.time() - curs.timestamp) * 1000
|
||||
if t > self._mintime:
|
||||
if _sys.version_info[0] >= 3 and isinstance(msg, bytes):
|
||||
msg = msg.decode(_ext.encodings[self.encoding], 'replace')
|
||||
return msg + _os.linesep + " (execution time: %d ms)" % t
|
||||
|
||||
def cursor(self, *args, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue
Block a user