Attempt to be more performant on PyPy (#3462)

This commit is contained in:
Amber Brown 2018-06-28 14:49:57 +01:00 committed by GitHub
parent 72d2143ea8
commit 6350bf925e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 79 additions and 62 deletions

View file

@ -14,10 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import simplejson as json
import logging
from canonicaljson import encode_canonical_json
from canonicaljson import encode_canonical_json, json
from twisted.internet import defer
from six import iteritems
@ -357,7 +356,7 @@ def _exception_to_failure(e):
# include ConnectionRefused and other errors
#
# Note that some Exceptions (notably twisted's ResponseFailed etc) don't
# give a string for e.message, which simplejson then fails to serialize.
# give a string for e.message, which json then fails to serialize.
return {
"status": 503, "message": str(e.message),
}