diff options
author | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2022-05-01 05:49:59 +0100 |
---|---|---|
committer | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2022-05-01 05:50:33 +0100 |
commit | 31f87e78ac2206db4abc013b787bb6fd6771efbf (patch) | |
tree | 9d7b48a7520e17876026d7dba02992f9fe05b0f3 /sphinx/util | |
parent | 01e99f32b4df7dce838e6943ea682690ec4bf898 (diff) | |
download | sphinx-git-31f87e78ac2206db4abc013b787bb6fd6771efbf.tar.gz |
Review comments
Diffstat (limited to 'sphinx/util')
-rw-r--r-- | sphinx/util/jsdump.py | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/sphinx/util/jsdump.py b/sphinx/util/jsdump.py index 77acef9d2..484f35b7e 100644 --- a/sphinx/util/jsdump.py +++ b/sphinx/util/jsdump.py @@ -4,9 +4,13 @@ Uses the basestring encode function from simplejson by Bob Ippolito. """ import re +import warnings from typing import IO, Any, Dict, List, Match, Union -from sphinx.deprecation import RemovedInSphinx70Warning, deprecated_alias +from sphinx.deprecation import RemovedInSphinx70Warning + +warnings.warn('"sphinx.util.jsdump" has been deprecated. Please use "json" instead.', + RemovedInSphinx70Warning) _str_re = re.compile(r'"(\\\\|\\"|[^"])*"') _int_re = re.compile(r'\d+') @@ -194,21 +198,3 @@ def loads(x: str) -> Any: def load(f: IO) -> Any: return loads(f.read()) - - -deprecated_alias( - 'sphinx.util.jsdump', - { - 'dumps': dumps, - 'dump': dump, - 'loads': loads, - 'load': load, - }, - RemovedInSphinx70Warning, - { - 'dumps': 'json.dumps', - 'dump': 'json.dump', - 'loads': 'json.loads', - 'load': 'json.load', - } -) |