Separate into 4 modules
* init_instance: load the cubicweb repository from the
`pyramid_cubicweb.instance` configuration key
* defaults: provides cw-like defaults for the authentication and session
management
* core: make cubicweb use the authentication and session management of
pyramid.
It assumes the application provides the auth policies and session factory,
and that the `cubicweb.*` registry entries are correctly initialised.
This is this only required module or pyramid_cubicweb, the other
ones are optional if the application provides its own versions of what they
do.
* bwcompat: provides a catchall route that delegate the request handling to
an old-fashion cubicweb publisher (ie using url_resolver and controllers).
Related to #4291173
Next steps
----------
- finish what was started :
- bypass publisher.
- tighten the error handling and get a well-behaved application
- provide sane default policies that match current cubicweb behavior.
- identify what can be done without pushing the 'pyramid way' into cubicweb (as
a first step for future evolutions).
Provide a ctl command
~~~~~~~~~~~~~~~~~~~~~
Add a 'pyramid' command for cubicweb-ctl that starts a cubicweb instance within
a pyramid container.
Transactions
~~~~~~~~~~~~
A common transaction handling mechanism should be used so that the connexion
can be safely used in both pyramid and cubicweb.
Reimplement the base controllers of cw
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- rest
- static
- data
Bypass cw.handle_request in most case
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Use it only when no other mean works, which should provide backward compat of
old cubes for a while.