From 51c10ee9df4ad348d4f76f64cee937b9f08efe17 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sat, 12 Dec 2015 17:44:22 +0100 Subject: [PATCH] Replace simpljson imports with json This has been in standard python since 2.6, and we don't really care about supporting anything older than that (even our old and soon to be upgraded environments use 2.7) --- pgweb/account/views.py | 2 +- pgweb/lists/views.py | 2 +- pgweb/search/views.py | 2 +- requirements.txt | 1 - tools/communityauth/sample/django/auth.py | 4 ++-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pgweb/account/views.py b/pgweb/account/views.py index c9fa49d6..2a4b08c8 100644 --- a/pgweb/account/views.py +++ b/pgweb/account/views.py @@ -15,7 +15,7 @@ import urllib from Crypto.Cipher import AES from Crypto import Random import time -import simplejson as json +import json from pgweb.util.decorators import ssl_required from pgweb.util.contexts import NavContext diff --git a/pgweb/lists/views.py b/pgweb/lists/views.py index 512c0140..91ad57a9 100644 --- a/pgweb/lists/views.py +++ b/pgweb/lists/views.py @@ -3,7 +3,7 @@ from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.conf import settings -import simplejson as json +import json from pgweb.util.contexts import NavContext from pgweb.mailqueue.util import send_simple_mail diff --git a/pgweb/search/views.py b/pgweb/search/views.py index 4b5a143a..fcb9d775 100644 --- a/pgweb/search/views.py +++ b/pgweb/search/views.py @@ -9,7 +9,7 @@ from pgweb.util.decorators import cache import httplib import urllib import psycopg2 -import simplejson as json +import json import socket from lists.models import MailingList diff --git a/requirements.txt b/requirements.txt index db0b8f86..25fab1a5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,3 @@ Django==1.4.5 django-markdown==0.2.1 psycopg2==2.5 pycrypto==2.6 -simplejson==3.3.0 diff --git a/tools/communityauth/sample/django/auth.py b/tools/communityauth/sample/django/auth.py index cde28adf..2c8bc720 100644 --- a/tools/communityauth/sample/django/auth.py +++ b/tools/communityauth/sample/django/auth.py @@ -26,7 +26,7 @@ from django.contrib.auth import logout as django_logout from django.conf import settings import base64 -import simplejson +import json import socket import urlparse import urllib @@ -200,6 +200,6 @@ def user_search(searchterm=None, userid=None): AES.MODE_CBC, base64.b64decode(ivs, "-_")) s = decryptor.decrypt(base64.b64decode(datas, "-_")).rstrip(' ') - j = simplejson.loads(s) + j = json.loads(s) return j -- 2.39.5