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.
.. _index_module:
:mod:`cubicweb`
===============
.. automodule:: cubicweb
Exceptions
----------
Base exceptions
~~~~~~~~~~~~~~~
.. autoexception:: ProgrammingError
:show-inheritance:
.. autoexception:: CubicWebException
:show-inheritance:
.. autoexception:: InternalError
:show-inheritance:
.. autoexception:: SecurityError
:show-inheritance:
.. autoexception:: RepositoryError
:show-inheritance:
.. autoexception:: SourceException
:show-inheritance:
.. autoexception:: CubicWebRuntimeError
:show-inheritance:
Repository exceptions
~~~~~~~~~~~~~~~~~~~~~
.. autoexception:: ConnectionError
:show-inheritance:
.. autoexception:: AuthenticationError
:show-inheritance:
.. autoexception:: BadConnectionId
:show-inheritance:
.. autoexception:: UnknownEid
:show-inheritance:
.. autoexception:: UniqueTogetherError
:show-inheritance:
Security Exceptions
~~~~~~~~~~~~~~~~~~~
.. autoexception:: Unauthorized
:show-inheritance:
.. autoexception:: Forbidden
:show-inheritance:
Source exceptions
~~~~~~~~~~~~~~~~~
.. autoexception:: EidNotInSource
:show-inheritance:
Registry exceptions
~~~~~~~~~~~~~~~~~~~
.. autoexception:: UnknownProperty
:show-inheritance:
Query exceptions
~~~~~~~~~~~~~~~~
.. autoexception:: QueryError
:show-inheritance:
.. autoexception:: NotAnEntity
:show-inheritance:
.. autoexception:: MultipleResultsError
:show-inheritance:
.. autoexception:: NoResultError
:show-inheritance:
.. autoexception:: UndoTransactionException
:show-inheritance:
Misc
~~~~
.. autoexception:: ConfigurationError
:show-inheritance:
.. autoexception:: ExecutionError
:show-inheritance:
.. autoexception:: BadCommandUsage
:show-inheritance:
.. autoexception:: ValidationError
:show-inheritance:
Utilities
---------
.. autoclass:: Binary
.. autoclass:: CubicWebEventManager
.. autofunction:: onevent
.. autofunction:: validation_error