Skip to content

Commit

Permalink
Remove support for the jsdump format in sphinx.search (#11365)
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Apr 27, 2023
1 parent 973e8fb commit ce5ce1a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 213 deletions.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -14,6 +14,7 @@ Incompatible changes
* #11363: Remove the Setuptools integration (``build_sphinx`` hook in
``setup.py``).
* #11364: Remove deprecated ``sphinx.ext.napoleon.iterators`` module.
* #11365: Remove support for the ``jsdump`` format in ``sphinx.search``.

Deprecated
----------
Expand Down
14 changes: 2 additions & 12 deletions sphinx/search/__init__.py
Expand Up @@ -7,7 +7,6 @@
import json
import pickle
import re
import warnings
from importlib import import_module
from os import path
from typing import (
Expand All @@ -31,7 +30,6 @@
from docutils.nodes import Element, Node

from sphinx import addnodes, package_dir
from sphinx.deprecation import RemovedInSphinx70Warning
from sphinx.environment import BuildEnvironment
from sphinx.util import split_into

Expand Down Expand Up @@ -308,11 +306,7 @@ def __init__(self, env: BuildEnvironment, lang: str, options: dict, scoring: str

def load(self, stream: IO, format: Any) -> None:
"""Reconstruct from frozen data."""
if format == "jsdump":
warnings.warn("format=jsdump is deprecated, use json instead",
RemovedInSphinx70Warning, stacklevel=2)
format = self.formats["json"]
elif isinstance(format, str):
if isinstance(format, str):
format = self.formats[format]
frozen = format.load(stream)
# if an old index is present, we treat it as not existing.
Expand Down Expand Up @@ -345,11 +339,7 @@ def load_terms(mapping: dict[str, Any]) -> dict[str, set[str]]:

def dump(self, stream: IO, format: Any) -> None:
"""Dump the frozen index to a stream."""
if format == "jsdump":
warnings.warn("format=jsdump is deprecated, use json instead",
RemovedInSphinx70Warning, stacklevel=2)
format = self.formats["json"]
elif isinstance(format, str):
if isinstance(format, str):
format = self.formats[format]
format.dump(self.freeze(), stream)

Expand Down
201 changes: 0 additions & 201 deletions sphinx/util/jsdump.py

This file was deleted.

0 comments on commit ce5ce1a

Please sign in to comment.