Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 12:41:27 +0200] rev 9039
[testlib] rework request building in init_authentication
The previous code was building a full authenticated request and tried to undo
the authentication afterward. The new code just create a bare Request with no
authenticated session linked yet.
This is much closer of what the actual authentication process does.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 12:39:25 +0200] rev 9038
[request] drop the user argument for set_session
I see no code nor test that use this optional argument. removing it help to
clean the session code. The set_session function will soon be deprecated anyway (at the
same time than the dbapi)
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 19 Jun 2013 12:00:54 +0200] rev 9037
[web-request] handle default language earlier
We now read language negotiation header at initialisation time (previously done
during ``set_session``). This simplify the set_session code for later reworking.
There is no change in behavior, the user selected language continue to overwrite
the one picked from the header/default when applicable.
related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 18 Jun 2013 15:12:25 +0200] rev 9036
[etwist] pass the repository to the root resource
This is another step toward a cleaner instantiation scheme for the repo.
The http test now pass an already created object to the etwist server instead of
relying on the config cache.
Related to #2249513
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 12:03:37 +0200] rev 9035
[repo] move repo.gc_stats to Service API (closes #2951068)
We currently have a method on the repo that anyone can call. `call_service`
gives a similar thing, modulo:
* can be restricted access to manager only (thanks to selection on services),
* less unrelated code on the repository class,
* no need to fetch a reference to a repo object from the client side
* (`req._cnx.repo` is not an API and config.repository() is on its way out).
The old way to access this information (repo.gc_stats()) is deprecated.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 12:05:35 +0200] rev 9034
[repo] move repo stats to Service (closes #2951067)
We currently add a new method on repo that anyone can call. Call service allows
to reach the same result with:
* Restricted access to manager only (thanks to selection on services),
* Less unrelated code on the repo.
* No need to fetch a reference to a repo object from client side.
`req._cnx.repo` is not an API and config.repository() is on its way out.
The old way to access this information (repo.stats()) is deprecated.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 11:59:45 +0200] rev 9033
[service] drop the asynchronous execution possibility
Call_service was able of both sync and sync execution making the API confusing.
There is not user of the async case. We drop the async argument in favor of
synchronous execution only.
This makes call_service the official API to call server side code from the
client side. This is a remplacement for the usual monkey patching of the repo
object.
The zmq notification bus is a solid alternative for codes that needs to start an
async execution.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 24 Jun 2013 12:00:03 +0200] rev 9032
[auth] pass `repo` instead of `vreg` to SessionManager and AuthenticationManager
Those object actually need a repo object to connect and create new session
object. They used to retrieve the repo object using
``vreg.config.repository()``. I'm trying to sanitise the initialisation stack
and get ride of ``config.repository()``, a function that mix factory and cache.
Retrieving the vreg from the repo is trivial (``repo.vreg``) so we now pass the
repo object instead of the vreg.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 23 Nov 2012 16:12:19 +0100] rev 9031
web/application: instantiate the repository outside of CubicWebPublisher
This improves decoupling and allows ``CubicWebPublisher`` user to choose which
argument are used during ``Repository`` instantiation. In particular is allows
caller to provide a ``TaskManager``.
The `vreg` argument of publisher is made mandatory. See CubicWebPublisher
docstring for details.
Related to #2249513
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 07 Dec 2012 17:23:04 +0100] rev 9030
remove vreg argument to CWPublisher
The passing a vreg to CWPublisher was used by test to allow reused of an
existing vreg. We dropped this feature two commit ago and can safely removes it.
Removing this argument allows later cleanup and improvement on the CWPublisher
and Repository front.
closes #2944813
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 07 Dec 2012 16:10:38 +0100] rev 9029
[devtools] vreg becomes a class ppty
After multiple devtools refactoring, the vreg used for test is now *always* got
from the repository. Making this explicit is a step toward simplification of the
vreg handling during various initialisation phases.
Related to #2944813
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 23 Nov 2012 16:33:00 +0100] rev 9028
[devtools] drop unused `reset_schema` and `reset_vreg` class attribute
They have no effect and no user...
Related to #2944813
Pierre-Yves David <pierre-yves.david@logilab.fr> [Mon, 27 May 2013 17:50:55 +0200] rev 9027
[connection] move security control logic on Connection
The _security_enabled context manager now operate on connection. We have to keep
a specific entry point in Session to ensure Connection object are properly
cleaned up when using session to "manage" Connection live cycle.
Related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 14 Jun 2013 12:11:42 +0200] rev 9026
[connection] move hook control logic on Connection
The _hook_control context manager now operate on connection. We have to keep a
specific entry point in Session to ensure Connection object are properly
cleaned up when using session to "manage" Connection live cycle.
Related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 14 Jun 2013 12:10:45 +0200] rev 9025
[session] update _hook_control docstring
pierre-yves [Mon, 27 May 2013 16:43:02 +0200] rev 9024
[connection] reinstall cnx.data as cnx.transaction_data
Too much code expects self._cw.data to be session data.
backout 9b2f68916474
Related to #2503918
Related to #2912807
pierre-yves [Mon, 27 May 2013 16:42:39 +0200] rev 9023
[connection] give access to is_internal_session boolean
Needed if we are to use this object like we currently do with session.
Related to #2503918
pierre-yves [Fri, 14 Jun 2013 13:39:49 +0200] rev 9022
[req] drop from_controller on non WebRequest object (Closes #2901079)
The `controller` concept is purely a web things. It does not belong to generic
`req` object.
The `build_url` code is slightly changed to handle that. This probably requires
extended cleanup later.
This is a barely used and very internal API. No deprecation period
pierre-yves [Tue, 14 May 2013 00:36:43 +0200] rev 9021
[connection] add logging method on connection
If we are to use this object like we currently do with session, we need to have
the logging method as a lot of code use them.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 13 Jun 2013 15:12:06 +0200] rev 9020
rename server.session.transaction into server.session.connection
The ongoing rework of the API to access the database include the splitting of
Session in two objects:
The ``Session`` object will only hold credential (user) and global session data.
A new object will publicly emerge to handle a database access. This object is
named ``Connection`` since that the way database accessors with the same property
are named in other system. So we renamed the ``Transaction`` object into
``Connection``. The ``Transaction`` object have already grown in the direction
of something directly usable by generic code, but the name ``Transaction`` is
ill suited as such object can be used for multiple database transaction in a
row.
Related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 14 Jun 2013 13:43:29 +0200] rev 9019
[application] call req.set_session in application.main_handle_request
The Session handling chain is no more responsible for calling req.set_session.
It just returns a valid session and lets the caller link it to the Request.
This opens the way to explicitly creating and closing a connection/transaction
in ``application.main_handle_request``.
Related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 13 Jun 2013 18:46:39 +0200] rev 9018
[session-handler] use session directly to update last usage
We don't really need the WebRequest for that. Not using the WebRequest to access
the cubicweb repository here will allow a delayed set_session.
Related to #2503918
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 13 Jun 2013 18:50:19 +0200] rev 9017
[application/connect] simplify connection logic
``application.connect`` now either sets a full featured ``DBAPISession`` to the
``WebRequest`` object or raises ``AuthenticationError``. The creation and usage
of a fake DBAPISession is now handled by ``main_handle_request`` when needed.
This means that fake DBAPISession are no longer tracked by the session manager
and that user are not given anyway to retrieve them for a later request.
This fake DBAPISession is still passed to ``core_handle`` because multiple cubes
like registration or forgotten password need this behavior. We would like to get
ride of it in the future.
This clarification of the connection API greatly simplifies ``DBAPISession``
retrieval//creation process opening the
way to improvements in this area.
Related to #2503918
pierre-yves [Thu, 13 Jun 2013 15:36:10 +0200] rev 9016
Drop hijack user (closes #2901093)
Deprecated since 3.17.0. Dropping this function help the session cleanup
business.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 13 Jun 2013 17:27:43 +0200] rev 9015
[sources] drop support for ldapuser source (closes #2936496)
The ldapfeed source is a replacement for ldapuser. Use it instead.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 14 Jun 2013 17:13:17 +0200] rev 9014
merge stable back into default
David Douard <david.douard@logilab.fr> [Fri, 14 Jun 2013 16:26:25 +0200] rev 9013
3.17 is the new stable
David Douard <david.douard@logilab.fr> [Fri, 14 Jun 2013 16:13:24 +0200] rev 9012
Added tag cubicweb-version-3.16.5, cubicweb-debiann-version-3.16.5-1, cubicweb-centos-version-3.16.5-1 for changeset 810a05fba1a4
David Douard <david.douard@logilab.fr> [Fri, 14 Jun 2013 16:02:39 +0200] rev 9011
[pkg] prepare 3.16.5
David Douard <david.douard@logilab.fr> [Fri, 14 Jun 2013 14:41:50 +0200] rev 9010
Added tag cubicweb-version-3.17.2, cubicweb-debian-version-3.17.2-1 for changeset 195e519fe97c
David Douard <david.douard@logilab.fr> [Thu, 13 Jun 2013 17:32:49 +0200] rev 9009
[pkg] prepare 3.17.2
Julien Cristau <julien.cristau@logilab.fr> [Fri, 14 Jun 2013 11:53:40 +0200] rev 9008
repository: make tests pass again
The tests use mono-threaded pyro, which breaks assumptions made in
e27337dfec8c. To fix that, remove sessions from the _pyro_sessions dict
when they're closed, and force the test pyro client to actually
disconnect when it's done.
Julien Cristau <julien.cristau@logilab.fr> [Wed, 12 Jun 2013 18:33:50 +0200] rev 9007
repository: monkey patch pyro connection handling to detect clients going away
When a pyro client goes away we need to close their session (to release their
cnxset). Add a dict to the repository mapping pyro client threads to session
object.
Closes #2932058
Julien Cristau <julien.cristau@logilab.fr> [Thu, 13 Jun 2013 12:01:23 +0200] rev 9006
notification: use viewargs for notif_entity_updated instead of transaction_data
Now that notifications use separate sessions, they can't rely on the
original transaction_data being around, so pass the data through view
arguments instead, so the notification view knows what changed on
updated entities.
Closes #2936180
Julien Cristau <julien.cristau@logilab.fr> [Thu, 13 Jun 2013 12:03:59 +0200] rev 9005
notification: properly handle cnx and lifetime of the hijacked session
When we create a session for the notification rendering, we need to
1) give it a cnxset
2) commit and close it after we're done
3) restore the original session for subsequent notifications
This changes the ordering of actual mail sending, since there are
several different commits involved, but I don't see a way to fix that
short of restoring hijack_user.
Related to #2934523
Julien Cristau <julien.cristau@logilab.fr> [Wed, 12 Jun 2013 12:27:00 +0200] rev 9004
notification: fix session creation (closes #2934523)
Session() takes a user and repo, not repo and user.
David Douard <david.douard@logilab.fr> [Fri, 07 Jun 2013 16:48:20 +0200] rev 9003
Added tag cubicweb-version-3.17.1, cubicweb-debian-version-3.17.1-1, cubicweb-centos-version-3.17.1-1 for changeset f98d1c46ed9f
Nicolas Chauvat <nicolas.chauvat@logilab.fr> [Fri, 24 May 2013 13:00:28 +0200] rev 9002
[cwctl] add configure command to cw-ctl (closes #2709702)
usage: cw-ctl configure <appid> --param key=value,key2=value2 --param key3=value3
Nicolas Chauvat <nicolas.chauvat@logilab.fr> [Fri, 24 May 2013 14:02:45 +0200] rev 9001
[cwctl] rename option no-post-create to no-db-create
David Douard <david.douard@logilab.fr> [Thu, 06 Jun 2013 16:02:46 +0200] rev 9000
[pkg] version 3.17.1 for rpm packages
pierre-yves [Mon, 27 May 2013 15:48:03 +0200] rev 8999
[session] upgrade session closed error from Exception to SessionClosedError
Exception is far too wide and we already have a SessionClosedError anyway.
Closes #2897696
David Douard <david.douard@logilab.fr> [Thu, 06 Jun 2013 12:29:44 +0200] rev 8998
[pkg] prepare 3.17.1
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 30 May 2013 14:46:32 +0200] rev 8997
[web/application] add some minimal documentation
Some documentation to the Application main entry point.
pierre-yves [Thu, 23 May 2013 19:25:24 +0200] rev 8996
[session] raise proper exception with get_tx is called on a closed session
Prevent attribute error on _txs
Closes #2897836
David Douard <david.douard@logilab.fr> [Thu, 06 Jun 2013 09:44:37 +0200] rev 8995
[view] typo in a docstring
Nicolas Chauvat <nicolas.chauvat@logilab.fr> [Fri, 24 May 2013 14:07:46 +0200] rev 8994
[cwctl] pass missing inputlevel argument to postcreate() (closes #2901037)
Julien Cristau <julien.cristau@logilab.fr> [Wed, 29 May 2013 11:41:39 +0200] rev 8993
[server] fix documentation of ZMQ options harder
The syntax for zmq addresses is tcp://host:port, no zmqpickle involved.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 29 May 2013 16:44:16 +0200] rev 8992
merge with 3.16.x fixes