|
10 | 10 |
|
11 | 11 | import html |
12 | 12 | import os |
13 | | -import warnings |
14 | 13 | from os import path |
15 | | -from typing import Any, Dict, IO, List, Set, Tuple, Type |
| 14 | +from typing import Any, Dict, List, Set, Tuple, Type |
16 | 15 |
|
17 | 16 | from docutils import nodes |
18 | 17 | from docutils.nodes import Element, Node, document |
|
21 | 20 | from sphinx.application import Sphinx |
22 | 21 | from sphinx.builders.html import StandaloneHTMLBuilder |
23 | 22 | from sphinx.config import Config |
24 | | -from sphinx.deprecation import RemovedInSphinx40Warning |
25 | 23 | from sphinx.environment.adapters.indexentries import IndexEntries |
26 | 24 | from sphinx.locale import get_translation |
27 | 25 | from sphinx.util import logging |
@@ -179,13 +177,6 @@ def prepare_writing(self, docnames: Set[str]) -> None: |
179 | 177 | super().prepare_writing(docnames) |
180 | 178 | self.globalcontext['html5_doctype'] = False |
181 | 179 |
|
182 | | - def open_file(self, outdir: str, basename: str, mode: str = 'w') -> IO: |
183 | | - # open a file with the correct encoding for the selected language |
184 | | - warnings.warn('HTMLHelpBuilder.open_file() is deprecated.', |
185 | | - RemovedInSphinx40Warning) |
186 | | - return open(path.join(outdir, basename), mode, encoding=self.encoding, |
187 | | - errors='xmlcharrefreplace') |
188 | | - |
189 | 180 | def update_page_context(self, pagename: str, templatename: str, ctx: Dict, event_arg: str) -> None: # NOQA |
190 | 181 | ctx['encoding'] = self.encoding |
191 | 182 |
|
|
0 commit comments