mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Schedule removal for 7.0
This commit is contained in:
@@ -24,7 +24,7 @@ The following is a list of deprecated interfaces.
|
||||
|
||||
* - ``sphinx.util.jsdump``
|
||||
- 5.0
|
||||
- 6.0
|
||||
- 7.0
|
||||
- The standard library ``json`` module.
|
||||
|
||||
* - :doc:`Setuptools integration </usage/advanced/setuptools>`
|
||||
|
||||
@@ -12,7 +12,7 @@ from docutils import nodes
|
||||
from docutils.nodes import Element, Node
|
||||
|
||||
from sphinx import addnodes, package_dir
|
||||
from sphinx.deprecation import RemovedInSphinx60Warning
|
||||
from sphinx.deprecation import RemovedInSphinx70Warning
|
||||
from sphinx.environment import BuildEnvironment
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ class IndexBuilder:
|
||||
"""Reconstruct from frozen data."""
|
||||
if format == "jsdump":
|
||||
warnings.warn("format=jsdump is deprecated, use json instead",
|
||||
RemovedInSphinx60Warning, stacklevel=2)
|
||||
RemovedInSphinx70Warning, stacklevel=2)
|
||||
format = self.formats["json"]
|
||||
elif isinstance(format, str):
|
||||
format = self.formats[format]
|
||||
@@ -299,7 +299,7 @@ class IndexBuilder:
|
||||
"""Dump the frozen index to a stream."""
|
||||
if format == "jsdump":
|
||||
warnings.warn("format=jsdump is deprecated, use json instead",
|
||||
RemovedInSphinx60Warning, stacklevel=2)
|
||||
RemovedInSphinx70Warning, stacklevel=2)
|
||||
format = self.formats["json"]
|
||||
elif isinstance(format, str):
|
||||
format = self.formats[format]
|
||||
|
||||
@@ -6,7 +6,7 @@ Uses the basestring encode function from simplejson by Bob Ippolito.
|
||||
import re
|
||||
from typing import IO, Any, Dict, List, Match, Union
|
||||
|
||||
from sphinx.deprecation import RemovedInSphinx60Warning, deprecated_alias
|
||||
from sphinx.deprecation import RemovedInSphinx70Warning, deprecated_alias
|
||||
|
||||
_str_re = re.compile(r'"(\\\\|\\"|[^"])*"')
|
||||
_int_re = re.compile(r'\d+')
|
||||
@@ -204,7 +204,7 @@ deprecated_alias(
|
||||
'loads': loads,
|
||||
'load': load,
|
||||
},
|
||||
RemovedInSphinx60Warning,
|
||||
RemovedInSphinx70Warning,
|
||||
{
|
||||
'dumps': 'json.dumps',
|
||||
'dump': 'json.dump',
|
||||
|
||||
Reference in New Issue
Block a user