Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove jsdump #11365

Merged
merged 3 commits into from Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.