mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Require Pygments 2.14 or later (#11576)
This commit is contained in:
parent
8cabf08668
commit
976dd07ffe
1
CHANGES
1
CHANGES
@ -5,6 +5,7 @@ Dependencies
|
||||
------------
|
||||
|
||||
* #11511: Drop Python 3.8 support.
|
||||
* #11576: Require Pygments 2.14 or later.
|
||||
|
||||
Incompatible changes
|
||||
--------------------
|
||||
|
@ -61,7 +61,7 @@ dependencies = [
|
||||
"sphinxcontrib-serializinghtml>=1.1.5",
|
||||
"sphinxcontrib-qthelp",
|
||||
"Jinja2>=3.0",
|
||||
"Pygments>=2.13",
|
||||
"Pygments>=2.14",
|
||||
"docutils>=0.18.1,<0.21",
|
||||
"snowballstemmer>=2.0",
|
||||
"babel>=2.9",
|
||||
|
@ -3,7 +3,6 @@
|
||||
import re
|
||||
import shutil
|
||||
|
||||
import pygments
|
||||
import pytest
|
||||
|
||||
|
||||
@ -34,10 +33,7 @@ def check_viewcode_output(app, warning):
|
||||
'<a class="viewcode-back" href="../../index.html#spam.Class1">[docs]</a>\n') in result
|
||||
assert '<span>@decorator</span>\n' in result
|
||||
assert '<span>class</span> <span>Class1</span><span>:</span>\n' in result
|
||||
if pygments.__version__ >= '2.14.0':
|
||||
assert '<span> </span><span>"""</span>\n' in result
|
||||
else:
|
||||
assert ' <span>"""</span>\n' in result
|
||||
assert '<span> </span><span>"""</span>\n' in result
|
||||
assert '<span> this is Class1</span>\n' in result
|
||||
assert '<span> """</span>\n' in result
|
||||
|
||||
|
@ -10,7 +10,6 @@ import shutil
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
import pygments
|
||||
import pytest
|
||||
from babel.messages import mofile, pofile
|
||||
from babel.messages.catalog import Catalog
|
||||
@ -1170,8 +1169,6 @@ def test_additional_targets_should_not_be_translated(app):
|
||||
"""<span class="k">in</span>"""
|
||||
"""<span class="w"> </span>"""
|
||||
"""<span class="n">list</span>""")
|
||||
if pygments.__version__ < '2.14.0':
|
||||
expected_expr = expected_expr.replace("""<span class="w"> </span>""", ' ')
|
||||
assert_count(expected_expr, result, 1)
|
||||
|
||||
# doctest block should not be translated but be highlighted
|
||||
@ -1248,8 +1245,6 @@ def test_additional_targets_should_be_translated(app):
|
||||
"""<span class="no">IN</span>"""
|
||||
"""<span class="w"> </span>"""
|
||||
"""<span class="no">LIST</span>""")
|
||||
if pygments.__version__ < '2.14.0':
|
||||
expected_expr = expected_expr.replace("""<span class="w"> </span>""", ' ')
|
||||
assert_count(expected_expr, result, 1)
|
||||
|
||||
# doctest block should not be translated but be highlighted
|
||||
|
Loading…
Reference in New Issue
Block a user