Fix AttributeError for "lang" on repo/client connections
This is a regression introduced by b48020a80dc3, which removed call to
set_language from the `req._set_user` method. This is fine, but we still want a
language on connections, so we've to handle it if necesary in
Connection.__enter__ (i.e. once connection is properly open).
When using pyramid front-end, which has a users cache, we've to cache its
language as well because we must not access its preferred_language method since
it's not bound to a proper connection.
.. _cwvreg_module:
:mod:`cubicweb.cwvreg`
======================
.. automodule:: cubicweb.cwvreg
.. autoclass:: CWRegistryStore
:show-inheritance:
:members:
:undoc-members:
.. autoclass:: CWRegistry
:show-inheritance:
:members: schema, poss_visible_objects, select
.. autoclass:: InstancesRegistry
:show-inheritance:
:members:
.. autoclass:: ETypeRegistry
:show-inheritance:
:members:
.. autoclass:: ViewsRegistry
:show-inheritance:
:members:
.. autoclass:: ActionsRegistry
:show-inheritance:
:members:
.. autoclass:: CtxComponentsRegistry
:show-inheritance:
:members:
.. autoclass:: BwCompatCWRegistry
:show-inheritance:
:members:
:mod:`logilab.common.registry`
==============================
.. automodule:: logilab.common.registry