Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 14:35:55 +0200] rev 9108
[connection] handle and explicitly life cycle on Connection
Like ClientConnection, Connection object need to be explicitly started and stop.
They aims to be used as context manager.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 14:00:32 +0200] rev 9107
[sesion] distinction between Connection handled by the session and other.
Not mixing the new and backward compat approach seems a good idea. Let's enforce
it.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 11:58:34 +0200] rev 9106
[session] replace _clear_thread_storage with close_cnx
There is not good reason to keep two distinct method.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 14:01:07 +0200] rev 9105
[session] explicitly take Connection object in close_cnx
Now that ClientConnection explicitly reference and use the Connection object we
do not need to use connectionid here.
We can safely change this signature, ClientConnection is the only use of
close_cnx for now.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 11:41:53 +0200] rev 9104
[session] drop the Session._clear_cnx_storage method
It is just cnx.clear() now.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 11:39:41 +0200] rev 9103
[session] wrap too long line
Too long line is too long.
(Confucius 503 BC)
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 11:39:01 +0200] rev 9102
[session] gather close_cnx with get_cnx and set_cnx
They do the same kind of operation and deserve to be grouped together.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:13:18 +0200] rev 9101
[client-connection] remove the _srv_cnx usage
It does not do anything special now that we use explicite Connection object with
automatic cnx_set handling.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:04:31 +0200] rev 9100
[client-connection] explicitly check that the client-connection is open
The check is also perform by the _srv_cnx property. But we do not need those
property anymore.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 11:02:30 +0200] rev 9099
[client-connection] handle the lack of connection id while not open
the connection id is computed at opening and forgotten when closing. We can't
rely on it in various messages … like the "connection closed" exception.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Jun 2013 11:21:39 +0200] rev 9098
[connection] transparent cnx_set handling
Connection object while take cares of there cnxset themself (as dbapi connection
does).
The ``set_cnxset`` and ``free_cnxset`` operation are still available for
backward compatibility purpose. The ``_auto_free_cnx_set`` is introduced to
handle mixed usage.
A new context manager ``connection.ensure_cnx_set`` is added for code that
access ``cnx.cnxset`` directly and are not wrapped in any specific
``Connection`` method.
A ``_with_cnx_set`` decorator is used on all Connection method that need a
cnxset.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 27 Jun 2013 10:44:40 +0200] rev 9097
[client-connection] explicit the client part in __repr__
Now that we have real server side connection we need to remove ambiguity.