Skip to content

Commit

Permalink
Deprecate sphinx.writers.latex.LaTeXTranslator.no_contractions
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbu committed Dec 14, 2019
1 parent 31bef4a commit 1742f5c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions doc/extdev/deprecated.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ The following is a list of deprecated interfaces.
- 4.0
- ``sphinx.util.texescape.hlescape()``

* - ``sphinx.writers.latex.LaTeXTranslator.no_contractions``
- 2.3
- 4.0
- N/A

* - ``sphinx.domains.math.MathDomain.add_equation()``
- 2.2
- 4.0
Expand Down
7 changes: 6 additions & 1 deletion sphinx/writers/latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@ def __init__(self, document: nodes.document, builder: "LaTeXBuilder") -> None:
self.first_document = 1
self.this_is_the_title = 1
self.literal_whitespace = 0
self.no_contractions = 0 # not used
self.in_parsed_literal = 0
self.compact_list = 0
self.first_param = 0
Expand Down Expand Up @@ -2275,6 +2274,12 @@ def footnotes_under(n: Element) -> Iterator[nodes.footnote]:
fnotes[num] = [newnode, False]
return fnotes

@property
def no_contractions(self) -> int:
warnings.warn('LaTeXTranslator.no_contractions is deprecated.',
RemovedInSphinx40Warning, stacklevel=2)
return 0

@property
def footnotestack(self) -> List[Dict[str, List[Union[collected_footnote, bool]]]]:
warnings.warn('LaTeXWriter.footnotestack is deprecated.',
Expand Down

0 comments on commit 1742f5c

Please sign in to comment.