doc/3.15.rst
author Julien Cristau <julien.cristau@logilab.fr>
Tue, 04 Nov 2014 14:10:02 +0100
changeset 10024 2a08247b57fb
parent 9390 41795de3d48a
permissions -rw-r--r--
[server] commit after serializing schema Use separate transactions for schema serialization and postcreate scripts execution, so that the latter can rely on the schema being persistently stored. This matters e.g. if something in a postcreate violates a unique_together constraint, we need the constraint persisted in order to raise a meaningful error. See #4525069.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8364
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
     1
What's new in CubicWeb 3.15?
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
     2
============================
8158
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     3
8362
4ac28926cd15 [doc] improve 3.15 release blog
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8190
diff changeset
     4
New functionnalities
4ac28926cd15 [doc] improve 3.15 release blog
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8190
diff changeset
     5
--------------------
4ac28926cd15 [doc] improve 3.15 release blog
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8190
diff changeset
     6
8364
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
     7
* Add Zmq server, based on the cutting edge ZMQ (http://www.zeromq.org/) socket
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
     8
  library.  This allows to access distant instance, in a similar way as Pyro.
8362
4ac28926cd15 [doc] improve 3.15 release blog
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8190
diff changeset
     9
8364
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    10
* Publish/subscribe mechanism using ZMQ for communication among cubicweb
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    11
  instances.  The new zmq-address-sub and zmq-address-pub configuration variables
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    12
  define where this communication occurs.  As of this release this mechanism is
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    13
  used for entity cache invalidation.
8362
4ac28926cd15 [doc] improve 3.15 release blog
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8190
diff changeset
    14
4ac28926cd15 [doc] improve 3.15 release blog
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8190
diff changeset
    15
* Improved WSGI support. While there is still some caveats, most of the code
9390
41795de3d48a [doc] update 3.18 release notes
Julien Cristau <julien.cristau@logilab.fr>
parents: 8401
diff changeset
    16
  which was twisted only is now generic and allows related functionalities to work
8362
4ac28926cd15 [doc] improve 3.15 release blog
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8190
diff changeset
    17
  with a WSGI front-end.
4ac28926cd15 [doc] improve 3.15 release blog
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8190
diff changeset
    18
4ac28926cd15 [doc] improve 3.15 release blog
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8190
diff changeset
    19
* Full undo/transaction support : undo of modification has eventually been
4ac28926cd15 [doc] improve 3.15 release blog
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8190
diff changeset
    20
  implemented, and the configuration simplified (basically you activate it or not
4ac28926cd15 [doc] improve 3.15 release blog
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8190
diff changeset
    21
  on an instance basis).
4ac28926cd15 [doc] improve 3.15 release blog
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8190
diff changeset
    22
8364
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    23
* Controlling HTTP status code used is not much more easier :
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    24
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    25
  - `WebRequest` now has a `status_out` attribut to control the response status ;
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    26
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    27
  - most web-side exceptions take an optional ``status`` argument.
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    28
8158
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    29
API changes
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    30
-----------
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    31
8190
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    32
* The base registry implementation has been moved to a new
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    33
  `logilab.common.registry` module (see #1916014). This includes code from :
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    34
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    35
  * `cubicweb.vreg` (the whole things that was in there)
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    36
  * `cw.appobject` (base selectors and all).
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    37
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    38
  In the process, some renaming was done:
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    39
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    40
  * the top level registry is now `RegistryStore` (was `VRegistry`), but that
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    41
    should not impact cubicweb client code ;
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    42
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    43
  * former selectors functions are now known as "predicate", though you still use
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    44
    predicates to build an object'selector ;
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    45
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    46
  * for consistency, the `objectify_selector` decoraror has hence be renamed to
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    47
    `objectify_predicate` ;
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    48
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    49
  * on the CubicWeb side, the `selectors` module has been renamed to
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    50
    `predicates`.
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    51
8364
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    52
  Debugging refactoring dropped the more need for the `lltrace` decorator.  There
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    53
  should be full backward compat with proper deprecation warnings.  Notice the
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    54
  `yes` predicate and `objectify_predicate` decorator, as well as the
8190
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    55
  `traced_selection` function should now be imported from the
2a3c1b787688 [vreg] move base registry implementation to logilab.common. Closes #1916014
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8188
diff changeset
    56
  `logilab.common.registry` module.
8158
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    57
8364
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    58
* All login forms are now submitted to <app_root>/login. Redirection to requested
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    59
  page is now handled by the login controller (it was previously handle by the
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    60
  session manager).
8362
4ac28926cd15 [doc] improve 3.15 release blog
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8190
diff changeset
    61
8364
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    62
* `Publisher.publish` has been renamed to `Publisher.handle_request`. This
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    63
  method now contains generic version of logic previously handled by
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    64
  Twisted. `Controller.publish` is **not** affected.
8158
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    65
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    66
Unintrusive API changes
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    67
-----------------------
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    68
8364
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    69
* New 'ldapfeed' source type, designed to replace 'ldapuser' source with
8188
1867e252e487 [repository] ldap-feed source. Closes #2086984
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8158
diff changeset
    70
  data-feed (i.e. copy based) source ideas.
8158
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    71
8364
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    72
* New 'zmqrql' source type, similar to 'pyrorql' but using ømq instead of Pyro.
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    73
8401
a9efb25337da small doc updates
Florent Cayré <florent.cayre@logilab.fr>
parents: 8368
diff changeset
    74
* A new registry called `services` has appeared, where you can register
8368
062c9c7fe502 [doc] 3.15 services api description
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8364
diff changeset
    75
  server-side `cubicweb.server.Service` child classes. Their `call` method can be
062c9c7fe502 [doc] 3.15 services api description
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8364
diff changeset
    76
  invoked from a web-side AppObject instance using new `self._cw.call_service`
062c9c7fe502 [doc] 3.15 services api description
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8364
diff changeset
    77
  method or a server-side one using `self.session.call_service`. This is a new
062c9c7fe502 [doc] 3.15 services api description
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8364
diff changeset
    78
  way to call server-side methods, much cleaner than monkey patching the
062c9c7fe502 [doc] 3.15 services api description
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8364
diff changeset
    79
  Repository class, which becomes a deprecated way to perform similar tasks.
8158
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    80
8401
a9efb25337da small doc updates
Florent Cayré <florent.cayre@logilab.fr>
parents: 8368
diff changeset
    81
* a new `ajax-func` registry now hosts all remote functions (i.e. functions
8364
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    82
  callable through the `asyncRemoteExec` JS api). A convenience `ajaxfunc`
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    83
  decorator will let you expose your python function easily without all the
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    84
  appobject standard boilerplate. Backward compatibility is preserved.
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    85
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    86
* the 'json' controller is now deprecated in favor of the 'ajax' one.
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    87
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    88
* `WebRequest.build_url` can now take a __secure__ argument. When True cubicweb
b360112424d2 [doc] improved 3.15 blog using developpers'contributions
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8363
diff changeset
    89
  try to generate an https url.
8158
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    90
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    91
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    92
User interface changes
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    93
----------------------
2ee254e74382 [schema] restrictive email address read permission. Closes #2148141
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    94
8362
4ac28926cd15 [doc] improve 3.15 release blog
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8190
diff changeset
    95
A new 'undohistory' view expose the undoable transactions and give access to undo
4ac28926cd15 [doc] improve 3.15 release blog
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8190
diff changeset
    96
some of them.