diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-10-15 00:33:19 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-10-17 02:05:07 +0900 |
commit | 257394a4592b4b4f317059fec9938877301c2893 (patch) | |
tree | 9dc85b7486b59668ba8a64984c6aa70aadc2f1ed /sphinx/highlighting.py | |
parent | c584b71b128e2ddc0fa1d7f76bbe68217cc64c50 (diff) | |
download | sphinx-git-257394a4592b4b4f317059fec9938877301c2893.tar.gz |
Fix #5471: Show appropriate warning for deprecated APIs
Diffstat (limited to 'sphinx/highlighting.py')
-rw-r--r-- | sphinx/highlighting.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py index 21e3420ba..f52e99019 100644 --- a/sphinx/highlighting.py +++ b/sphinx/highlighting.py @@ -91,7 +91,7 @@ class PygmentsBridge(object): self.trim_doctest_flags = trim_doctest_flags if trim_doctest_flags is not None: warnings.warn('trim_doctest_flags option for PygmentsBridge is now deprecated.', - RemovedInSphinx30Warning) + RemovedInSphinx30Warning, stacklevel=2) def get_formatter(self, **kwargs): # type: (Any) -> Formatter @@ -101,7 +101,7 @@ class PygmentsBridge(object): def unhighlighted(self, source): # type: (unicode) -> unicode warnings.warn('PygmentsBridge.unhighlighted() is now deprecated.', - RemovedInSphinx30Warning) + RemovedInSphinx30Warning, stacklevel=2) if self.dest == 'html': return '<pre>' + htmlescape(source) + '</pre>\n' else: |