mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-08-11 05:24:49 -05:00
Increase minimum Docutils to 0.18
This commit is contained in:
@@ -14,11 +14,11 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- python: "3.8"
|
||||
docutils: du17
|
||||
docutils: du18
|
||||
- python: "3.9"
|
||||
docutils: du18
|
||||
docutils: du19
|
||||
- python: "3.10"
|
||||
docutils: du18
|
||||
docutils: du19
|
||||
- python: "3.10"
|
||||
docutils: du19
|
||||
- python: "3.11-dev"
|
||||
|
||||
@@ -5,8 +5,8 @@ Dependencies
|
||||
------------
|
||||
|
||||
* #10468: Drop Python 3.6 support
|
||||
* #10470: Drop Python 3.7, Docutils 0.14, Docutils 0.15, and Docutils 0.16
|
||||
support. Patch by Adam Turner
|
||||
* #10470: Drop Python 3.7, Docutils 0.14, Docutils 0.15, Docutils 0.16, and
|
||||
Docutils 0.17 support. Patch by Adam Turner
|
||||
|
||||
Incompatible changes
|
||||
--------------------
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ dependencies = [
|
||||
"sphinxcontrib-qthelp",
|
||||
"Jinja2>=3.0",
|
||||
"Pygments>=2.12",
|
||||
"docutils>=0.17,<0.20",
|
||||
"docutils>=0.18,<0.20",
|
||||
"snowballstemmer>=2.0",
|
||||
"babel>=2.9",
|
||||
"alabaster>=0.7,<0.8",
|
||||
|
||||
+12
-17
@@ -2,19 +2,24 @@
|
||||
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence
|
||||
|
||||
import docutils
|
||||
from docutils import nodes
|
||||
from docutils.nodes import Element
|
||||
|
||||
from sphinx.deprecation import RemovedInSphinx70Warning, deprecated_alias
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from sphinx.application import Sphinx
|
||||
|
||||
try:
|
||||
from docutils.nodes import meta as docutils_meta # type: ignore
|
||||
except ImportError:
|
||||
# docutils-0.17
|
||||
from docutils.parsers.rst.directives.html import MetaBody
|
||||
docutils_meta = MetaBody.meta
|
||||
deprecated_alias('sphinx.addnodes',
|
||||
{
|
||||
'meta': nodes.meta, # type: ignore
|
||||
'docutils_meta': nodes.meta, # type: ignore
|
||||
},
|
||||
RemovedInSphinx70Warning,
|
||||
{
|
||||
'meta': 'docutils.nodes.meta',
|
||||
'docutils_meta': 'docutils.nodes.meta',
|
||||
})
|
||||
|
||||
|
||||
class document(nodes.document):
|
||||
@@ -424,13 +429,6 @@ class tabular_col_spec(nodes.Element):
|
||||
"""Node for specifying tabular columns, used for LaTeX output."""
|
||||
|
||||
|
||||
class meta(nodes.Special, nodes.PreBibliographic, nodes.Element):
|
||||
"""Node for meta directive -- same as docutils' standard meta node,
|
||||
but pickleable.
|
||||
"""
|
||||
rawcontent = None
|
||||
|
||||
|
||||
# inline nodes
|
||||
|
||||
class pending_xref(nodes.Inline, nodes.Element):
|
||||
@@ -557,9 +555,6 @@ def setup(app: "Sphinx") -> Dict[str, Any]:
|
||||
app.add_node(literal_strong)
|
||||
app.add_node(manpage)
|
||||
|
||||
if docutils.__version_info__ < (0, 18):
|
||||
app.add_node(meta)
|
||||
|
||||
return {
|
||||
'version': 'builtin',
|
||||
'parallel_read_safe': True,
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import os
|
||||
from os import path
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Sequence, cast
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, cast
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.nodes import Node, make_id
|
||||
from docutils.parsers.rst import directives
|
||||
from docutils.parsers.rst.directives import images, tables
|
||||
from docutils.parsers.rst.directives.misc import Meta # type: ignore[attr-defined]
|
||||
from docutils.parsers.rst.roles import set_classes
|
||||
|
||||
from sphinx import addnodes
|
||||
from sphinx.directives import optional_int
|
||||
from sphinx.domains.math import MathDomain
|
||||
from sphinx.locale import __
|
||||
@@ -18,30 +18,6 @@ from sphinx.util.nodes import set_source_info
|
||||
from sphinx.util.osutil import SEP, os_path, relpath
|
||||
from sphinx.util.typing import OptionSpec
|
||||
|
||||
try:
|
||||
from docutils.parsers.rst.directives.misc import Meta as Meta # type: ignore
|
||||
except ImportError:
|
||||
# docutils-0.17
|
||||
from docutils.parsers.rst.directives.html import Meta as MetaBase
|
||||
|
||||
class Meta(MetaBase, SphinxDirective): # type: ignore
|
||||
def run(self) -> Sequence[Node]: # type: ignore
|
||||
result = super().run()
|
||||
for node in result:
|
||||
# for docutils-0.17. Since docutils-0.18, patching is no longer needed
|
||||
# because it uses picklable node; ``docutils.nodes.meta``.
|
||||
if (isinstance(node, nodes.pending) and
|
||||
isinstance(node.details['nodes'][0], addnodes.docutils_meta)):
|
||||
meta = node.details['nodes'][0]
|
||||
meta.source = self.env.doc2path(self.env.docname)
|
||||
meta.line = self.lineno
|
||||
meta.rawcontent = meta['content']
|
||||
|
||||
# docutils' meta nodes aren't picklable because the class is nested
|
||||
meta.__class__ = addnodes.meta
|
||||
|
||||
return result
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from sphinx.application import Sphinx
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ from os import path
|
||||
from typing import (TYPE_CHECKING, Any, Callable, Dict, Generator, Iterator, List, Optional,
|
||||
Set, Tuple, Union)
|
||||
|
||||
import docutils
|
||||
from docutils import nodes
|
||||
from docutils.nodes import Node
|
||||
|
||||
@@ -52,8 +51,6 @@ default_settings: Dict[str, Any] = {
|
||||
'file_insertion_enabled': True,
|
||||
'smartquotes_locales': [],
|
||||
}
|
||||
if docutils.__version_info__[:2] <= (0, 17):
|
||||
default_settings['embed_images'] = False
|
||||
|
||||
# This is increased every time an environment attribute is added
|
||||
# or changed to properly invalidate pickle files.
|
||||
|
||||
@@ -189,8 +189,8 @@ class WordCollector(nodes.NodeVisitor):
|
||||
self.lang = lang
|
||||
|
||||
def is_meta_keywords(self, node: Element) -> bool:
|
||||
if (isinstance(node, (addnodes.meta, addnodes.docutils_meta)) and
|
||||
node.get('name') == 'keywords'):
|
||||
if (isinstance(node, nodes.meta) # type: ignore
|
||||
and node.get('name') == 'keywords'):
|
||||
meta_lang = node.get('lang')
|
||||
if meta_lang is None: # lang not specified
|
||||
return True
|
||||
|
||||
@@ -237,18 +237,6 @@ a.headerlink {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
{%- if docutils_version_info[:2] < (0, 18) %}
|
||||
a.brackets:before,
|
||||
span.brackets > a:before{
|
||||
content: "[";
|
||||
}
|
||||
|
||||
a.brackets:after,
|
||||
span.brackets > a:after {
|
||||
content: "]";
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
h1:hover > a.headerlink,
|
||||
h2:hover > a.headerlink,
|
||||
h3:hover > a.headerlink,
|
||||
@@ -337,20 +325,16 @@ p.sidebar-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
{%- if docutils_version_info[:2] >= (0, 18) %}
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
{%- endif %}
|
||||
div.admonition, div.topic, blockquote {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* -- topics ---------------------------------------------------------------- */
|
||||
|
||||
{%- if docutils_version_info[:2] >= (0, 18) %}
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
{%- endif %}
|
||||
div.topic {
|
||||
border: 1px solid #ccc;
|
||||
padding: 7px;
|
||||
@@ -389,10 +373,8 @@ div.body p.centered {
|
||||
|
||||
div.sidebar > :last-child,
|
||||
aside.sidebar > :last-child,
|
||||
{%- if docutils_version_info[:2] >= (0, 18) %}
|
||||
nav.contents > :last-child,
|
||||
aside.topic > :last-child,
|
||||
{%- endif %}
|
||||
div.topic > :last-child,
|
||||
div.admonition > :last-child {
|
||||
margin-bottom: 0;
|
||||
@@ -400,10 +382,8 @@ div.admonition > :last-child {
|
||||
|
||||
div.sidebar::after,
|
||||
aside.sidebar::after,
|
||||
{%- if docutils_version_info[:2] >= (0, 18) %}
|
||||
nav.contents::after,
|
||||
aside.topic::after,
|
||||
{%- endif %}
|
||||
div.topic::after,
|
||||
div.admonition::after,
|
||||
blockquote::after {
|
||||
@@ -629,24 +609,6 @@ ul.simple p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
{%- if docutils_version_info[:2] < (0, 18) %}
|
||||
dl.footnote > dt,
|
||||
dl.citation > dt {
|
||||
float: left;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
dl.footnote > dd,
|
||||
dl.citation > dd {
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
dl.footnote > dd:after,
|
||||
dl.citation > dd:after {
|
||||
content: "";
|
||||
clear: both;
|
||||
}
|
||||
{%- elif docutils_version_info[:2] >= (0, 18) %}
|
||||
aside.footnote > span,
|
||||
div.citation > span {
|
||||
float: left;
|
||||
@@ -670,7 +632,6 @@ div.citation > p:last-of-type:after {
|
||||
content: "";
|
||||
clear: both;
|
||||
}
|
||||
{%- endif %}
|
||||
|
||||
dl.field-list {
|
||||
display: grid;
|
||||
@@ -684,12 +645,6 @@ dl.field-list > dt {
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
{%- if docutils_version_info[:2] < (0, 18) %}
|
||||
dl.field-list > dt:after {
|
||||
content: ":";
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
dl.field-list > dd {
|
||||
padding-left: 0.5em;
|
||||
margin-top: 0em;
|
||||
|
||||
@@ -306,10 +306,8 @@ div.quotebar {
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
{%- if docutils_version_info[:2] >= (0, 18) %}
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
{% endif %}
|
||||
div.topic {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
@@ -290,10 +290,8 @@ div.seealso {
|
||||
border: 1px solid #ff6;
|
||||
}
|
||||
|
||||
{%- if docutils_version_info[:2] >= (0, 18) %}
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
{% endif %}
|
||||
div.topic {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
@@ -245,10 +245,8 @@ p.sidebar-title {
|
||||
|
||||
/* -- topics ---------------------------------------------------------------- */
|
||||
|
||||
{%- if docutils_version_info[:2] >= (0, 18) %}
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
{% endif %}
|
||||
div.topic {
|
||||
border: 1px solid #ccc;
|
||||
padding: 7px 7px 0 7px;
|
||||
|
||||
@@ -194,10 +194,8 @@ div.seealso {
|
||||
border: 1px solid #ff6;
|
||||
}
|
||||
|
||||
{%- if docutils_version_info[:2] >= (0, 18) %}
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
{% endif %}
|
||||
div.topic {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
@@ -234,10 +234,8 @@ p.sidebar-title {
|
||||
|
||||
/* -- topics ---------------------------------------------------------------- */
|
||||
|
||||
{%- if docutils_version_info[:2] >= (0, 18) %}
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
{% endif %}
|
||||
div.topic {
|
||||
border: 1px solid #ccc;
|
||||
padding: 7px 7px 0 7px;
|
||||
|
||||
@@ -254,10 +254,8 @@ div.seealso {
|
||||
border: 1px solid #ff6;
|
||||
}
|
||||
|
||||
{%- if docutils_version_info[:2] >= (0, 18) %}
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
{% endif %}
|
||||
div.topic {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
@@ -245,10 +245,8 @@ div.seealso {
|
||||
padding: 10px 20px 10px 60px;
|
||||
}
|
||||
|
||||
{%- if docutils_version_info[:2] >= (0, 18) %}
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
{% endif %}
|
||||
div.topic {
|
||||
background: #eeeeee;
|
||||
border: 2px solid #C6C9CB;
|
||||
|
||||
@@ -266,10 +266,8 @@ div.quotebar {
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
{%- if docutils_version_info[:2] >= (0, 18) %}
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
{% endif %}
|
||||
div.topic {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
@@ -506,10 +506,8 @@ p.rubric {
|
||||
|
||||
/* "Topics" */
|
||||
|
||||
{%- if docutils_version_info[:2] >= (0, 18) %}
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
{% endif %}
|
||||
div.topic {
|
||||
background-color: #eee;
|
||||
border: 1px solid #ccc;
|
||||
|
||||
@@ -19,7 +19,7 @@ from sphinx.transforms import SphinxTransform
|
||||
from sphinx.util import get_filetype, logging, split_index_msg
|
||||
from sphinx.util.i18n import docname_to_domain
|
||||
from sphinx.util.nodes import (IMAGE_TYPE_NODES, LITERAL_TYPE_NODES, NodeMatcher,
|
||||
extract_messages, is_pending_meta, traverse_translatable_index)
|
||||
extract_messages, traverse_translatable_index)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from sphinx.application import Sphinx
|
||||
@@ -254,12 +254,7 @@ class Locale(SphinxTransform):
|
||||
continue
|
||||
|
||||
# update meta nodes
|
||||
if isinstance(node, nodes.pending) and is_pending_meta(node):
|
||||
# docutils-0.17
|
||||
node.details['nodes'][0]['content'] = msgstr
|
||||
continue
|
||||
elif isinstance(node, addnodes.docutils_meta):
|
||||
# docutils-0.18+
|
||||
if isinstance(node, nodes.meta): # type: ignore
|
||||
node['content'] = msgstr
|
||||
continue
|
||||
|
||||
|
||||
@@ -588,16 +588,6 @@ class SphinxTranslator(nodes.NodeVisitor):
|
||||
logger.warning(__('unknown node type: %r'), node, location=node)
|
||||
|
||||
|
||||
# Node.findall() is a new interface to traverse a doctree since docutils-0.18.
|
||||
# This applies a patch to docutils up to 0.18 inclusive to provide Node.findall()
|
||||
# method to use it from our codebase.
|
||||
if docutils.__version_info__[:2] <= (0, 17):
|
||||
def findall(self, *args, **kwargs):
|
||||
return iter(self.traverse(*args, **kwargs))
|
||||
|
||||
Node.findall = findall # type: ignore
|
||||
|
||||
|
||||
# cache a vanilla instance of nodes.document
|
||||
# Used in new_document() function
|
||||
__document_cache__: Tuple["Values", Reporter]
|
||||
|
||||
+2
-24
@@ -182,14 +182,6 @@ IGNORED_NODES = (
|
||||
)
|
||||
|
||||
|
||||
def is_pending_meta(node: Node) -> bool:
|
||||
if (isinstance(node, nodes.pending) and
|
||||
isinstance(node.details.get('nodes', [None])[0], addnodes.meta)):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def is_translatable(node: Node) -> bool:
|
||||
if isinstance(node, addnodes.translatable):
|
||||
return True
|
||||
@@ -225,11 +217,7 @@ def is_translatable(node: Node) -> bool:
|
||||
return False
|
||||
return True
|
||||
|
||||
if is_pending_meta(node) or isinstance(node, addnodes.meta):
|
||||
# docutils-0.17
|
||||
return True
|
||||
elif isinstance(node, addnodes.docutils_meta):
|
||||
# docutils-0.18+
|
||||
if isinstance(node, nodes.meta): # type: ignore
|
||||
return True
|
||||
|
||||
return False
|
||||
@@ -244,9 +232,6 @@ LITERAL_TYPE_NODES = (
|
||||
IMAGE_TYPE_NODES = (
|
||||
nodes.image,
|
||||
)
|
||||
META_TYPE_NODES = (
|
||||
addnodes.meta,
|
||||
)
|
||||
|
||||
|
||||
def extract_messages(doctree: Element) -> Iterable[Tuple[Element, str]]:
|
||||
@@ -267,14 +252,7 @@ def extract_messages(doctree: Element) -> Iterable[Tuple[Element, str]]:
|
||||
msg = '.. image:: %s' % node['uri']
|
||||
else:
|
||||
msg = ''
|
||||
elif isinstance(node, META_TYPE_NODES):
|
||||
# docutils-0.17
|
||||
msg = node.rawcontent
|
||||
elif isinstance(node, nodes.pending) and is_pending_meta(node):
|
||||
# docutils-0.17
|
||||
msg = node.details['nodes'][0].rawcontent
|
||||
elif isinstance(node, addnodes.docutils_meta):
|
||||
# docutils-0.18+
|
||||
elif isinstance(node, nodes.meta): # type: ignore
|
||||
msg = node["content"]
|
||||
else:
|
||||
msg = node.rawsource.replace('\n', ' ').strip()
|
||||
|
||||
@@ -5,7 +5,6 @@ import re
|
||||
from itertools import chain, cycle
|
||||
from unittest.mock import ANY, call, patch
|
||||
|
||||
import docutils
|
||||
import pytest
|
||||
from html5lib import HTMLParser
|
||||
|
||||
@@ -407,39 +406,6 @@ def test_html5_output(app, cached_etree_parse, fname, expect):
|
||||
check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)
|
||||
|
||||
|
||||
@pytest.mark.skipif(docutils.__version_info__ >= (0, 18), reason='docutils-0.17 or below is required.')
|
||||
@pytest.mark.parametrize("fname,expect", flat_dict({
|
||||
'index.html': [
|
||||
(".//dt[@class='label']/span[@class='brackets']", r'Ref1'),
|
||||
(".//dt[@class='label']", ''),
|
||||
],
|
||||
'footnote.html': [
|
||||
(".//a[@class='footnote-reference brackets'][@href='#id9'][@id='id1']", r"1"),
|
||||
(".//a[@class='footnote-reference brackets'][@href='#id10'][@id='id2']", r"2"),
|
||||
(".//a[@class='footnote-reference brackets'][@href='#foo'][@id='id3']", r"3"),
|
||||
(".//a[@class='reference internal'][@href='#bar'][@id='id4']/span", r"\[bar\]"),
|
||||
(".//a[@class='reference internal'][@href='#baz-qux'][@id='id5']/span", r"\[baz_qux\]"),
|
||||
(".//a[@class='footnote-reference brackets'][@href='#id11'][@id='id6']", r"4"),
|
||||
(".//a[@class='footnote-reference brackets'][@href='#id12'][@id='id7']", r"5"),
|
||||
(".//a[@class='fn-backref'][@href='#id1']", r"1"),
|
||||
(".//a[@class='fn-backref'][@href='#id2']", r"2"),
|
||||
(".//a[@class='fn-backref'][@href='#id3']", r"3"),
|
||||
(".//a[@class='fn-backref'][@href='#id4']", r"bar"),
|
||||
(".//a[@class='fn-backref'][@href='#id5']", r"baz_qux"),
|
||||
(".//a[@class='fn-backref'][@href='#id6']", r"4"),
|
||||
(".//a[@class='fn-backref'][@href='#id7']", r"5"),
|
||||
(".//a[@class='fn-backref'][@href='#id8']", r"6"),
|
||||
],
|
||||
}))
|
||||
@pytest.mark.sphinx('html')
|
||||
@pytest.mark.test_params(shared_result='test_build_html_output_docutils17')
|
||||
def test_docutils17_output(app, cached_etree_parse, fname, expect):
|
||||
app.build()
|
||||
print(app.outdir / fname)
|
||||
check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)
|
||||
|
||||
|
||||
@pytest.mark.skipif(docutils.__version_info__[:2] <= (0, 17), reason='docutils-0.18+ is required.')
|
||||
@pytest.mark.parametrize("fname,expect", flat_dict({
|
||||
'index.html': [
|
||||
(".//div[@class='citation']/span", r'Ref1'),
|
||||
@@ -465,7 +431,7 @@ def test_docutils17_output(app, cached_etree_parse, fname, expect):
|
||||
}))
|
||||
@pytest.mark.sphinx('html')
|
||||
@pytest.mark.test_params(shared_result='test_build_html_output_docutils18')
|
||||
def test_docutils18_output(app, cached_etree_parse, fname, expect):
|
||||
def test_docutils_output(app, cached_etree_parse, fname, expect):
|
||||
app.build()
|
||||
print(app.outdir / fname)
|
||||
check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
"""Test smart quotes."""
|
||||
|
||||
import docutils
|
||||
import pytest
|
||||
from html5lib import HTMLParser
|
||||
|
||||
@@ -44,10 +43,7 @@ def test_man_builder(app, status, warning):
|
||||
app.build()
|
||||
|
||||
content = (app.outdir / 'python.1').read_text(encoding='utf8')
|
||||
if docutils.__version_info__ > (0, 18):
|
||||
assert r'\-\- \(dqSphinx\(dq is a tool that makes it easy ...' in content
|
||||
else:
|
||||
assert r'\-\- "Sphinx" is a tool that makes it easy ...' in content
|
||||
assert r'\-\- \(dqSphinx\(dq is a tool that makes it easy ...' in content
|
||||
|
||||
|
||||
@pytest.mark.sphinx(buildername='latex', testroot='smartquotes', freshenv=True)
|
||||
|
||||
@@ -4,17 +4,9 @@ import pickle
|
||||
|
||||
import pytest
|
||||
|
||||
from sphinx import addnodes
|
||||
from sphinx.testing.util import SphinxTestApp
|
||||
from sphinx.versioning import add_uids, get_ratio, merge_doctrees
|
||||
|
||||
try:
|
||||
from docutils.nodes import meta
|
||||
except ImportError:
|
||||
# docutils-0.18.0 or older
|
||||
from docutils.parsers.rst.directives.html import MetaBody
|
||||
meta = MetaBody.meta
|
||||
|
||||
app = original = original_uids = None
|
||||
|
||||
|
||||
@@ -62,8 +54,6 @@ def test_picklablility():
|
||||
copy.settings.warning_stream = None
|
||||
copy.settings.env = None
|
||||
copy.settings.record_dependencies = None
|
||||
for metanode in copy.findall(meta):
|
||||
metanode.__class__ = addnodes.meta
|
||||
loaded = pickle.loads(pickle.dumps(copy, pickle.HIGHEST_PROTOCOL))
|
||||
assert all(getattr(n, 'uid', False) for n in loaded.findall(is_paragraph))
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tox]
|
||||
minversion = 2.4.0
|
||||
envlist = docs,flake8,mypy,twine,py{38,39,310,311},du{17,18,19}
|
||||
envlist = docs,flake8,mypy,twine,py{38,39,310,311},du{18,19}
|
||||
isolated_build = True
|
||||
|
||||
[testenv]
|
||||
@@ -17,9 +17,8 @@ passenv =
|
||||
TERM
|
||||
description =
|
||||
py{38,39,310,311}: Run unit tests against {envname}.
|
||||
du{17,18,19}: Run unit tests with the given version of docutils.
|
||||
du{18,19}: Run unit tests with the given version of docutils.
|
||||
deps =
|
||||
du17: docutils==0.17.*
|
||||
du18: docutils==0.18.*
|
||||
du19: docutils==0.19.*
|
||||
extras =
|
||||
|
||||
Reference in New Issue
Block a user