author | Denis Laxalde <denis.laxalde@logilab.fr> |
Tue, 04 Feb 2014 11:23:58 +0100 | |
changeset 9513 | a7e0746f010c |
parent 9486 | 9a62c52d167e |
child 9548 | be001628edad |
permissions | -rw-r--r-- |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
1 |
What's new in CubicWeb 3.19? |
9015
65b8236e1bb4
[sources] drop support for ldapuser source (closes #2936496)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
2 |
============================ |
65b8236e1bb4
[sources] drop support for ldapuser source (closes #2936496)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
3 |
|
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
4 |
Behaviour Changes |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
5 |
----------------- |
9042
6cc13a0a9145
[dbapi] makes anonymous_connection a computed property
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9038
diff
changeset
|
6 |
|
6cc13a0a9145
[dbapi] makes anonymous_connection a computed property
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9038
diff
changeset
|
7 |
* The anonymous property of Session and Connection are now computed from the |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
8 |
related user login. If it matches the ``anonymous-user`` in the config the |
9042
6cc13a0a9145
[dbapi] makes anonymous_connection a computed property
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9038
diff
changeset
|
9 |
connection is anonymous. Beware that the ``anonymous-user`` config is web |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
10 |
specific. Therefore, no session may be anonymous in a repository only setup. |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
11 |
|
9042
6cc13a0a9145
[dbapi] makes anonymous_connection a computed property
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9038
diff
changeset
|
12 |
|
9113
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
13 |
New Repository Access API |
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
14 |
------------------------- |
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
15 |
|
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
16 |
Connection replaces Session |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
17 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
9113
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
18 |
|
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
19 |
A new explicit Connection object replaces Session as the main repository entry |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
20 |
point. Connection holds all the necessary methods to be used server-side |
9113
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
21 |
(``execute``, ``commit``, ``rollback``, ``call_service``, ``entity_from_eid``, |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
22 |
etc...). One obtains a new Connection object using ``session.new_cnx()``. |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
23 |
Connection objects need to have an explicit begin and end. Use them as a context |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
24 |
manager to never miss an end:: |
9113
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
25 |
|
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
26 |
with session.new_cnx() as cnx: |
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
27 |
self.execute('INSERT Elephant E, E name "Cabar"') |
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
28 |
self.commit() |
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
29 |
self.execute('INSERT Elephant E, E name "Celeste"') |
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
30 |
self.commit() |
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
31 |
# Once you get out of the "with" clause, the connection is closed. |
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
32 |
|
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
33 |
Using the same Connection object in multiple threads will give you access to the |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
34 |
same Transaction. However, Connection objects are not thread safe (hence at your |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
35 |
own risks). |
9113
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
36 |
|
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
37 |
``repository.internal_session`` is deprecated in favor of |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
38 |
``repository.internal_cnx``. Note that internal connections are now `safe` by default, |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
39 |
i.e. the integrity hooks are enabled. |
9113
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
40 |
|
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
41 |
Backward compatibility is preserved on Session. |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
42 |
|
9113
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
43 |
|
9115
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
44 |
dbapi vs repoapi |
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
45 |
~~~~~~~~~~~~~~~~ |
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
46 |
|
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
47 |
A new API has been introduced to replace the dbapi. It is called `repoapi`. |
9115
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
48 |
|
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
49 |
There are three relevant functions for now: |
9115
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
50 |
|
9513
a7e0746f010c
[doc/3.19] Clarify repoapi.get_repository usage
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
9486
diff
changeset
|
51 |
* ``repoapi.get_repository`` returns a Repository object either from an |
a7e0746f010c
[doc/3.19] Clarify repoapi.get_repository usage
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
9486
diff
changeset
|
52 |
URI when used as ``repoapi.get_repository(uri)`` or from a config |
a7e0746f010c
[doc/3.19] Clarify repoapi.get_repository usage
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
9486
diff
changeset
|
53 |
when used as ``repoapi.get_repository(config=config)``. |
9115
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
54 |
|
9486
9a62c52d167e
[doc/3.19] Make repoapi description match code
Julien Cristau <julien.cristau@logilab.fr>
parents:
9405
diff
changeset
|
55 |
* ``repoapi.connect(repo, login, **credentials)`` returns a ClientConnection |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
56 |
associated with the user identified by the credentials. The |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
57 |
ClientConnection is associated with its own Session that is closed |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
58 |
when the ClientConnection is closed. A ClientConnection is a |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
59 |
Connection-like object to be used client side. |
9115
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
60 |
|
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
61 |
* ``repoapi.anonymous_cnx(repo)`` returns a ClientConnection associated |
9486
9a62c52d167e
[doc/3.19] Make repoapi description match code
Julien Cristau <julien.cristau@logilab.fr>
parents:
9405
diff
changeset
|
62 |
with the anonymous user if described in the config. |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
63 |
|
9115
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
64 |
|
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
65 |
repoapi.ClientConnection replace dbapi.Connection and company |
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
66 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
67 |
|
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
68 |
On the client/web side, the Request is now using a ``repoapi.ClientConnection`` |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
69 |
instead of a ``dbapi.connection``. The ``ClientConnection`` has multiple backward |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
70 |
compatible methods to make it look like a ``dbapi.Cursor`` and ``dbapi.Connection``. |
9115
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
71 |
|
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
72 |
Session used on the Web side are now the same than the one used Server side. |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
73 |
Some backward compatibility methods have been installed on the server side Session |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
74 |
to ease the transition. |
9115
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
75 |
|
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
76 |
The authentication stack has been altered to use the ``repoapi`` instead of |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
77 |
the ``dbapi``. Cubes adding new element to this stack are likely to break. |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
78 |
|
9115
fcc732a9d9ac
[documentation] describe repoapi and web side change.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9113
diff
changeset
|
79 |
|
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
80 |
New API in tests |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
81 |
~~~~~~~~~~~~~~~~ |
9119
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
82 |
|
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
83 |
All current methods and attributes used to access the repo on ``CubicWebTC`` are |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
84 |
deprecated. You may now use a ``RepoAccess`` object. A ``RepoAccess`` object is |
9119
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
85 |
linked to a new ``Session`` for a specified user. It is able to create |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
86 |
``Connection``, ``ClientConnection`` and web side requests linked to this |
9119
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
87 |
session:: |
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
88 |
|
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
89 |
access = self.new_access('babar') # create a new RepoAccess for user babar |
9119
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
90 |
with access.repo_cnx() as cnx: |
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
91 |
# some work with server side cnx |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
92 |
cnx.execute(...) |
9119
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
93 |
cnx.commit() |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
94 |
cnx.execute(...) |
9119
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
95 |
cnx.commit() |
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
96 |
|
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
97 |
with access.client_cnx() as cnx: |
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
98 |
# some work with client side cnx |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
99 |
cnx.execute(...) |
9119
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
100 |
cnx.commit() |
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
101 |
|
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
102 |
with access.web_request(elephant='babar') as req: |
9119
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
103 |
# some work with client side cnx |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
104 |
elephant_name = req.form['elephant'] |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
105 |
req.execute(...) |
9119
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
106 |
req.cnx.commit() |
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
107 |
|
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
108 |
By default ``testcase.admin_access`` contains a ``RepoAccess`` object for the |
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
109 |
default admin session. |
cc85def2ac57
[doc] add documentation for the new API in test
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9115
diff
changeset
|
110 |
|
9113
af6efc15fc90
[repository] add an ``internal_cnx`` method to replace ``internal_session``
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9043
diff
changeset
|
111 |
|
9018
9deb024a96c0
[session-handler] use session directly to update last usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9016
diff
changeset
|
112 |
API changes |
9deb024a96c0
[session-handler] use session directly to update last usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9016
diff
changeset
|
113 |
----------- |
9deb024a96c0
[session-handler] use session directly to update last usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9016
diff
changeset
|
114 |
|
9deb024a96c0
[session-handler] use session directly to update last usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9016
diff
changeset
|
115 |
* ``RepositorySessionManager.postlogin`` is now called with two arguments, |
9deb024a96c0
[session-handler] use session directly to update last usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9016
diff
changeset
|
116 |
request and session. And this now happens before the session is linked to the |
9deb024a96c0
[session-handler] use session directly to update last usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9016
diff
changeset
|
117 |
request. |
9deb024a96c0
[session-handler] use session directly to update last usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9016
diff
changeset
|
118 |
|
9032
629a8d49d6f5
[auth] pass `repo` instead of `vreg` to SessionManager and AuthenticationManager
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9018
diff
changeset
|
119 |
* ``SessionManager`` and ``AuthenticationManager`` now take a repo object at |
629a8d49d6f5
[auth] pass `repo` instead of `vreg` to SessionManager and AuthenticationManager
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9018
diff
changeset
|
120 |
initialization time instead of a vreg. |
629a8d49d6f5
[auth] pass `repo` instead of `vreg` to SessionManager and AuthenticationManager
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9018
diff
changeset
|
121 |
|
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
122 |
* The ``async`` argument of ``_cw.call_service`` has been dropped. All calls are |
9033
614bf73cc126
[service] drop the asynchronous execution possibility
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9032
diff
changeset
|
123 |
now synchronous. The zmq notification bus looks like a good replacement for |
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
124 |
most async use cases. |
9033
614bf73cc126
[service] drop the asynchronous execution possibility
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9032
diff
changeset
|
125 |
|
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
126 |
* ``repo.stats()`` is now deprecated. The same information is available through |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
127 |
a service (``_cw.call_service('repo_stats')``). |
9034
cc3442054e48
[repo] move repo stats to Service (closes #2951067)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9033
diff
changeset
|
128 |
|
9405
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
129 |
* ``repo.gc_stats()`` is now deprecated. The same information is available through |
7fc5e13d049f
[doc/3.19] fix (mostly) grammar
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
9404
diff
changeset
|
130 |
a service (``_cw.call_service('repo_gc_stats')``). |
9035
63f3d25bab14
[repo] move repo.gc_stats to Service API (closes #2951068)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9034
diff
changeset
|
131 |
|
9038
1b972d81eda4
[request] drop the user argument for set_session
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9035
diff
changeset
|
132 |
* ``request.set_session`` no longer takes an optional ``user`` argument. |
1b972d81eda4
[request] drop the user argument for set_session
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9035
diff
changeset
|
133 |
|
9043
97c3bb9a7c99
[testlib] move repo and related attribute back on Instance instead of Class
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9042
diff
changeset
|
134 |
* CubicwebTC does not have repo and cnx as class attributes anymore. They are |
97c3bb9a7c99
[testlib] move repo and related attribute back on Instance instead of Class
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9042
diff
changeset
|
135 |
standard instance attributes. ``set_cnx`` and ``_init_repo`` class methods |
97c3bb9a7c99
[testlib] move repo and related attribute back on Instance instead of Class
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9042
diff
changeset
|
136 |
become instance methods. |
97c3bb9a7c99
[testlib] move repo and related attribute back on Instance instead of Class
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9042
diff
changeset
|
137 |
|
9123
c992811edec2
[connection] deprecated free_cnset and set_cnxset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9119
diff
changeset
|
138 |
* ``set_cnxset`` and ``free_cnxset`` are deprecated. cnxset are now |
c992811edec2
[connection] deprecated free_cnset and set_cnxset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9119
diff
changeset
|
139 |
automatically managed. |
c992811edec2
[connection] deprecated free_cnset and set_cnxset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9119
diff
changeset
|
140 |
|
9018
9deb024a96c0
[session-handler] use session directly to update last usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
9016
diff
changeset
|
141 |
|
9015
65b8236e1bb4
[sources] drop support for ldapuser source (closes #2936496)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
142 |
Deprecated Code Drops |
65b8236e1bb4
[sources] drop support for ldapuser source (closes #2936496)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
143 |
---------------------- |
65b8236e1bb4
[sources] drop support for ldapuser source (closes #2936496)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
144 |
|
9016 | 145 |
* session.hijack_user mechanism has been dropped. |