[extensions-web] Rely on the stdlib json module being there
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] Rely on the stdlib json module being there
- Date: Tue, 28 May 2013 23:05:08 +0000 (UTC)
commit 988a755c85145690a8a2284599fc9f59c01313a6
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon May 20 17:08:40 2013 -0400
Rely on the stdlib json module being there
sweettooth/extensions/models.py | 5 +----
sweettooth/extensions/tests.py | 2 +-
sweettooth/extensions/views.py | 2 +-
3 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/sweettooth/extensions/models.py b/sweettooth/extensions/models.py
index a697936..d31402a 100644
--- a/sweettooth/extensions/models.py
+++ b/sweettooth/extensions/models.py
@@ -1,8 +1,5 @@
-try:
- import json
-except ImportError:
- import simplejson as json
+import json
from zipfile import ZipFile, BadZipfile
diff --git a/sweettooth/extensions/tests.py b/sweettooth/extensions/tests.py
index bba21ec..531edb7 100644
--- a/sweettooth/extensions/tests.py
+++ b/sweettooth/extensions/tests.py
@@ -1,5 +1,6 @@
import os.path
+import json
import tempfile
import unittest
from uuid import uuid4
@@ -13,7 +14,6 @@ except ImportError:
from django.test import TestCase, TransactionTestCase
from django.core.files.base import File
from django.core.urlresolvers import reverse
-from django.utils import simplejson as json
from extensions import models
from testutils import BasicUserTestCase
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index 69e20e7..b366d89 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -1,4 +1,5 @@
+import json
from math import ceil
from django.core.exceptions import ValidationError
@@ -10,7 +11,6 @@ from django.db import transaction
from django.http import HttpResponseForbidden, HttpResponseServerError, Http404
from django.shortcuts import get_object_or_404, redirect
from django.template.loader import render_to_string
-from django.utils import simplejson as json
from django.views.decorators.http import require_POST
from extensions import models, search
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]