[connection] replace .running_dbapi_query with .hooks_in_progress
The thing was badly named.
It tries to help distinguish between queries issued
directly by the programmer (e.g in the views: cnx.execute(...))
from queries issued from the hooks, operations ... or even
the repository or the native source objects.
It worked heuristically being associated with
the security being disabled.
We provide a better name and an implementation distinct from
the security management methods.
Related to #3933480.
from__future__importabsolute_importimportmarkdownimportlogginglog=logging.getLogger(__name__)defmarkdown_publish(context,data):"""publish a string formatted as MarkDown Text to HTML :type context: a cubicweb application object :type data: str :param data: some MarkDown text :rtype: unicode :return: the data formatted as HTML or the original data if an error occurred """md=markdown.Markdown()try:returnmd.convert(data)except:importtraceback;traceback.print_exc()log.exception("Error while converting Markdown to HTML")returndata