[Cubicweb] CubicWeb 3.6 is (almost) out!

Sylvain Thénault sylvain.thenault at logilab.fr
Wed Feb 10 16:57:52 CET 2010

Hi list!

here is the content of the blog I've just posted:

And that's a great news, after several months of development (things starts moved
on the begin of august 2009...), it should be available on our debian repositories
and ftp site in the next few hours.

So, we can say this release contains a (too) wide set of improvments and
refactorings.  I'll take about the most important ones here.

Appobject/Entity classes namespace cleanup

First of all, the namespace cleanup... 3.6 is a step toward cleaning the entity
classes (hence more generally appobject), which are used for a hell lot of
things, making impossible to tell for sure what could be used or not as an
attribute or relation name. We decided to reserve names everything that begin
with a '_cw' or 'cw_'. A lot of methods have been deprecated to cleanup the
base appobject class name space. The remaining methods on entity classes will
be removed in future version, by the introduction of an orm for database related
methods, and by the (most probable) introduction of `ZCA`_ adapters for other aspects.
The most notable renaming are:

* .req -> ._cw
* .rset -> .cw_rset
* .row -> .cw_row
* .col -> .cw_col

This is probably what you'll see first when upgrading to 3.6: a hell lot
of deprecation  warnings on your screen :)

Another step toward a nice and powerful form system

* more cleaner reponsabilities between form, field and widget

* fields and widgets are now responsible to handle posted values (the
  editcontroller was handling this, making things really unflexible). The
  editcontroller has been rewritten and now properly get values from
  fields. Another benefit is that you can now easily have a widget handling
  multiple inputs (see the new datetime picker for instance, or the custom widget
  for Bookmark.path)

* refactored automatic forms:

  * rewrite 'generic relations' as a field

  * inlined forms are now encapsulated into a field

  so you get much more control on these parts of automatic forms by using
  mecanism provided generally by fields

  * more clear form relations tags: removed autoform_is_inlined, more
    understandable autoform_field_section

Hooks refactoring

Hooks are now regular appobjects, with selectors (don't forget to reuse
Hook.__select__, remember that !). They should simply implements __call__
with no argument (well, only 'self') and will get info previously given as
argument as instance attributes, according to the matching event.

Test api cleanup

EnvBasedTC, ControllerTC, WebTest, RepoBasedTC are all gone. Simply use
CubicWebTC, with an unified api similar to what you use in cubicweb-ctl
shell and in usual development.

The Bytes File System Storage

You can now specify a custom storage for attributes of entities stored in the
system source. This mecanism is used to provide a way to store Bytes attributes
(such as File.data for instance) as file on the file-system instead of blob in
the database. You can configure which attributes should use this storage for your
instance and then everything is transparent.

Schema definition changes (yams 0.27)

In your schema definition file:

* symetric should be correctly spelled symmetric :)

* permissions renamed to __permissions__

Also, permissions for relation are now supported per definition, not per type. At the
cost of a visible impacts when writing/reading the schema.

Note about backward compatibility
We worked hard to keep backward compat, but you should'nt upgrade to 3.6 without
checking everything is fine... Check notably:

* forms, if you're using custom forms by overriding internal methods

* import for date functions from cubicweb.utils (they moved to logilab.common.date)

And also
CubicWeb 3.6 comes with a set of 37 cubes "3.6" ready to avoid too much warnings!


.. _`ZCA`: http://wiki.zope.org/zope3/ComponentArchitecture
Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org

More information about the Cubicweb mailing list