summaryrefslogtreecommitdiff
path: root/sphinx/util/jsonimpl.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-02-17 21:55:28 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-02-17 22:31:50 +0900
commit1ca210aab1b6218916960d2cde44d7efceff2548 (patch)
tree23970a2995898f21907d50133b414d205119253d /sphinx/util/jsonimpl.py
parent527e95540538f5896a0236647d13a6e281144c4b (diff)
downloadsphinx-git-1ca210aab1b6218916960d2cde44d7efceff2548.tar.gz
Separate json and pickle to sphinxcontrib package
Diffstat (limited to 'sphinx/util/jsonimpl.py')
-rw-r--r--sphinx/util/jsonimpl.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/sphinx/util/jsonimpl.py b/sphinx/util/jsonimpl.py
index ecb0b791a..4fb8e1f5d 100644
--- a/sphinx/util/jsonimpl.py
+++ b/sphinx/util/jsonimpl.py
@@ -9,13 +9,20 @@
"""
import json
+import warnings
from collections import UserString
+from sphinx.deprecation import RemovedInSphinx40Warning
+
if False:
# For type annotation
from typing import Any, IO # NOQA
+warnings.warn('sphinx.util.jsonimpl is deprecated',
+ RemovedInSphinx40Warning, stacklevel=2)
+
+
class SphinxJSONEncoder(json.JSONEncoder):
"""JSONEncoder subclass that forces translation proxies."""
def default(self, obj):