[py3] Avoid setting attribute on Element instance in wdoc view
This change is needed to make "wdoc" view work on Python 3. Indeed,
before this patch, we used to set a "parent" attribute on Element
instances, which is not permitted since Python 3.3 as
xml.etree.ElementTree uses the C implementation by default.
To get rid of this "parent" attribute, we rework the XML nodes
processing logic to return and retrieve a node along with its parent in
several place of the code. Namely, build_toc_index() now accepts the
"parent" value for "node" and inserts it in the "index" dict (thus avoid
`node.parent = <value>`). Respectively, every query to the "index" dict
is updated to also retrieve the "parent" (thus avoiding `<value> =
node.parent`). Later in InlineHelpView class, the "index" dict is bound
to "tocindex" attribute so we adjust how it is queried in respective
methods.
Tests cubicweb/web/test/unittest_views_wdoc.py now pass on Python 3.
.. -*- coding: utf-8 -*-
The development team is pleased to announce the 3.0.0 release of CubicWeb, also
know as ShowTime.
What is CubicWeb?
-----------------
With CubicWeb, the Semantic Web is a construction game!
CubicWeb_ is a semantic web application framework, licensed under the LGPL, that
empowers developers to efficiently build web applications by reusing components
(called cubes) and following the well known object-oriented design principles.
Its main features are:
* an engine driven by the explicit data model of the application,
* a query language named RQL similar to W3C’s SPARQL,
* a selection+view mechanism for semi-automatic XHTML/XML/JSON/text generation,
* a library of reusable components (data model and views) that fulfill common needs,
* the power and flexibility of the Python programming language,
* the reliability of SQL databases, LDAP directories, Subversion and Mercurial for storage backends.
Being built since 2000 by an R&D project still going on today, supporting
100,000s of daily visits at some production sites, CubicWeb is a proven end to
end solution for semantic web application development that promotes quality,
reusability and efficiency.
The unbeliever will read the quick overview_ of CubicWeb.
The hacker will join development at the forge_.
The impatient will move right away to installation_ and set-up of a CubicWeb
environment.
.. _cubicweb: https://www.cubicweb.org/
.. _overview: https://docs.cubicweb.org/tutorials/base/index.html
.. _forge: https://www.cubicweb.org/project?vtitle=All%20cubicweb%20projects
.. _installation: https://docs.cubicweb.org/book/admin/setup.html#setupenv
Home page
---------
http://www.cubicweb.org/
Download
--------
http://ftp.logilab.org/pub/cubicweb/
Mailing list
------------
http://lists.cubicweb.org/mailman/listinfo/cubicweb