diff options
Diffstat (limited to 'sphinx/util/jsonimpl.py')
-rw-r--r-- | sphinx/util/jsonimpl.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sphinx/util/jsonimpl.py b/sphinx/util/jsonimpl.py index eb4117f90..ecb0b791a 100644 --- a/sphinx/util/jsonimpl.py +++ b/sphinx/util/jsonimpl.py @@ -4,15 +4,13 @@ JSON serializer implementation wrapper. - :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import json from collections import UserString -from six import text_type - if False: # For type annotation from typing import Any, IO # NOQA @@ -23,7 +21,7 @@ class SphinxJSONEncoder(json.JSONEncoder): def default(self, obj): # type: (Any) -> str if isinstance(obj, UserString): - return text_type(obj) + return str(obj) return super().default(obj) |