Drop support for simplejson
authorDiane Trout <diane@ghic.org>
Mon, 6 Apr 2015 22:07:44 +0000 (15:07 -0700)
committerDiane Trout <diane@ghic.org>
Mon, 6 Apr 2015 22:07:44 +0000 (15:07 -0700)
We're only targeting python2.7+ & python3.3+ so I can drop
that archaic code.

(Also gets me some more test coverage)

experiments/test_experiments.py
htsworkflow/pipelines/retrieve_config.py
htsworkflow/pipelines/test/test_retrieve_config.py
htsworkflow/util/api.py
inventory/views.py
samples/views.py

index 03ad813b7b4cf907138b5dfbc52bb08a74030df2..7d321c05b603e00456d936ce63abd27ceb72b944 100644 (file)
@@ -2,10 +2,7 @@ from __future__ import absolute_import, print_function, unicode_literals
 
 import re
 from lxml.html import fromstring
-try:
-    import json
-except ImportError as e:
-    import simplejson as json
+import json
 import os
 import shutil
 import sys
index 7c64050c0f3d2b5d04e80f9d6391b11e9266a51d..a2153d055230d9b35e94cf8f39e9aecc3b73a339 100644 (file)
@@ -10,10 +10,7 @@ import types
 import six
 from six.moves import urllib
 
-try:
-    import json
-except ImportError as e:
-    import simplejson as json
+import json
 
 from htsworkflow.auth import apidata
 from htsworkflow.util import api
index 4ec9d3e755a9ac99cbde2330237f69c70e76fd87..3014674d5fc8546b3e30c3abdecdaf015974f316 100644 (file)
@@ -3,10 +3,7 @@ import os
 import re
 from six.moves import StringIO
 
-try:
-    import json
-except ImportError as e:
-    import simplejson as json
+import json
 
 from django.test import TestCase
 from django.utils.encoding import smart_text
index e631fa9c5051aeabe2fd39e67bcb7822dd9113b2..1b500b6c05a907b38a00bb2e82860a576fed8838 100644 (file)
@@ -8,11 +8,7 @@ from six import int2byte
 import random
 import logging
 
-# try to deal with python <2.6
-try:
-  import json
-except ImportError:
-  import simplejson as json
+import json
 
 import os
 from optparse import OptionGroup
index 63f91a04634ad326329c26dc6e3b8e08469c7cb2..d9dda8dd34fcda457c74b17c57f5eec0826c07e5 100644 (file)
@@ -19,10 +19,7 @@ from bcmagic.utils import print_zpl_socket
 
 register_search_plugin('Inventory Item', item_search)
 
-try:
-    import json
-except ImportError as e:
-    import simplejson as json
+import json
 
 INVENTORY_CONTEXT_DEFAULTS = {
     'app_name': 'Inventory Tracker',
index cc94c620474ce1e8267b0e969921157141e63a3a..e7d2e92bf3fb894e7d99f685ece514aee7cffc4f 100644 (file)
@@ -5,10 +5,7 @@ import logging
 import os
 import sys
 
-try:
-    import json
-except ImportError as e:
-    import simplejson as json
+import json
 
 from django.views.decorators.csrf import csrf_exempt
 from django.core.exceptions import ObjectDoesNotExist