Skip to content

Commit bcda176

Browse files
authored
Merge pull request #14 from tk0miya/remove_HTMLHelpBuilder.open_file
Remove HTMLHelpBuilder.open_file()
2 parents ee92c73 + 434c9a0 commit bcda176

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

CHANGES

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
Release 1.0.3 (unreleased)
1+
Release 2.0.0 (unreleased)
22
==========================
33

4+
* Remove deprecated method: ``HTMLHelpBuilder.open_file()``
45
* #6685: htmlhelp builder should generate HTML4 docs instead of HTML5
56

67
Release 1.0.2 (2019-04-12)

sphinxcontrib/htmlhelp/__init__.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010

1111
import html
1212
import os
13-
import warnings
1413
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
1615

1716
from docutils import nodes
1817
from docutils.nodes import Element, Node, document
@@ -21,7 +20,6 @@
2120
from sphinx.application import Sphinx
2221
from sphinx.builders.html import StandaloneHTMLBuilder
2322
from sphinx.config import Config
24-
from sphinx.deprecation import RemovedInSphinx40Warning
2523
from sphinx.environment.adapters.indexentries import IndexEntries
2624
from sphinx.locale import get_translation
2725
from sphinx.util import logging
@@ -179,13 +177,6 @@ def prepare_writing(self, docnames: Set[str]) -> None:
179177
super().prepare_writing(docnames)
180178
self.globalcontext['html5_doctype'] = False
181179

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-
189180
def update_page_context(self, pagename: str, templatename: str, ctx: Dict, event_arg: str) -> None: # NOQA
190181
ctx['encoding'] = self.encoding
191182

0 commit comments

Comments
 (0)