[PATCH 3 of 6 rqlcontroller] Import "json" module directly instead of from cubicweb.utils

Denis Laxalde denis.laxalde at logilab.fr
Mon Jun 4 14:28:42 CEST 2018


# HG changeset patch
# User Denis Laxalde <denis.laxalde at logilab.fr>
# Date 1528113026 -7200
#      Mon Jun 04 13:50:26 2018 +0200
# Node ID 35e5a74d2bcc289b9444388601e53d7f00c6d1d7
# Parent  82aa0cabea38e196cd410aa22c68d603d0a7c3a3
# Available At http://hg.logilab.org/review/cubes/rqlcontroller
#              hg pull http://hg.logilab.org/review/cubes/rqlcontroller -r 35e5a74d2bcc
# EXP-Topic py3
Import "json" module directly instead of from cubicweb.utils

The "json" name in cubicweb.utils is just the "json" module from stdlib.
Make this explicit.

diff --git a/views.py b/views.py
--- a/views.py
+++ b/views.py
@@ -17,6 +17,7 @@
 
 """cubicweb-rqlcontroller views/forms/actions/components for web ui"""
 
+import json
 import re
 
 from six import string_types
@@ -27,7 +28,7 @@ from cubicweb.predicates import (
     match_http_method,
 )
 from cubicweb.uilib import exc_message
-from cubicweb.utils import json, json_dumps
+from cubicweb.utils import json_dumps
 from cubicweb.web import RemoteCallFailed, DirectResponse
 from cubicweb.web.controller import Controller
 from cubicweb.web.views.urlrewrite import rgx_action, SchemaBasedRewriter


More information about the cubicweb-devel mailing list