diff --git a/NEWS b/NEWS index c73d9963..e5060808 100644 --- a/NEWS +++ b/NEWS @@ -5,12 +5,13 @@ What's new in psycopg 2.6.2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Report the server response status on errors (such as :ticket:`#281`). +- Raise `!NotSupportedError` on unhandled server response status + (:ticket:`#352`). - The `~psycopg2.extras.wait_select` callback allows interrupting a long-running query in an interactive shell using :kbd:`Ctrl-C` (:ticket:`#333`). -- Raise `!NotSupportedError` on unhandled server response status - (:ticket:`#352`). - Fixed `!PersistentConnectionPool` on Python 3 (:ticket:`#348`). +- Fixed segfault on `repr()` of an unitialized connection (:ticket:`#361`). - Added support for setuptools/wheel (:ticket:`#370`). - Fix build on Windows with Python 3.5, VS 2015 (:ticket:`#380`). - Fixed `!errorcodes.lookup` initialization thread-safety (:ticket:`#382`). diff --git a/psycopg/connection_type.c b/psycopg/connection_type.c index 43abe8a3..ed499118 100644 --- a/psycopg/connection_type.c +++ b/psycopg/connection_type.c @@ -1172,7 +1172,7 @@ connection_repr(connectionObject *self) { return PyString_FromFormat( "", - self, self->dsn, self->closed); + self, (self->dsn ? self->dsn : ""), self->closed); } static int