|
From: <mi...@us...> - 2021-11-15 17:56:00
|
Revision: 8888
http://sourceforge.net/p/docutils/code/8888
Author: milde
Date: 2021-11-15 17:55:57 +0000 (Mon, 15 Nov 2021)
Log Message:
-----------
odt writer: Fix spurious output with Windows (bug #350).
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/writers/odf_odt/__init__.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2021-11-15 17:55:50 UTC (rev 8887)
+++ trunk/docutils/HISTORY.txt 2021-11-15 17:55:57 UTC (rev 8888)
@@ -29,6 +29,10 @@
- Fix typo (bug #432).
+* docutils/writers/odf_odt/__init__.py:
+
+ - Fix spurious output with Windows (bug #350).
+
Release 0.18 (2021-10-26)
=========================
Modified: trunk/docutils/docutils/writers/odf_odt/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/odf_odt/__init__.py 2021-11-15 17:55:50 UTC (rev 8887)
+++ trunk/docutils/docutils/writers/odf_odt/__init__.py 2021-11-15 17:55:57 UTC (rev 8888)
@@ -16,6 +16,7 @@
import os
import os.path
import re
+import subprocess
import sys
import tempfile
import time
@@ -45,7 +46,9 @@
from StringIO import StringIO
from urllib2 import HTTPError
from urllib2 import urlopen
+ FileNotFoundError = OSError
+
# Import pygments and odtwriter pygments formatters if possible.
try:
import pygments
@@ -1087,13 +1090,13 @@
def setup_paper(self, root_el):
try:
- fin = os.popen("paperconf -s 2> /dev/null")
- dimensions = fin.read().split()
- w, h = (float(s) for s in dimensions)
- except (IOError, ValueError):
+ dimensions = subprocess.check_output(('paperconf', '-s'),
+ stderr=subprocess.STDOUT)
+ w, h = (float(s) for s in dimensions.split())
+ except (subprocess.CalledProcessError, FileNotFoundError, ValueError):
+ self.document.reporter.info(
+ 'Cannot use `paperconf`, defaulting to Letter.')
w, h = 612, 792 # default to Letter
- finally:
- fin.close()
def walk(el):
if el.tag == "{%s}page-layout-properties" % SNSD["style"] and \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2021-11-15 19:40:34
|
Revision: 8889
http://sourceforge.net/p/docutils/code/8889
Author: milde
Date: 2021-11-15 19:40:31 +0000 (Mon, 15 Nov 2021)
Log Message:
-----------
Small documentation updates. Mark ODT writer as provisional.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/writers/odf_odt/__init__.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2021-11-15 17:55:57 UTC (rev 8888)
+++ trunk/docutils/HISTORY.txt 2021-11-15 19:40:31 UTC (rev 8889)
@@ -11,16 +11,17 @@
.. contents::
-Changes Since 0.18
-==================
+Release 0.18.1 (in preparation)
+===============================
* docutils/nodes.py
- Node.traverse() returns a list again to restore backwards
compatibility. Fixes bug #431.
+
+ - New method Node.findall(): like Node.traverse() but returns an
+ iterator. Obsoletes Node.traverse().
- - New method Node.findall(): like Node.traverse() but returns an iterator.
-
* docutils/writers/_html_base.py
- Fix handling of ``footnote_backlinks==False`` (report Alan G Isaac).
@@ -33,6 +34,11 @@
- Fix spurious output with Windows (bug #350).
+* test\test_error_reporting.py
+
+ - Fix a false positive (bug #434).
+
+
Release 0.18 (2021-10-26)
=========================
@@ -62,9 +68,11 @@
* docutils/writers/html5_polyglot/__init__.py
- - New option "image_loading". Support "lazy" loading of images.
+ - New option `image_loading`_. Support "lazy" loading of images.
Obsoletes "embed_images".
+ .. _image_loading: docs/user/config.html#image-loading
+
* docutils/writers/pseudoxml.py:
- Fix spelling of option "detailed".
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2021-11-15 17:55:57 UTC (rev 8888)
+++ trunk/docutils/RELEASE-NOTES.txt 2021-11-15 19:40:31 UTC (rev 8889)
@@ -92,7 +92,6 @@
* nodes.Node.traverse() returns a list again to restore
backwards compatibility (fixes bug #431).
- It is deprecated in favour of the new method nodes.Node.findall().
* Small bugfixes (see HISTORY_).
Modified: trunk/docutils/docutils/writers/odf_odt/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/odf_odt/__init__.py 2021-11-15 17:55:57 UTC (rev 8888)
+++ trunk/docutils/docutils/writers/odf_odt/__init__.py 2021-11-15 19:40:31 UTC (rev 8889)
@@ -5,6 +5,8 @@
"""
Open Document Format (ODF) Writer.
+This module is provisional:
+the API is not settled and may change with any minor Docutils version.
"""
from __future__ import absolute_import
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2021-11-16 22:20:45
|
Revision: 8890
http://sourceforge.net/p/docutils/code/8890
Author: milde
Date: 2021-11-16 22:20:43 +0000 (Tue, 16 Nov 2021)
Log Message:
-----------
Fix and document attribute definitions in nodes.Element.
Reword documentation using the nomenclature from "expose_internals"
in config.txt: External attributes correspond to the XML element
attributes. Internal attributes are Python class attributes.
Bugfix: Remove the "internal" attribute `rawsource` from
`Element.known_attributes` (common external attributes).
This was a leftover from [r8194].
Modified Paths:
--------------
trunk/docutils/docs/ref/doctree.txt
trunk/docutils/docutils/nodes.py
Modified: trunk/docutils/docs/ref/doctree.txt
===================================================================
--- trunk/docutils/docs/ref/doctree.txt 2021-11-15 19:40:31 UTC (rev 8889)
+++ trunk/docutils/docs/ref/doctree.txt 2021-11-16 22:20:43 UTC (rev 8890)
@@ -978,7 +978,7 @@
In contrast to the definition in the exchange-table-model_,
unitless values of the "colwidth" are interpreted as proportional
values, not fixed values with unit "pt".
-
+
.. The reference implementation `html4css2` converts column
widths values to percentages.
@@ -4711,7 +4711,7 @@
:depth: 1
_`Common Attributes`:
- Through the `%basic.atts;`_ parameter entity, all elements contain
+ Through the `%basic.atts;`_ parameter entity, all elements support
the following attributes: ids_, names_ or dupnames_, source_, and
classes_.
@@ -4969,7 +4969,7 @@
The ``source`` attribute is used to store the path or URL to the
source text that was used to produce the document tree. It is one of
-the `common attributes`_, shared by all Docutils elements.
+the `common attributes`_, declared for all Docutils elements.
``start``
Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py 2021-11-15 19:40:31 UTC (rev 8889)
+++ trunk/docutils/docutils/nodes.py 2021-11-16 22:20:43 UTC (rev 8890)
@@ -29,6 +29,7 @@
import re
import warnings
import unicodedata
+# import xml.dom.minidom as dom # -> conditional import in Node.asdom()
if sys.version_info >= (3, 0):
unicode = str # noqa
@@ -73,8 +74,7 @@
than a simple container. Its boolean "truth" does not depend on
having one or more subnodes in the doctree.
- Use `len()` to check node length. Use `None` to represent a boolean
- false value.
+ Use `len()` to check node length.
"""
return True
@@ -245,14 +245,14 @@
def findall(self, condition=None, include_self=True, descend=True,
siblings=False, ascend=False):
"""
- Return an iterator yielding nodes following `self`.
+ Return an iterator yielding nodes following `self`:
* self (if `include_self` is true)
* all descendants in tree traversal order (if `descend` is true)
- * all siblings (if `siblings` is true) and their descendants (if
- also `descend` is true)
- * the siblings of the parent (if `ascend` is true) and their
- descendants (if also `descend` is true), and so on
+ * the following siblings (if `siblings` is true) and their
+ descendants (if also `descend` is true)
+ * the following siblings of the parent (if `ascend` is true) and
+ their descendants (if also `descend` is true), and so on.
If `condition` is not None, the iterator yields only nodes
for which ``condition(node)`` is true. If `condition` is a
@@ -261,8 +261,8 @@
If `ascend` is true, assume `siblings` to be true as well.
- To allow processing of the return value or modification while
- iterating, wrap calls to findall() in a ``tuple()`` or ``list()``.
+ If the tree structure is modified during iteration, the result
+ is undefined.
For example, given the following tree::
@@ -472,19 +472,26 @@
"""
`Element` is the superclass to all specific elements.
- Elements contain attributes and child nodes. Elements emulate
- dictionaries for attributes, indexing by attribute name (a string). To
- set the attribute 'att' to 'value', do::
+ Elements contain attributes and child nodes.
+ They can be described as a cross between a list and a dictionary.
+ Elements emulate dictionaries for external [#]_ attributes, indexing by
+ attribute name (a string). To set the attribute 'att' to 'value', do::
+
element['att'] = 'value'
+ .. [#] External attributes correspond to the XML element attributes.
+ From its `Node` superclass, Element also inherits "internal"
+ class attributes that are accessed using the standard syntax, e.g.
+ ``element.parent``.
+
There are two special attributes: 'ids' and 'names'. Both are
- lists of unique identifiers, and names serve as human interfaces
- to IDs. Names are case- and whitespace-normalized (see the
- fully_normalize_name() function), and IDs conform to the regular
- expression ``[a-z](-?[a-z0-9]+)*`` (see the make_id() function).
+ lists of unique identifiers: 'ids' conform to the regular expression
+ ``[a-z](-?[a-z0-9]+)*`` (see the make_id() function for rationale and
+ details). 'names' serve as user-friendly interfaces to IDs; they are
+ case- and whitespace-normalized (see the fully_normalize_name() function).
- Elements also emulate lists for child nodes (element nodes and/or text
+ Elements emulate lists for child nodes (element nodes and/or text
nodes), indexing by integer. To get the first child node, use::
element[0]
@@ -510,11 +517,11 @@
"""
basic_attributes = ('ids', 'classes', 'names', 'dupnames')
- """List attributes which are defined for every Element-derived class
+ """Tuple of attributes which are defined for every Element-derived class
instance and can be safely transferred to a different node."""
local_attributes = ('backrefs',)
- """A list of class-specific attributes that should not be copied with the
+ """Tuple of class-specific attributes that should not be copied with the
standard attributes when replacing a node.
NOTE: Derived classes should override this value to prevent any of its
@@ -521,11 +528,11 @@
attributes being copied by adding to the value in its parent class."""
list_attributes = basic_attributes + local_attributes
- """List attributes, automatically initialized to empty lists for
- all nodes."""
+ """Tuple of attributes that are automatically initialized to empty lists
+ for all nodes."""
- known_attributes = list_attributes + ('source', 'rawsource')
- """List attributes that are known to the Element base class."""
+ known_attributes = list_attributes + ('source',)
+ """Tuple of attributes that are known to the Element base class."""
tagname = None
"""The element generic identifier. If None, it is set as an instance
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2021-11-17 19:04:18
|
Revision: 8891
http://sourceforge.net/p/docutils/code/8891
Author: milde
Date: 2021-11-17 19:04:15 +0000 (Wed, 17 Nov 2021)
Log Message:
-----------
Fix behaviour of get_stylesheet_list()
Do not look up stylesheets given as "stylesheet" setting.
Cf. bug #434.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/utils/__init__.py
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/tests/misc_rst_html4css1.py
trunk/docutils/test/test_parsers/test_rst/test_section_headers.py
trunk/docutils/test/test_parsers/test_rst/test_targets.py
trunk/docutils/test/test_utils.py
trunk/docutils/test/test_writers/test_latex2e.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2021-11-16 22:20:43 UTC (rev 8890)
+++ trunk/docutils/HISTORY.txt 2021-11-17 19:04:15 UTC (rev 8891)
@@ -18,10 +18,15 @@
- Node.traverse() returns a list again to restore backwards
compatibility. Fixes bug #431.
-
+
- New method Node.findall(): like Node.traverse() but returns an
iterator. Obsoletes Node.traverse().
+* docutils/utils/__init__.py:
+
+ - Fix behaviour of get_stylesheet_list(): do not look up stylesheets
+ given as "stylesheet" setting. Cf. bug #434.
+
* docutils/writers/_html_base.py
- Fix handling of ``footnote_backlinks==False`` (report Alan G Isaac).
@@ -32,9 +37,9 @@
* docutils/writers/odf_odt/__init__.py:
- - Fix spurious output with Windows (bug #350).
+ - Fix spurious output with Windows (bug #350).
-* test\test_error_reporting.py
+* test/test_error_reporting.py
- Fix a false positive (bug #434).
Modified: trunk/docutils/docutils/utils/__init__.py
===================================================================
--- trunk/docutils/docutils/utils/__init__.py 2021-11-16 22:20:43 UTC (rev 8890)
+++ trunk/docutils/docutils/utils/__init__.py 2021-11-17 19:04:15 UTC (rev 8891)
@@ -492,6 +492,10 @@
enable specification of multiple stylesheets as a comma-separated
list.
"""
+ warnings.warn('utils.get_stylesheet_reference()'
+ ' is obsoleted by utils.get_stylesheet_list()'
+ ' and will be removed in Docutils 1.2.',
+ DeprecationWarning, stacklevel=2)
if settings.stylesheet_path:
assert not settings.stylesheet, (
'stylesheet and stylesheet_path are mutually exclusive.')
@@ -518,12 +522,14 @@
assert not (settings.stylesheet and settings.stylesheet_path), (
'stylesheet and stylesheet_path are mutually exclusive.')
stylesheets = settings.stylesheet_path or settings.stylesheet or []
- # programmatically set default can be string or unicode:
+ # programmatically set default may be string with comma separated list:
if not isinstance(stylesheets, list):
stylesheets = [path.strip() for path in stylesheets.split(',')]
- # expand relative paths if found in stylesheet-dirs:
- return [find_file_in_dirs(path, settings.stylesheet_dirs)
- for path in stylesheets]
+ if settings.stylesheet_path:
+ # expand relative paths if found in stylesheet-dirs:
+ stylesheets = [find_file_in_dirs(path, settings.stylesheet_dirs)
+ for path in stylesheets]
+ return stylesheets
def find_file_in_dirs(path, dirs):
"""
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2021-11-16 22:20:43 UTC (rev 8890)
+++ trunk/docutils/docutils/writers/_html_base.py 2021-11-17 19:04:15 UTC (rev 8891)
@@ -393,8 +393,10 @@
encoded = encoded.replace('.', '.')
return encoded
- def stylesheet_call(self, path):
+ def stylesheet_call(self, path, adjust_path=None):
"""Return code to reference or embed stylesheet file `path`"""
+ if adjust_path is None:
+ adjust_path = bool(self.settings.stylesheet_path)
if self.settings.embed_stylesheet:
try:
content = docutils.io.FileInput(source_path=path,
@@ -407,8 +409,8 @@
return '<--- %s --->\n' % msg
return self.embedded_stylesheet % content
# else link to style file:
- if self.settings.stylesheet_path:
- # adapt path relative to output (cf. config.html#stylesheet-path)
+ if adjust_path:
+ # rewrite path relative to output (cf. config.html#stylesheet-path)
path = utils.relative_path(self.settings._destination, path)
return self.stylesheet_link % self.encode(path)
@@ -1237,7 +1239,8 @@
elif self.math_output == 'html':
if self.math_output_options and not self.math_header:
self.math_header = [self.stylesheet_call(
- utils.find_file_in_dirs(s, self.settings.stylesheet_dirs))
+ utils.find_file_in_dirs(s, self.settings.stylesheet_dirs),
+ adjust_path=True)
for s in self.math_output_options[0].split(',')]
# TODO: fix display mode in matrices and fractions
math2html.DocumentParameters.displaymode = (math_env != '')
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2021-11-16 22:20:43 UTC (rev 8890)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2021-11-17 19:04:15 UTC (rev 8891)
@@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
<title>Additional tests with html4css1</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
-<link rel="stylesheet" href="functional/input/data/html4css1.css" type="text/css" />
-<link rel="stylesheet" href="functional/input/data/math.css" type="text/css" />
+<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
+<link rel="stylesheet" href="../input/data/math.css" type="text/css" />
</head>
<body>
<div class="document" id="additional-tests-with-html4css1">
Modified: trunk/docutils/test/functional/tests/misc_rst_html4css1.py
===================================================================
--- trunk/docutils/test/functional/tests/misc_rst_html4css1.py 2021-11-16 22:20:43 UTC (rev 8890)
+++ trunk/docutils/test/functional/tests/misc_rst_html4css1.py 2021-11-17 19:04:15 UTC (rev 8891)
@@ -8,9 +8,10 @@
writer_name = "html4css1"
# Settings
-# test for encoded attribute value in optional stylesheet name:
-settings_overrides['stylesheet'] = 'foo&bar.css, html4css1.css'
+# test for encoded attribute value in optional stylesheet name,
+# 'stylesheet' setting, values are used verbatim
+settings_overrides['stylesheet'] = 'foo&bar.css, ../input/data/html4css1.css'
+# reset to avoid conflict with 'stylesheet'
settings_overrides['stylesheet_path'] = ''
-# local copy of stylesheets:
-# (Test runs in ``docutils/test/``, we need relative path from there.)
+# stylesheet_dirs not used with 'stylesheet'
settings_overrides['stylesheet_dirs'] = ('.', 'functional/input/data')
Modified: trunk/docutils/test/test_parsers/test_rst/test_section_headers.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_section_headers.py 2021-11-16 22:20:43 UTC (rev 8890)
+++ trunk/docutils/test/test_parsers/test_rst/test_section_headers.py 2021-11-17 19:04:15 UTC (rev 8891)
@@ -1,5 +1,5 @@
+#! /usr/bin/env python
# -*- coding: utf-8 -*-
-#! /usr/bin/env python
# $Id$
# Author: David Goodger <go...@py...>
Modified: trunk/docutils/test/test_parsers/test_rst/test_targets.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_targets.py 2021-11-16 22:20:43 UTC (rev 8890)
+++ trunk/docutils/test/test_parsers/test_rst/test_targets.py 2021-11-17 19:04:15 UTC (rev 8891)
@@ -1,4 +1,3 @@
-
#! /usr/bin/env python
# $Id$
Modified: trunk/docutils/test/test_utils.py
===================================================================
--- trunk/docutils/test/test_utils.py 2021-11-16 22:20:43 UTC (rev 8890)
+++ trunk/docutils/test/test_utils.py 2021-11-17 19:04:15 UTC (rev 8891)
@@ -354,7 +354,38 @@
self.assertEqual(unescaped, self.unescaped)
restored = utils.unescape(self.nulled, restore_backslashes=True)
self.assertEqual(restored, self.escaped)
-
+
+class StylesheetFunctionTests(unittest.TestCase):
+
+ stylesheet_dirs = ['.', 'data']
+
+ def test_get_stylesheet_list_stylesheet_path(self):
+ # look for stylesheets in stylesheet_dirs
+ self.stylesheet = None
+ self.stylesheet_path = 'ham.css, missing.css'
+
+ self.assertEqual(utils.get_stylesheet_list(self),
+ ['data/ham.css', 'missing.css'])
+
+ def test_get_stylesheet_list_stylesheet(self):
+ # use stylesheet paths verbatim
+ self.stylesheet = 'ham.css, missing.css'
+ self.stylesheet_path = None
+
+ self.assertEqual(utils.get_stylesheet_list(self),
+ ['ham.css', 'missing.css'])
+
+ def test_get_stylesheet_list_conflict(self):
+ # settings "stylesheet_path" and "stylesheet"
+ # must not be used together
+ self.stylesheet = 'ham.css, missing.css'
+ self.stylesheet_path = 'man.css, miss2.css'
+ self.assertRaises(AssertionError,
+ utils.get_stylesheet_list, self)
+
+
+
+
if __name__ == '__main__':
unittest.main()
Modified: trunk/docutils/test/test_writers/test_latex2e.py
===================================================================
--- trunk/docutils/test/test_writers/test_latex2e.py 2021-11-16 22:20:43 UTC (rev 8890)
+++ trunk/docutils/test/test_writers/test_latex2e.py 2021-11-17 19:04:15 UTC (rev 8891)
@@ -1,5 +1,5 @@
+#! /usr/bin/env python
# -*- coding: utf-8 -*-
-#! /usr/bin/env python
# $Id$
# Author: engelbert gruber <gr...@us...>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2021-11-18 10:12:51
|
Revision: 8892
http://sourceforge.net/p/docutils/code/8892
Author: milde
Date: 2021-11-18 10:12:49 +0000 (Thu, 18 Nov 2021)
Log Message:
-----------
Fixup for [r8891]. Fix bug #434.
utils.get_stylesheet_list() must return POSIX paths.
Don't use hard-coded Windows drive letters in the tests.
Fix `bytes` test sample for utils.decode_path().
Modified Paths:
--------------
trunk/docutils/docutils/utils/__init__.py
trunk/docutils/test/test_utils.py
trunk/docutils/test/test_writers/test_html4css1_template.py
trunk/docutils/test/test_writers/test_s5.py
Modified: trunk/docutils/docutils/utils/__init__.py
===================================================================
--- trunk/docutils/docutils/utils/__init__.py 2021-11-17 19:04:15 UTC (rev 8891)
+++ trunk/docutils/docutils/utils/__init__.py 2021-11-18 10:12:49 UTC (rev 8892)
@@ -529,6 +529,8 @@
# expand relative paths if found in stylesheet-dirs:
stylesheets = [find_file_in_dirs(path, settings.stylesheet_dirs)
for path in stylesheets]
+ if os.sep != '/': # for URLs, we need POSIX paths
+ stylesheets = [path.replace(os.sep, '/') for path in stylesheets]
return stylesheets
def find_file_in_dirs(path, dirs):
Modified: trunk/docutils/test/test_utils.py
===================================================================
--- trunk/docutils/test/test_utils.py 2021-11-17 19:04:15 UTC (rev 8891)
+++ trunk/docutils/test/test_utils.py 2021-11-18 10:12:49 UTC (rev 8892)
@@ -281,13 +281,14 @@
self.assertEqual(utils.column_width(u'dâ'), 2) # combining
def test_decode_path(self):
- strpath = utils.decode_path('späm')
+ bytes_filename = u'späm'.encode(sys.getfilesystemencoding())
+ bytespath = utils.decode_path(bytes_filename)
unipath = utils.decode_path(u'späm')
defaultpath = utils.decode_path(None)
- self.assertEqual(strpath, u'späm')
+ self.assertEqual(bytespath, u'späm')
self.assertEqual(unipath, u'späm')
self.assertEqual(defaultpath, u'')
- self.assertTrue(isinstance(strpath, nodes.reprunicode))
+ self.assertTrue(isinstance(bytespath, nodes.reprunicode))
self.assertTrue(isinstance(unipath, unicode))
self.assertTrue(isinstance(defaultpath, unicode))
self.assertRaises(ValueError, utils.decode_path, 13)
Modified: trunk/docutils/test/test_writers/test_html4css1_template.py
===================================================================
--- trunk/docutils/test/test_writers/test_html4css1_template.py 2021-11-17 19:04:15 UTC (rev 8891)
+++ trunk/docutils/test/test_writers/test_html4css1_template.py 2021-11-18 10:12:49 UTC (rev 8892)
@@ -27,10 +27,12 @@
return s
if platform.system() == "Windows":
- drive_prefix = "C:"
+ drive_prefix = os.path.splitdrive(os.getcwd())[0]
else:
drive_prefix = ""
+
+
totest = {}
totest['template'] = [
Modified: trunk/docutils/test/test_writers/test_s5.py
===================================================================
--- trunk/docutils/test/test_writers/test_s5.py 2021-11-17 19:04:15 UTC (rev 8891)
+++ trunk/docutils/test/test_writers/test_s5.py 2021-11-18 10:12:49 UTC (rev 8892)
@@ -31,8 +31,8 @@
'version': DocutilsTestSupport.docutils.__version__,
'drive': '', }
-if platform.system() == "Windows":
- interpolations['drive'] = "C:"
+if platform.system() == 'Windows':
+ interpolations['drive'] = os.path.splitdrive(os.getcwd())[0]
totest_1 = {}
totest_2 = {}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2021-11-18 19:10:00
|
Revision: 8893
http://sourceforge.net/p/docutils/code/8893
Author: grubert
Date: 2021-11-18 19:09:57 +0000 (Thu, 18 Nov 2021)
Log Message:
-----------
Version: 0.18.1b
Modified Paths:
--------------
trunk/docutils/README.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/__init__.py
trunk/docutils/docutils/writers/manpage.py
trunk/docutils/setup.py
trunk/docutils/test/functional/expected/compact_lists.html
trunk/docutils/test/functional/expected/dangerous.html
trunk/docutils/test/functional/expected/embed_images_html5.html
trunk/docutils/test/functional/expected/field_name_limit.html
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/math_output_html.html
trunk/docutils/test/functional/expected/math_output_latex.html
trunk/docutils/test/functional/expected/math_output_mathjax.html
trunk/docutils/test/functional/expected/math_output_mathml.html
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/misc_rst_html5.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/README.txt 2021-11-18 19:09:57 UTC (rev 8893)
@@ -1,6 +1,6 @@
-==============================
- README: Docutils 0.18.1b.dev
-==============================
+==========================
+ README: Docutils 0.18.1b
+==========================
:Author: David Goodger
:Contact: go...@py...
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/RELEASE-NOTES.txt 2021-11-18 19:09:57 UTC (rev 8893)
@@ -83,8 +83,8 @@
.. _use_latex_citations: docs/user/config.html#use-latex-citations
-Release 0.18.1.dev
-==================
+Release 0.18.1b0
+================
.. Note::
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/docutils/__init__.py 2021-11-18 19:09:57 UTC (rev 8893)
@@ -56,7 +56,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.18.1b.dev'
+__version__ = '0.18.1b'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -116,7 +116,7 @@
releaselevel='beta', # one of 'alpha', 'beta', 'candidate', 'final'
# pre-release serial number (0 for final releases and active development):
serial=0,
- release=False # True for official releases and pre-releases
+ release=True # True for official releases and pre-releases
)
"""Comprehensive version information tuple. See 'Version Numbering' in
docs/dev/policies.txt."""
Modified: trunk/docutils/docutils/writers/manpage.py
===================================================================
--- trunk/docutils/docutils/writers/manpage.py 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/docutils/writers/manpage.py 2021-11-18 19:09:57 UTC (rev 8893)
@@ -998,6 +998,8 @@
self.body.append(self.defs['reference'][0])
def depart_reference(self, node):
+ # TODO check node text is different from refuri
+ #self.body.append("\n'UR " + node['refuri'] + "\n'UE\n")
self.body.append(self.defs['reference'][1])
def visit_revision(self, node):
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/setup.py 2021-11-18 19:09:57 UTC (rev 8893)
@@ -31,7 +31,7 @@
input Docutils supports reStructuredText, an easy-to-read,
what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
'url': 'http://docutils.sourceforge.net/',
- 'version': '0.18.1b.dev',
+ 'version': '0.18.1b',
'author': 'David Goodger',
'author_email': 'go...@py...',
'maintainer': 'docutils-develop list',
Modified: trunk/docutils/test/functional/expected/compact_lists.html
===================================================================
--- trunk/docutils/test/functional/expected/compact_lists.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<title>compact_lists.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/dangerous.html
===================================================================
--- trunk/docutils/test/functional/expected/dangerous.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/dangerous.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<title>dangerous.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/embed_images_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/embed_images_html5.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/embed_images_html5.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<title>Embedded Images</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<title>field_list.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/responsive.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
<link rel="stylesheet" href="../input/data/math.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_latex.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_latex.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/math_output_mathjax.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathjax.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML"></script>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/math_output_mathml.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<title>Additional tests with html4css1</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html5.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/misc_rst_html5.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<title>Additional tests with HTML 5</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/responsive.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/pep_html.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+ <meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<title>PEP 100 -- Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2021-11-18 19:09:57 UTC (rev 8893)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd">
-<!-- Generated by Docutils 0.18.1b.dev -->
+<!-- Generated by Docutils 0.18.1b -->
<document ids="restructuredtext-test-document doctitle" names="restructuredtext\ test\ document doctitle" source="functional/input/standalone_rst_docutils_xml.txt" title="reStructuredText Test Document">
<title>reStructuredText Test Document</title>
<subtitle ids="examples-of-syntax-constructs subtitle" names="examples\ of\ syntax\ constructs subtitle">Examples of Syntax Constructs</subtitle>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" xml:lang="en" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2021-11-18 10:12:49 UTC (rev 8892)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2021-11-18 19:09:57 UTC (rev 8893)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2021-11-18 19:34:51
|
Revision: 8894
http://sourceforge.net/p/docutils/code/8894
Author: grubert
Date: 2021-11-18 19:34:48 +0000 (Thu, 18 Nov 2021)
Log Message:
-----------
Version: 0.18.1b1.dev
Modified Paths:
--------------
trunk/docutils/README.txt
trunk/docutils/docutils/__init__.py
trunk/docutils/setup.py
trunk/docutils/test/functional/expected/compact_lists.html
trunk/docutils/test/functional/expected/dangerous.html
trunk/docutils/test/functional/expected/embed_images_html5.html
trunk/docutils/test/functional/expected/field_name_limit.html
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/math_output_html.html
trunk/docutils/test/functional/expected/math_output_latex.html
trunk/docutils/test/functional/expected/math_output_mathjax.html
trunk/docutils/test/functional/expected/math_output_mathml.html
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/misc_rst_html5.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/README.txt 2021-11-18 19:34:48 UTC (rev 8894)
@@ -1,6 +1,6 @@
-==========================
- README: Docutils 0.18.1b
-==========================
+===============================
+ README: Docutils 0.18.1b1.dev
+===============================
:Author: David Goodger
:Contact: go...@py...
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/docutils/__init__.py 2021-11-18 19:34:48 UTC (rev 8894)
@@ -56,7 +56,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.18.1b'
+__version__ = '0.18.1b1.dev'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -115,8 +115,8 @@
micro=1,
releaselevel='beta', # one of 'alpha', 'beta', 'candidate', 'final'
# pre-release serial number (0 for final releases and active development):
- serial=0,
- release=True # True for official releases and pre-releases
+ serial=1,
+ release=False # True for official releases and pre-releases
)
"""Comprehensive version information tuple. See 'Version Numbering' in
docs/dev/policies.txt."""
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/setup.py 2021-11-18 19:34:48 UTC (rev 8894)
@@ -31,7 +31,7 @@
input Docutils supports reStructuredText, an easy-to-read,
what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
'url': 'http://docutils.sourceforge.net/',
- 'version': '0.18.1b',
+ 'version': '0.18.1b1.dev',
'author': 'David Goodger',
'author_email': 'go...@py...',
'maintainer': 'docutils-develop list',
Modified: trunk/docutils/test/functional/expected/compact_lists.html
===================================================================
--- trunk/docutils/test/functional/expected/compact_lists.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<title>compact_lists.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/dangerous.html
===================================================================
--- trunk/docutils/test/functional/expected/dangerous.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/dangerous.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<title>dangerous.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/embed_images_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/embed_images_html5.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/embed_images_html5.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<title>Embedded Images</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<title>field_list.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/responsive.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
<link rel="stylesheet" href="../input/data/math.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_latex.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_latex.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/math_output_mathjax.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathjax.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML"></script>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/math_output_mathml.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<title>Additional tests with html4css1</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html5.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/misc_rst_html5.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<title>Additional tests with HTML 5</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/responsive.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/pep_html.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+ <meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<title>PEP 100 -- Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2021-11-18 19:34:48 UTC (rev 8894)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd">
-<!-- Generated by Docutils 0.18.1b -->
+<!-- Generated by Docutils 0.18.1b1.dev -->
<document ids="restructuredtext-test-document doctitle" names="restructuredtext\ test\ document doctitle" source="functional/input/standalone_rst_docutils_xml.txt" title="reStructuredText Test Document">
<title>reStructuredText Test Document</title>
<subtitle ids="examples-of-syntax-constructs subtitle" names="examples\ of\ syntax\ constructs subtitle">Examples of Syntax Constructs</subtitle>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" xml:lang="en" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2021-11-18 19:09:57 UTC (rev 8893)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2021-11-18 19:34:48 UTC (rev 8894)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2021-11-19 12:47:04
|
Revision: 8898
http://sourceforge.net/p/docutils/code/8898
Author: milde
Date: 2021-11-19 12:47:00 +0000 (Fri, 19 Nov 2021)
Log Message:
-----------
Clean up the Policies document.
(Re)move additons by Gunter Milde that belong somewhere else:
* How to get a new feature into Docutils -> FAQ.
* Rationale/background info for choosing the BSD 2-Clause license.
Modified Paths:
--------------
trunk/docutils/FAQ.txt
trunk/docutils/docs/dev/policies.txt
Modified: trunk/docutils/FAQ.txt
===================================================================
--- trunk/docutils/FAQ.txt 2021-11-19 12:46:38 UTC (rev 8897)
+++ trunk/docutils/FAQ.txt 2021-11-19 12:47:00 UTC (rev 8898)
@@ -141,16 +141,22 @@
How can I get a new feature into Docutils?
------------------------------------------
-Present your idea at the docutils-develop_ mailing list
-or file a ticket at Docutils' `feature request tracker`_.
+* Present your idea at the docutils-develop_ mailing list or file a
+ ticket at Docutils' `feature request tracker`_.
+ Convince the Docutils developers that this is a valuable addition.
-See the `Docutils Policies`__ for a more detailed answer.
+* Contribute_.
+* Be patient, and be persistent. None of us are paid to do this,
+ it's all in our spare time, which is precious and rare.
+
.. _docutils-develop: docs/user/mailing-lists.html#docutils-develop
+.. _extensions and related projects:
+ docs/dev/policies.html#extensions-and-related-projects
.. _feature request tracker:
http://sourceforge.net/p/docutils/feature-requests/
-__ docs/dev/policies.html#how-to-get-a-new-feature-into-docutils
+
reStructuredText
================
@@ -1222,6 +1228,49 @@
simplicity and extensibility, and has been influenced by the needs of
the reStructuredText markup.
+
+.. _contribute:
+
+How to make code contributions that are easily accepted
+-------------------------------------------------------
+
+* Follow the `Python coding conventions`_ and `documentation
+ conventions`_ in the Docutils Policies.
+ Ensure the addition works with all `supported Python versions`_.
+
+ Look at the Docutils sources to see how similar features are
+ implemented, learn to do it "the Docutils way".
+
+* Prepare tests_. Test cases are also examples and showcases for new
+ features.
+
+* Include documentation.
+
+* For larger changes, consider creating a `feature branch`_ in a
+ Docutils repository_ checkout. [#]_
+
+* Mail your patch to the Docutils-develop_ mailing list or attach it to the
+ relevant ticket at Docutils' `bug tracker`_ or `feature request tracker`_.
+ We accept patches created with diff, SVN, or Git.
+
+The developers will make sure that contributions fit nicely into Docutils.
+This might involve discussing (and compromising on) design and
+implementation details. It might also lead to the conclusion that the
+addition fits better in the `extensions and related projects`_.
+
+.. [#] Working with branches is much easier with Git_. You can get a Git
+ clone of the repository from http://repo.or.cz/w/docutils.git or with
+ git-svn.
+
+.. _Python coding conventions: docs/dev/policies.html#python-coding-conventions
+.. _documentation conventions: docs/dev/policies.html#documentation-conventions
+.. _tests: docs/dev/testing.html
+.. _supported Python versions: README.html#requirements
+.. _feature branch: docs/dev/policies.html#feature-branch
+.. _Git: http://git-scm.com/
+.. _bug tracker: http://sourceforge.net/p/docutils/bugs/
+
+
..
Local Variables:
Modified: trunk/docutils/docs/dev/policies.txt
===================================================================
--- trunk/docutils/docs/dev/policies.txt 2021-11-19 12:46:38 UTC (rev 8897)
+++ trunk/docutils/docs/dev/policies.txt 2021-11-19 12:47:00 UTC (rev 8898)
@@ -48,72 +48,6 @@
http://www.catb.org/~esr/writings/magic-cauldron/
-How to get a new feature into Docutils
-========================================
-
-Question:
- I would very much like to have this new feature in the Docutils core.
- What exactly do I have to do to make this possible?
-
-* Present your idea at the Docutils-develop_ mailing list,
-
- +1 usually triggers a fast response,
- -1 may be forgotten later,
-
- and/or file a ticket at Docutils' `feature request tracker`_.
-
- +1 there is a permanent record,
- -1 it may stay forgotten among all the other feature requests.
-
-* Convince a Docutils developer that this is a valuable addition worth the
- effort.
-
-* Contribute. The developers will make sure that the contribution fits
- nicely into Docutils (cf. the `review criteria`_). This might involve
- discussing (and compromising on) design and implementation details. It
- might also lead to the conclusion that the addition fits better in the
- `extensions and related projects`_.
-
-* Be patient, and be persistent. None of us are paid to do this,
- it's all in our spare time -- which is precious and rare.
-
-How to make code contributions that are easily accepted
--------------------------------------------------------
-
-* Have a look at the `Python coding conventions`_ and `documentation
- conventions`_ below.
-
-* **Prepare test cases.** This vastly helps when integrating new code. Test
- cases are also examples and showcases for new features. See `Docutils
- Testing`_ for a description of the test suite in ``docutils/test/``.
-
- Ensure the addition works with all `supported Python versions`__.
-
- __ ../../README.html#requirements
-
-* Look at the Docutils sources to see how similar features are implemented,
- learn to do it "the Docutils way".
-
-* Prepare a patch or an addition to the existing documentation.
- Include links.
-
-* If you are familiar with version control, consider creating a `feature
- branch`_ in a Docutils repository_ checkout. (Working with branches is
- *much* easier with Git_. You can get a Git clone of the repository from
- http://repo.or.cz/w/docutils.git or with git-svn.)
-
-* Mail your patch to the Docutils-develop_ mailing list or attach it to the
- relevant ticket at Docutils' `feature request tracker`_.
-
- We accept patches created with diff, SVN, or Git.
-
-.. _docutils-develop: ../user/mailing-lists.html#docutils-develop
-.. _feature request tracker:
- http://sourceforge.net/p/docutils/feature-requests/
-.. _git: http://git-scm.com/
-.. _Docutils testing: testing.html
-
-
Python Coding Conventions
=========================
@@ -213,7 +147,9 @@
========================
The majority of the Docutils project code and documentation has been
-placed in the public domain. Unless clearly and explicitly indicated
+placed in the public domain (see `Copying Docutils`_).
+
+Unless clearly and explicitly indicated
otherwise, any patches (modifications to existing files) submitted to
the project for inclusion (via Subversion, SourceForge trackers,
mailing lists, or private email) are assumed to be in the public
@@ -232,37 +168,17 @@
The license should be well known, simple and compatible with other
open source software licenses. To keep the number of different
licenses at a minimum, using the `2-Clause BSD license`_
- is recommended.
+ (`local copy`__) is recommended.
-2-Clause BSD license
---------------------
+ .. Rationale:
+ + clear wording, structured text
+ + license used by the closely related Sphinx project
-(also known as "Simplified" or `FreeBSD license`)
+.. _Copying Docutils: ../../COPYING.html
+.. _2-Clause BSD license: http://opensource.org/licenses/BSD-2-Clause
+__ ../../licenses/BSD-2-Clause.txt
- If you want a simple, permissive non-copyleft free software license, the
- FreeBSD license is a reasonable choice. However, please don't call it a
- “BSD” or “BSD-style” license, because that is likely to cause confusion
- which could lead to use of the flawed original BSD license.
- -- `Various Licenses and Comments about Them`_
-
-Pros:
- * clear wording, structured text
- * license used by the closely related Sphinx project
- * "2-Clause BSD license" is a non-ambiguous name, used by both, OSI and
- GNU.
-
-References:
- * https://www.freebsd.org/copyright/freebsd-license.html
- * https://opensource.org/licenses/BSD-2-Clause
- * https://spdx.org/licenses/BSD-2-Clause.html
-
-.. _Various Licenses and Comments about Them:
- https://www.gnu.org/licenses/license-list.html
-.. _OSI Approved Licenses: https://www.opensource.org/licenses/category
-.. _SPDX Open Source License Registry: https://www.spdx.org/licenses/
-
-
.. _Subversion Repository:
Repository
@@ -341,7 +257,9 @@
& brains sees the code before it enters the core. In addition to the
above, the general `Check-ins`_ policy (below) also applies.
+.. _Docutils testing: testing.html
+
Check-ins
---------
@@ -789,6 +707,7 @@
the Docutils-develop_ mailing list.
.. _link list: http://docutils.sourceforge.net/docs/user/links.html
+.. _docutils-develop: docs/user/mailing-lists.html#docutils-develop
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2021-11-23 17:44:16
|
Revision: 8900
http://sourceforge.net/p/docutils/code/8900
Author: grubert
Date: 2021-11-23 17:44:14 +0000 (Tue, 23 Nov 2021)
Log Message:
-----------
Release 0.18.1
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/README.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/__init__.py
trunk/docutils/setup.py
trunk/docutils/test/functional/expected/compact_lists.html
trunk/docutils/test/functional/expected/dangerous.html
trunk/docutils/test/functional/expected/embed_images_html5.html
trunk/docutils/test/functional/expected/field_name_limit.html
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/math_output_html.html
trunk/docutils/test/functional/expected/math_output_latex.html
trunk/docutils/test/functional/expected/math_output_mathjax.html
trunk/docutils/test/functional/expected/math_output_mathml.html
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/misc_rst_html5.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/HISTORY.txt 2021-11-23 17:44:14 UTC (rev 8900)
@@ -11,8 +11,8 @@
.. contents::
-Release 0.18.1 (in preparation)
-===============================
+Release 0.18.1
+==============
* docutils/nodes.py
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/README.txt 2021-11-23 17:44:14 UTC (rev 8900)
@@ -1,6 +1,6 @@
-===============================
- README: Docutils 0.18.1b1.dev
-===============================
+=========================
+ README: Docutils 0.18.1
+=========================
:Author: David Goodger
:Contact: go...@py...
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/RELEASE-NOTES.txt 2021-11-23 17:44:14 UTC (rev 8900)
@@ -83,8 +83,8 @@
.. _use_latex_citations: docs/user/config.html#use-latex-citations
-Release 0.18.1b0
-================
+Release 0.18.1
+==============
.. Note::
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/docutils/__init__.py 2021-11-23 17:44:14 UTC (rev 8900)
@@ -56,7 +56,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.18.1b1.dev'
+__version__ = '0.18.1'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -113,10 +113,10 @@
major=0,
minor=18,
micro=1,
- releaselevel='beta', # one of 'alpha', 'beta', 'candidate', 'final'
+ releaselevel='final', # one of 'alpha', 'beta', 'candidate', 'final'
# pre-release serial number (0 for final releases and active development):
- serial=1,
- release=False # True for official releases and pre-releases
+ serial=0,
+ release=True # True for official releases and pre-releases
)
"""Comprehensive version information tuple. See 'Version Numbering' in
docs/dev/policies.txt."""
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/setup.py 2021-11-23 17:44:14 UTC (rev 8900)
@@ -31,7 +31,7 @@
input Docutils supports reStructuredText, an easy-to-read,
what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
'url': 'http://docutils.sourceforge.net/',
- 'version': '0.18.1b1.dev',
+ 'version': '0.18.1',
'author': 'David Goodger',
'author_email': 'go...@py...',
'maintainer': 'docutils-develop list',
Modified: trunk/docutils/test/functional/expected/compact_lists.html
===================================================================
--- trunk/docutils/test/functional/expected/compact_lists.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>compact_lists.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/dangerous.html
===================================================================
--- trunk/docutils/test/functional/expected/dangerous.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/dangerous.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>dangerous.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/embed_images_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/embed_images_html5.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/embed_images_html5.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>Embedded Images</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>field_list.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/responsive.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
<link rel="stylesheet" href="../input/data/math.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_latex.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_latex.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/math_output_mathjax.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathjax.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML"></script>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/math_output_mathml.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>Additional tests with html4css1</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html5.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/misc_rst_html5.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>Additional tests with HTML 5</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/responsive.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/pep_html.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+ <meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>PEP 100 -- Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2021-11-23 17:44:14 UTC (rev 8900)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd">
-<!-- Generated by Docutils 0.18.1b1.dev -->
+<!-- Generated by Docutils 0.18.1 -->
<document ids="restructuredtext-test-document doctitle" names="restructuredtext\ test\ document doctitle" source="functional/input/standalone_rst_docutils_xml.txt" title="reStructuredText Test Document">
<title>reStructuredText Test Document</title>
<subtitle ids="examples-of-syntax-constructs subtitle" names="examples\ of\ syntax\ constructs subtitle">Examples of Syntax Constructs</subtitle>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" xml:lang="en" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2021-11-21 16:56:06 UTC (rev 8899)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2021-11-23 17:44:14 UTC (rev 8900)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1b1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2021-11-23 18:10:15
|
Revision: 8903
http://sourceforge.net/p/docutils/code/8903
Author: grubert
Date: 2021-11-23 18:10:13 +0000 (Tue, 23 Nov 2021)
Log Message:
-----------
version 0.18.2b0
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/README.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/__init__.py
trunk/docutils/setup.py
trunk/docutils/test/functional/expected/compact_lists.html
trunk/docutils/test/functional/expected/dangerous.html
trunk/docutils/test/functional/expected/embed_images_html5.html
trunk/docutils/test/functional/expected/field_name_limit.html
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/math_output_html.html
trunk/docutils/test/functional/expected/math_output_latex.html
trunk/docutils/test/functional/expected/math_output_mathjax.html
trunk/docutils/test/functional/expected/math_output_mathml.html
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/misc_rst_html5.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/HISTORY.txt 2021-11-23 18:10:13 UTC (rev 8903)
@@ -11,6 +11,11 @@
.. contents::
+Changes Since 0.18.1
+====================
+
+.
+
Release 0.18.1
==============
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/README.txt 2021-11-23 18:10:13 UTC (rev 8903)
@@ -1,6 +1,6 @@
-=========================
- README: Docutils 0.18.1
-=========================
+==============================
+ README: Docutils 0.18.2b.dev
+==============================
:Author: David Goodger
:Contact: go...@py...
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/RELEASE-NOTES.txt 2021-11-23 18:10:13 UTC (rev 8903)
@@ -82,7 +82,11 @@
.. _literal_block_env: docs/user/config.html#literal-block-env
.. _use_latex_citations: docs/user/config.html#use-latex-citations
+Changes Since 0.18.1
+====================
+.
+
Release 0.18.1
==============
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/docutils/__init__.py 2021-11-23 18:10:13 UTC (rev 8903)
@@ -56,7 +56,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.18.1'
+__version__ = '0.18.2b.dev'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -112,11 +112,11 @@
__version_info__ = VersionInfo(
major=0,
minor=18,
- micro=1,
- releaselevel='final', # one of 'alpha', 'beta', 'candidate', 'final'
+ micro=2,
+ releaselevel='beta', # one of 'alpha', 'beta', 'candidate', 'final'
# pre-release serial number (0 for final releases and active development):
serial=0,
- release=True # True for official releases and pre-releases
+ release=False # True for official releases and pre-releases
)
"""Comprehensive version information tuple. See 'Version Numbering' in
docs/dev/policies.txt."""
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/setup.py 2021-11-23 18:10:13 UTC (rev 8903)
@@ -31,7 +31,7 @@
input Docutils supports reStructuredText, an easy-to-read,
what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
'url': 'http://docutils.sourceforge.net/',
- 'version': '0.18.1',
+ 'version': '0.18.2b.dev',
'author': 'David Goodger',
'author_email': 'go...@py...',
'maintainer': 'docutils-develop list',
Modified: trunk/docutils/test/functional/expected/compact_lists.html
===================================================================
--- trunk/docutils/test/functional/expected/compact_lists.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<title>compact_lists.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/dangerous.html
===================================================================
--- trunk/docutils/test/functional/expected/dangerous.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/dangerous.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<title>dangerous.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/embed_images_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/embed_images_html5.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/embed_images_html5.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<title>Embedded Images</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<title>field_list.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/responsive.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
<link rel="stylesheet" href="../input/data/math.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_latex.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_latex.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/math_output_mathjax.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathjax.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML"></script>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/math_output_mathml.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<title>Additional tests with html4css1</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html5.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/misc_rst_html5.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<title>Additional tests with HTML 5</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/responsive.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/pep_html.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+ <meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<title>PEP 100 -- Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2021-11-23 18:10:13 UTC (rev 8903)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd">
-<!-- Generated by Docutils 0.18.1 -->
+<!-- Generated by Docutils 0.18.2b.dev -->
<document ids="restructuredtext-test-document doctitle" names="restructuredtext\ test\ document doctitle" source="functional/input/standalone_rst_docutils_xml.txt" title="reStructuredText Test Document">
<title>reStructuredText Test Document</title>
<subtitle ids="examples-of-syntax-constructs subtitle" names="examples\ of\ syntax\ constructs subtitle">Examples of Syntax Constructs</subtitle>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" xml:lang="en" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2021-11-23 18:02:19 UTC (rev 8902)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2021-11-23 18:10:13 UTC (rev 8903)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2021-11-27 16:28:15
|
Revision: 8906
http://sourceforge.net/p/docutils/code/8906
Author: milde
Date: 2021-11-27 16:28:12 +0000 (Sat, 27 Nov 2021)
Log Message:
-----------
Revise/Update the `Running the Test Suite` documentation.
Modified Paths:
--------------
trunk/docutils/README.txt
trunk/docutils/docs/dev/testing.txt
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2021-11-23 20:18:51 UTC (rev 8905)
+++ trunk/docutils/README.txt 2021-11-27 16:28:12 UTC (rev 8906)
@@ -75,7 +75,8 @@
To run the code, Python_ must be installed.
-* Docutils 0.16 and later supports Python 2.7 and 3.5+ natively. [#2to3]_
+* Docutils 1.0 will require Python 3.7 or later.
+* Docutils 0.16 to 0.18 require Python 2.7 or 3.5+.
* Docutils 0.14 dropped Python 2.4, 2.5, 3.1 and 3.2 support.
* Docutils 0.10 dropped Python 2.3 support.
* From version 0.6, Docutils is compatible with Python 3. [#2to3]_
Modified: trunk/docutils/docs/dev/testing.txt
===================================================================
--- trunk/docutils/docs/dev/testing.txt 2021-11-23 20:18:51 UTC (rev 8905)
+++ trunk/docutils/docs/dev/testing.txt 2021-11-27 16:28:12 UTC (rev 8906)
@@ -3,7 +3,8 @@
===================
:Authors: Lea Wiemann <LeW...@gm...>;
- David Goodger <go...@py...>
+ David Goodger <go...@py...>;
+ Docutils developers <doc...@li...>
:Revision: $Revision$
:Date: $Date$
:Copyright: This document has been placed in the public domain.
@@ -24,59 +25,47 @@
======================
Before checking in any changes, run the entire Docutils test suite to
-be sure that you haven't broken anything. From a shell::
+be sure that you haven't broken anything. From a shell do [#]_::
cd docutils/test
- ./alltests.py
+ python -u alltests.py
-You should run this with multiple Python versions. You can use ``tox`` for
-this purpose. To run tests against all supported versions of Python, run::
+Before `checking in`__ changes to the Docutils core, run the tests on
+all `supported Python versions`_ (see below for details).
+In a pinch, the edge cases should cover most of it.
- tox
+.. [#] When using the `Python launcher for Windows`__, make sure to
+ specify a Python version, e.g., ``py -3.9 -u alltests.py`` for
+ Python 3.9.
-To run against a specific version of Python, use the ``pyNN`` environment.
-For example::
+ __ https://docs.python.org/3/using/windows.html#python-launcher-for-windows
- tox -e py37
+ .. cf. https://sourceforge.net/p/docutils/bugs/434/
+__ policies.html#check-ins
-Python Versions
-===============
-A docutils release has a commitment to support a minimum version and beyond.
-Before a release is cut, tests must pass in all supported Python versions.
+.. _Python versions:
-Docutils 0.16 supports Python 2.7 and Python 3.5 or later.
+Testing across multiple Python versions
+---------------------------------------
-Therefore, you should install Python 2.7 as well as 3.5 up to the latest Python
-(3.7 at the time of this writing) and always run the tests on all of
-them (see `Testing across multiple python versions`_).
-In a pinch, the edge cases (2.7, and 3.7) should cover most of it.
+A Docutils release has a commitment to support a minimum Python version [#]_
+and beyond. Before a release is cut, tests must pass in all
+`supported versions`_.
-Good resources covering the differences between Python versions:
+You can use `tox`_ to test with all supported versions in one go.
+From the shell::
-* `What's New in Python 2.7`__
-* `What's New in Python 3.5`__
-* `What's New in Python 3.6`__
-* `What's New in Python 3.7`__
-* `PEP 290 - Code Migration and Modernization`__
+ cd docutils
+ tox
-__ https://docs.python.org/whatsnew/2.7.html
-__ https://docs.python.org/3/whatsnew/3.5.html
-__ https://docs.python.org/3/whatsnew/3.6.html
-__ https://docs.python.org/3/whatsnew/3.7.html
-__ http://www.python.org/peps/pep-0290.html
+To test a specific version, use the ``pyNN`` environment. For example::
-.. _Python Check-in Policies: http://www.python.org/dev/tools.html
-.. _sandbox directory:
- http://docutils.svn.sourceforge.net/svnroot/docutils/trunk/sandbox/
+ tox -e py37
-
-Testing across multiple python versions
----------------------------------------
-
`pyenv`_ can be installed and configured (see `installing pyenv`_) to
-test multiple python versions::
+get multiple Python versions::
# assuming your system runs 2.7.x
pyenv install 3.5.7
@@ -88,17 +77,24 @@
rm -rf ~/.pyenv/shims && pyenv rehash
This will give you ``python2.7`` and ``python3.5`` through ``python3.7``.
-You will also get ``pip2.7``, ``pip3.5``, etc.
+Then run::
-To save time, you can use `tox`_. To install tox, run ``pip install tox``.
-Once installed, from shell::
+ python2.7 -u alltests.py
+ [...]
+ python3.7 -u alltests.py
- cd docutils
- tox
+.. [#] Good resources covering the differences between Python versions
+ are the `What's New` documents (`What's New in Python 3.10`__ and
+ similar).
-.. _tox: https://tox.readthedocs.org/en/latest/
+__ https://docs.python.org/3/whatsnew/3.10.html
+
+
+.. _supported versions:
+.. _supported Python versions: ../../README.html#requirements
.. _pyenv: https://github.com/yyuu/pyenv
.. _installing pyenv: https://github.com/yyuu/pyenv#installation
+.. _tox: https://pypi.org/project/tox/
Unit Tests
@@ -277,7 +273,7 @@
.. [#] The validity of `Docutils XML` can be tested with
``xmllint <document-referencing-local-Docutils-DTD>.xml --valid --noout``.
-
+
.. note: the ``--dtdvalid`` and ``--nonet`` options did not help override
a reference to the PUBLIC "docutils.dtd" if there is a local version
on the system (e.g. /usr/share/xml/docutils/docutils.dtd in Debian).
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2021-11-27 21:16:44
|
Revision: 8910
http://sourceforge.net/p/docutils/code/8910
Author: grubert
Date: 2021-11-27 21:16:41 +0000 (Sat, 27 Nov 2021)
Log Message:
-----------
Change test/test_parsers/test_rst/test_directives/test_tables.py for python 3.11.0a2 csv modules supports null character.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/test/test_parsers/test_rst/test_directives/test_tables.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2021-11-27 16:28:38 UTC (rev 8909)
+++ trunk/docutils/HISTORY.txt 2021-11-27 21:16:41 UTC (rev 8910)
@@ -14,8 +14,14 @@
Changes Since 0.18.1
====================
-.
+* test/DocutilsTestSupport.py
+ - Function exception_data returns None if no exception was raised.
+
+* test/test_parsers/test_rst/test_directives/test_tables.py
+
+ - Change for python 3.11.0a2 csv modules supports null character.
+
Release 0.18.1
==============
Modified: trunk/docutils/test/test_parsers/test_rst/test_directives/test_tables.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_directives/test_tables.py 2021-11-27 16:28:38 UTC (rev 8909)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_tables.py 2021-11-27 21:16:41 UTC (rev 8910)
@@ -69,60 +69,73 @@
if null_bytes_exception is None:
bad_encoding_result = """\
<document source="test data">
-<document source="test data">
<table>
<title>
- good encoding
- <tgroup cols="3">
- <colspec colwidth="33">
- <colspec colwidth="33">
- <colspec colwidth="33">
- <thead>
+ bad encoding
+ <tgroup cols="4">
+ <colspec colwidth="25">
+ <colspec colwidth="25">
+ <colspec colwidth="25">
+ <colspec colwidth="25">
+ <tbody>
<row>
<entry>
<paragraph>
- Treat
+ \xfe\xff"Treat"
<entry>
<paragraph>
- Quantity
+ "Quantity"
<entry>
<paragraph>
- Description
- <tbody>
+ "Description"
+ <entry>
<row>
<entry>
<paragraph>
- Albatr\u00b0\u00df
+ "Albatr\u00b0\u00df"
<entry>
<paragraph>
2.99
<entry>
<paragraph>
- \u00a1On a \u03c3\u03c4\u03b9\u03ba!
+ "\u00a1Ona\x03\xc3\x03\xc4\x03\xb9\x03\xba!"
+ <entry>
<row>
<entry>
<paragraph>
- Crunchy Frog
+ "CrunchyFrog"
<entry>
<paragraph>
1.49
<entry>
<paragraph>
- If we took the b\u00f6nes out, it wouldn\u2019t be
- crunchy, now would it?
+ "Ifwetooktheb\u00f6nesout
+ <entry>
+ <paragraph>
+ itwouldn\x20\x19tbe
<row>
<entry>
<paragraph>
- Gannet Ripple
+ crunchy
<entry>
<paragraph>
+ nowwouldit?"
+ <entry>
+ <entry>
+ <row>
+ <entry>
+ <paragraph>
+ "GannetRipple"
+ <entry>
+ <paragraph>
1.99
<entry>
<paragraph>
- \u00bfOn a \u03c3\u03c4\u03b9\u03ba?
+ "\xbfOna\x03\xc3\x03\xc4\x03\xb9\x03\xba?"
+ <entry>
<paragraph>
(7- and 8-bit text encoded as UTF-16 has lots of null/zero bytes.)
-""" % (null_bytes_exception, utf_16_csv)
+"""
else:
bad_encoding_result = """\
<document source="test data">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2021-12-01 16:35:16
|
Revision: 8911
http://sourceforge.net/p/docutils/code/8911
Author: milde
Date: 2021-12-01 16:35:13 +0000 (Wed, 01 Dec 2021)
Log Message:
-----------
Documentation update
Mark html5_polyglot/responsive.css as "provisional".
Document removal of ``nodes.Text.rawsource`` attribute
(fixes bug #437).
Clarify language and structure of the release notes.
Modified Paths:
--------------
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/writers/html5_polyglot/responsive.css
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2021-11-27 21:16:41 UTC (rev 8910)
+++ trunk/docutils/RELEASE-NOTES.txt 2021-12-01 16:35:13 UTC (rev 8911)
@@ -31,7 +31,7 @@
``[role="doc-noteref"]`` instead of ``.footnote-reference``
(see minimal.css for examples).
- - Remove option "embed_images" (obsoleted by "image_loading_").
+ - Remove option ``--embed-images`` (obsoleted by "image_loading_").
.. _image_loading: docs/user/config.html#image-loading
@@ -51,9 +51,8 @@
- Remove ``use_verbatim_when_possible`` setting
(use literal_block_env_: verbatim).
-* Remove the "rawsource" attribute and argument from nodes.Text:
- we store the null-escaped text in Text nodes since 0.16 so there is no
- additional information in the rawsource.
+* Remove the "rawsource" argument from nodes.Text.__init__()
+ (deprecated and ignored since Docutils 0.18).
* Move math format conversion from docutils/utils/math (called from
docutils/writers/_html_base.py) to a transform__.
@@ -70,11 +69,9 @@
stability of the generated HTML code, e.g. because you use a custom
style sheet or post-processing that may break otherwise.
-* Remove the "html_writer" option of the ``buildhtml.py`` application
- (obsoleted by "writer__").
+* Remove the ``--html-writer`` option of the ``buildhtml.py`` application
+ (obsoleted by the `"writer" option`_).
- __ docs/user/config.html#writer
-
.. _old-format configuration files:
docs/user/config.html#old-format-configuration-files
.. _rst2html.py: docs/user/tools.html#rst2html-py
@@ -87,16 +84,21 @@
.
-Release 0.18.1
-==============
+Release 0.18.1 (2021-12-23)
+===========================
.. Note::
Docutils 0.18.x is the last version supporting Python 2.7, 3.5, and 3.6.
-* nodes.Node.traverse() returns a list again to restore
- backwards compatibility (fixes bug #431).
+* nodes.Node.traverse() returns a list again to restore backwards
+ compatibility (fixes bug #431).
+ Use nodes.Node.findall() to get an iterator.
+* re-add module ``parsers.rst.directives.html``
+ (stub, emits deprecation warning and loads
+ "Meta" directive from ist new place at ``parsers.rst.directives.misc``.)
+
* Small bugfixes (see HISTORY_).
@@ -106,57 +108,58 @@
* Output changes:
Identifiers:
- During `identifier normalization`_, leading number and hyphen
- characters are no longer stripped from a `reference name`_, if the
- id_prefix_ setting is non-empty.
+ - During `identifier normalization`_, leading number and hyphen
+ characters are no longer stripped from a `reference name`_, if the
+ id_prefix_ setting is non-empty.
- Example:
- with ``--id-prefix="DU-"``, a section with title "34. May"
- currently gets the identifier key ``DU-may`` and after the
- change the identifier key ``DU-34-may``.
+ Example:
+ with ``--id-prefix="DU-"``, a section with title "34. May"
+ currently gets the identifier key ``DU-may`` and after the
+ change the identifier key ``DU-34-may``.
+
+ - The default value for the auto_id_prefix_ setting changed to ``%``:
+ "use the tag name as prefix for auto-generated IDs".
+ Set auto_id_prefix_ to ``id`` for unchanged auto-IDs.
- The default value for the auto_id_prefix_ setting changed to ``%``:
- "use the tag name as prefix for auto-generated IDs".
- Set auto_id_prefix_ to ``id`` for unchanged auto-IDs.
-
HTML5:
- Use the semantic tag <aside> for footnote text and citations, topics
- (except abstract and toc), admonitions, and system messages.
- Use <nav> for the Table of Contents.
+ - Use the semantic tag <aside> for footnote text and citations, topics
+ (except abstract and toc), admonitions, and system messages.
+ Use <nav> for the Table of Contents.
+
+ - Make "auto" table column widths the default: Only specify column
+ widths, if the `"widths" option`_ is set and not "auto".
+ The table-style__ setting "colwidths-grid" restores the current default.
+
+ .. _"widths" option: __ docs/ref/rst/directives.html#table
+ __ docs/user/config.html#table-style
+
+ - Items of a definition list with class argument "details" are
+ converted to `details disclosure elements`_. Example::
+
+ ..class:: details
+
+ Summary
+ This additional information should be hidden.
+
+ - Do not add "compound-first", "compound-middle", or "compound-last" to
+ elements nested in a compound. Use child selector and ":first-child",
+ ":last-child" pseudo classes instead.
+
+ - Use class value "backrefs" instead of "fn-backref" for a span of
+ back-references.
+
+ - Write footnote brackets and field term colons to HTML, so that they
+ are present also without CSS and when copying text.
+
+ - Move space character between section number and heading into
+ "sectnum" span.
- Make "auto" table column widths the default: Only specify column
- widths, if the `"widths" option`_ is set and not "auto".
- The table-style__ setting "colwidths-grid" restores the current default.
+ `math-output`_: html
+ - Support more commands, fix mapping of commands to Unicode characters.
+ - Scale variable sized operators and big delimiters with CSS.
+ - Don't use <tt> element (deprecated in HTML5).
+ - Use STIX fonts if available.
- .. _"widths" option: __ docs/ref/rst/directives.html#table
- __ docs/user/config.html#table-style
-
- Items of a definition list with class argument "details" are
- converted to `details disclosure elements`_. Example::
-
- ..class:: details
-
- Summary
- This additional information should be hidden.
-
- Do not add "compound-first", "compound-middle", or "compound-last" to
- elements nested in a compound. Use child selector and ":first-child",
- ":last-child" pseudo classes instead.
- Use class value "backrefs" instead of "fn-backref" for a span of
- back-references.
-
- Write footnote brackets and field term colons to HTML, so that they
- are present also without CSS and when copying text.
-
- Move space character between section number and heading into
- "sectnum" span.
-
- math-output: html
- Support more commands, fix mapping of commands to Unicode characters.
- Scale variable sized operators and big delimiters with CSS.
- Don't use <tt> element (deprecated in HTML5).
- Use STIX fonts if available.
-
LaTeX:
`legacy_class_functions`_ setting default changed to "False",
admonitions are now environments.
@@ -164,8 +167,9 @@
* New standard Docutils doctree node: <meta__>.
* New configuration settings:
- [latex writers] legacy_column_widths_ and
- [html5 writer] image_loading_.
+
+ - [latex writers] legacy_column_widths_ and
+ - [html5 writer] image_loading_.
* Removed files:
``iepngfix.htc`` and ``blank.gif`` (IE 6 workaround for `s5_html`).
@@ -172,20 +176,25 @@
* Removed sub-module:
``parsers.rst.directives.html``
- (Meta directive moved to ``parsers.rst.directives.misc``.)
+ (reversed in release 0.18.1).
* Removed function: utils.unique_combinations()
(obsoleted by itertools.combinations()).
-* Removed attribute: ``HTMLTranslator.topic_classes``
- (check node.parent.classes instead).
-
+* Removed attributes:
+
+ - ``HTMLTranslator.topic_classes``: check ``node.parent.classes`` instead.
+ - ``nodes.Text.rawsource``: we store the null-escaped text in Text
+ nodes since 0.16 so there is no additional information in the
+ rawsource.
+
* Major refactoring and fixes/additions in
``docutils/utils/math/math2html.py`` and
``docutils/utils/math/latex2mathml.py``
(mathematical notation in HTML, cf. `LaTeX syntax for mathematics`_).
-* nodes.Node.traverse() returns an iterator instead of a list.
+* nodes.Node.traverse() returns an iterator instead of a list
+ (reversed in release 0.18.1).
* Various bugfixes and improvements (see HISTORY_).
@@ -308,14 +317,16 @@
* tools/buildhtml.py
- - New option "--html-writer" allows to select "html__" (default),
- "html4" or "html5".
+ - New option ``--html-writer`` allows to select "html" (default),
+ "html4" or "html5" (deprecated in favour of the `"writer" option`_
+ in release 0.18).
- __ html: docs/user/html.html#html
+ .. _"writer" option:
+ docs/user/config.html#writer-buildhtml-application
* docutils/io.py
- - Remove the `handle_io_errors` option from io.FileInput/Output.
+ - Remove the `handle_io_errors` argument from io.FileInput/Output.
* docutils/nodes.py
@@ -503,7 +514,7 @@
* docutils/io.py
- FileInput/FileOutput: no system-exit on IOError.
- The `handle_io_errors` option is ignored.
+ The `handle_io_errors` argument is ignored.
* docutils/writers/html4css1/__init__.py
Modified: trunk/docutils/docutils/writers/html5_polyglot/responsive.css
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/responsive.css 2021-11-27 21:16:41 UTC (rev 8910)
+++ trunk/docutils/docutils/writers/html5_polyglot/responsive.css 2021-12-01 16:35:13 UTC (rev 8911)
@@ -1,4 +1,4 @@
-/* CSS3_ style sheet for the output of Docutils HTML writers. */
+/* CSS3_ style sheet for the output of Docutils HTML5 writer. */
/* Generic responsive design for all screen sizes. */
/* */
/* :Author: Günter Milde */
@@ -17,7 +17,12 @@
/* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */
/* .. _CSS3: http://www.w3.org/TR/CSS3 */
+/* Note: */
+/* This style sheet is provisional: */
+/* the API is not settled and may change with any minor Docutils version. */
+
+
/* General Settings */
/* ================ */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2021-12-23 14:54:29
|
Revision: 8912
http://sourceforge.net/p/docutils/code/8912
Author: milde
Date: 2021-12-23 14:54:26 +0000 (Thu, 23 Dec 2021)
Log Message:
-----------
Small documentation updates and fixes.
Also change the priority of the SmartQuotes transform
to a level not already in use.
Modified Paths:
--------------
trunk/docutils/docs/dev/todo.txt
trunk/docutils/docs/ref/transforms.txt
trunk/docutils/docs/user/config.txt
trunk/docutils/docutils/transforms/universal.py
Modified: trunk/docutils/docs/dev/todo.txt
===================================================================
--- trunk/docutils/docs/dev/todo.txt 2021-12-01 16:35:13 UTC (rev 8911)
+++ trunk/docutils/docs/dev/todo.txt 2021-12-23 14:54:26 UTC (rev 8912)
@@ -1563,6 +1563,7 @@
* TtH_ (C)
* Hevea_ (Objective Caml)
* `MathJax for Node`_
+ * KaTeX_
__ http://www.cs.tut.fi/~jkorpela/math/
__ http://www.zipcon.net/~swhite/docs/math/math.html
@@ -1569,6 +1570,7 @@
.. _elyxer: http://elyxer.nongnu.org/
.. _TtH: ttp://hutchinson.belmont.ma.us/tth/index.html
.. _Hevea: http://para.inria.fr/~maranget/hevea/
+ .. _KaTeX: https://katex.org
images
(PNG or SVG) like e.g. Wikipedia.
Modified: trunk/docutils/docs/ref/transforms.txt
===================================================================
--- trunk/docutils/docs/ref/transforms.txt 2021-12-01 16:35:13 UTC (rev 8911)
+++ trunk/docutils/docs/ref/transforms.txt 2021-12-23 14:54:26 UTC (rev 8912)
@@ -102,15 +102,15 @@
references.DanglingReferences standalone (r), pep (r) 850
+universal.SmartQuotes Parser 855
+
universal.Messages Writer (w) 860
universal.FilterMessages Writer (w) 870
-universal.SmartQuotes Parser 850
-
universal.TestMessages DocutilsTestSupport 880
-writer_aux.Compound newlatex2e (w) 910
+writer_aux.Compound *not used, to be removed* 910
writer_aux.Admonitions html4css1 (w), 920
latex2e (w)
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2021-12-01 16:35:13 UTC (rev 8911)
+++ trunk/docutils/docs/user/config.txt 2021-12-23 14:54:26 UTC (rev 8912)
@@ -812,13 +812,28 @@
The footnote space is trimmed if the reference style is "superscript",
and it is left if the reference style is "brackets".
-[markdown parser]
------------------
+[recommonmark parser]
+---------------------
Experimental, based on recommonmark_.
+Currently no configuration settings.
.. _recommonmark: https://pypi.org/project/recommonmark/
+[myst parser]
+-------------
+
+Provided by the 3rd party package `myst-docutils`_.
+See `MyST with Docutils`_ and its `Sphinx configuration options`_
+(some settings are not available with Docutils).
+
+.. _myst-docutils: https://pypi.org/project/myst-docutils/
+.. _MyST with Docutils:
+ https://myst-parser.readthedocs.io/en/latest/docutils.html
+.. _Sphinx configuration options:
+ https://myst-parser.readthedocs.io/en/latest/sphinx/reference.html#sphinx-config-options
+
+
[readers]
=========
@@ -954,8 +969,8 @@
compact_lists
~~~~~~~~~~~~~
-Remove extra vertical whitespace between items of bullet lists and
-enumerated lists, when list items are all "simple" (i.e., items
+Remove extra vertical whitespace between items of `bullet lists`_ and
+`enumerated lists`_, when list items are all "simple" (i.e., items
each contain one paragraph and/or one "simple" sub-list only). The
behaviour can be specified directly via "class" attributes (values
"compact" and "open") in the document.
@@ -2140,7 +2155,7 @@
parser
~~~~~~
-Parser component name. One of "markdown", "recommonmark", or "rst"
+Parser component name.
Default: "rst".
Option: ``--parser``
@@ -2272,6 +2287,7 @@
../ref/rst/restructuredtext.html#bibliographic-fields
.. _block quote: ../ref/rst/restructuredtext.html#block-quotes
.. _citations: ../ref/rst/restructuredtext.html#citations
+.. _bullet lists: ../ref/rst/restructuredtext.html#bullet-lists
.. _enumerated lists: ../ref/rst/restructuredtext.html#enumerated-lists
.. _field lists: ../ref/rst/restructuredtext.html#field-lists
.. _field names: ../ref/rst/restructuredtext.html#field-names
Modified: trunk/docutils/docutils/transforms/universal.py
===================================================================
--- trunk/docutils/docutils/transforms/universal.py 2021-12-01 16:35:13 UTC (rev 8911)
+++ trunk/docutils/docutils/transforms/universal.py 2021-12-23 14:54:26 UTC (rev 8912)
@@ -140,6 +140,12 @@
self.document += section
+# TODO: fix bug #435:
+
+# Messages are filtered at a very late stage
+# This breaks the link from inline error messages to the corresponding
+# system message at the end of document.
+
class FilterMessages(Transform):
"""
@@ -231,7 +237,7 @@
Also replace multiple dashes with em-dash/en-dash characters.
"""
- default_priority = 850
+ default_priority = 855
nodes_to_skip = (nodes.FixedTextElement, nodes.Special)
"""Do not apply "smartquotes" to instances of these block-level nodes."""
@@ -239,7 +245,7 @@
literal_nodes = (nodes.FixedTextElement, nodes.Special,
nodes.image, nodes.literal, nodes.math,
nodes.raw, nodes.problematic)
- """Do apply smartquotes to instances of these inline nodes."""
+ """Do not apply smartquotes to instances of these inline nodes."""
smartquotes_action = 'qDe'
"""Setting to select smartquote transformations.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2021-12-23 14:54:54
|
Revision: 8914
http://sourceforge.net/p/docutils/code/8914
Author: milde
Date: 2021-12-23 14:54:51 +0000 (Thu, 23 Dec 2021)
Log Message:
-----------
Set version to 0.19b.dev.
Leaving the 0.18 maintenance mode.
Note: We may skip 0.19 if the next release is "1.0-ready"
(depending on consensus on backwards compatibility policy and
definition/documentation of the public part of the API).
Modified Paths:
--------------
trunk/docutils/README.txt
trunk/docutils/docutils/__init__.py
trunk/docutils/setup.py
trunk/docutils/test/functional/expected/compact_lists.html
trunk/docutils/test/functional/expected/dangerous.html
trunk/docutils/test/functional/expected/embed_images_html5.html
trunk/docutils/test/functional/expected/field_name_limit.html
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/math_output_html.html
trunk/docutils/test/functional/expected/math_output_latex.html
trunk/docutils/test/functional/expected/math_output_mathjax.html
trunk/docutils/test/functional/expected/math_output_mathml.html
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/misc_rst_html5.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/README.txt 2021-12-23 14:54:51 UTC (rev 8914)
@@ -1,5 +1,5 @@
==============================
- README: Docutils 0.18.2b.dev
+ README: Docutils 0.19b.dev
==============================
:Author: David Goodger
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/docutils/__init__.py 2021-12-23 14:54:51 UTC (rev 8914)
@@ -56,7 +56,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.18.2b.dev'
+__version__ = '0.19b.dev'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -111,8 +111,8 @@
__version_info__ = VersionInfo(
major=0,
- minor=18,
- micro=2,
+ minor=19,
+ micro=0,
releaselevel='beta', # one of 'alpha', 'beta', 'candidate', 'final'
# pre-release serial number (0 for final releases and active development):
serial=0,
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/setup.py 2021-12-23 14:54:51 UTC (rev 8914)
@@ -31,7 +31,7 @@
input Docutils supports reStructuredText, an easy-to-read,
what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
'url': 'http://docutils.sourceforge.net/',
- 'version': '0.18.2b.dev',
+ 'version': '0.19b.dev',
'author': 'David Goodger',
'author_email': 'go...@py...',
'maintainer': 'docutils-develop list',
Modified: trunk/docutils/test/functional/expected/compact_lists.html
===================================================================
--- trunk/docutils/test/functional/expected/compact_lists.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<title>compact_lists.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/dangerous.html
===================================================================
--- trunk/docutils/test/functional/expected/dangerous.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/dangerous.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<title>dangerous.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/embed_images_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/embed_images_html5.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/embed_images_html5.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<title>Embedded Images</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<title>field_list.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/responsive.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
<link rel="stylesheet" href="../input/data/math.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_latex.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_latex.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/math_output_mathjax.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathjax.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML"></script>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/math_output_mathml.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<title>Additional tests with html4css1</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html5.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/misc_rst_html5.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<title>Additional tests with HTML 5</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/responsive.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/pep_html.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+ <meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<title>PEP 100 -- Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2021-12-23 14:54:51 UTC (rev 8914)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd">
-<!-- Generated by Docutils 0.18.2b.dev -->
+<!-- Generated by Docutils 0.19b.dev -->
<document ids="restructuredtext-test-document doctitle" names="restructuredtext\ test\ document doctitle" source="functional/input/standalone_rst_docutils_xml.txt" title="reStructuredText Test Document">
<title>reStructuredText Test Document</title>
<subtitle ids="examples-of-syntax-constructs subtitle" names="examples\ of\ syntax\ constructs subtitle">Examples of Syntax Constructs</subtitle>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" xml:lang="en" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2021-12-23 14:54:35 UTC (rev 8913)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2021-12-23 14:54:51 UTC (rev 8914)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.18.2b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.19b.dev: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2021-12-23 14:55:04
|
Revision: 8915
http://sourceforge.net/p/docutils/code/8915
Author: milde
Date: 2021-12-23 14:55:01 +0000 (Thu, 23 Dec 2021)
Log Message:
-----------
docutils-cli.py: allow drop-in components for reader and parser.
Now also reader and parser may be 3rd party modules:
specify the import name of the module containing the parser.
Fix help output.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docs/user/config.txt
trunk/docutils/tools/docutils-cli.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2021-12-23 14:54:51 UTC (rev 8914)
+++ trunk/docutils/HISTORY.txt 2021-12-23 14:55:01 UTC (rev 8915)
@@ -20,8 +20,14 @@
* test/test_parsers/test_rst/test_directives/test_tables.py
- - Change for python 3.11.0a2 csv modules supports null character.
+ - Fix bug #436: Null char valid in CSV since Python 3.11.
+* tools/docutils-cli.py
+
+ - Allow 3rd-party drop-in components for reader and parser, too.
+ - Fix help output.
+
+
Release 0.18.1
==============
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2021-12-23 14:54:51 UTC (rev 8914)
+++ trunk/docutils/docs/user/config.txt 2021-12-23 14:55:01 UTC (rev 8915)
@@ -2144,11 +2144,14 @@
[docutils-cli application]
--------------------------
-New in 0.18.
+New in 0.17. Config file support added in 0.18.
+Support for reader/parser import names added in 0.19.
reader
~~~~~~
-Reader component name. One of "standalone" or "pep".
+Reader component name.
+One of "standalone", "pep",
+or the import name of a drop-in reader module.
Default: "standalone".
Option: ``--reader``
@@ -2156,6 +2159,8 @@
parser
~~~~~~
Parser component name.
+One of "rst", "markdown", "recommonmark",
+or the import name of a drop-in parser module.
Default: "rst".
Option: ``--parser``
@@ -2164,7 +2169,10 @@
writer
~~~~~~
-Writer component name. One of the valid writer names or aliases.
+Writer component name.
+One of "html", "html4", "html5", "latex", "xelatex", "odt", "xml",
+"pseudoxml", "manpage", "pep_html", "s5", an alias,
+or the import name of a drop-in writer module.
Default: "html5".
Option: ``--writer``
Modified: trunk/docutils/tools/docutils-cli.py
===================================================================
--- trunk/docutils/tools/docutils-cli.py 2021-12-23 14:54:51 UTC (rev 8914)
+++ trunk/docutils/tools/docutils-cli.py 2021-12-23 14:55:01 UTC (rev 8915)
@@ -27,7 +27,6 @@
import sys
from docutils.core import publish_cmdline, default_description
-from docutils.utils import SystemMessage
from docutils.frontend import ConfigParser, OptionParser
config_section = 'docutils-cli application'
@@ -56,7 +55,7 @@
description = u'Generate documents from reStructuredText or Markdown sources.'
-epilog = (u'The availability of some options depends on the selected '
+epilog = (u'Further optional arguments are added by the selected '
u'components, the list below adapts to your selection.'
)
@@ -64,21 +63,22 @@
description=description, epilog=epilog,
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
-parser.add_argument('--reader', choices=('standalone', 'pep'),
- help=u'reader name',
+parser.add_argument('source', nargs='?')
+parser.add_argument('destination', nargs='?')
+parser.add_argument('--reader', help=u'reader name',
default=default_settings['reader'])
-parser.add_argument('--parser', choices=('markdown', 'recommonmark', 'rst'),
- help=u'parser name',
+parser.add_argument('--parser', help=u'parser name',
default=default_settings['parser'])
-parser.add_argument('--writer',
- # choices=('html', 'html4', 'html5', 'latex', 'xelatex',
- # 'odt', 'xml', 'pseudoxml', 'manpage',
- # 'pep_html', 's5_html'),
- help=u'writer name',
+parser.add_argument('--writer', help=u'writer name',
default=default_settings['writer'])
(args, remainder) = parser.parse_known_args()
+# push back positional arguments
+if args.destination:
+ remainder.insert(0, args.destination)
+if args.source:
+ remainder.insert(0, args.source)
if '-h' in sys.argv or '--help' in sys.argv:
print(parser.format_help())
@@ -92,5 +92,8 @@
description=default_description,
argv=remainder)
except ImportError as error:
- print(parser.format_help())
- print('ImportError:', error)
+ print('%s.' % error)
+ if '--traceback' in remainder:
+ raise
+ else:
+ print('Use "--traceback" to show details.')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2021-12-23 14:55:15
|
Revision: 8916
http://sourceforge.net/p/docutils/code/8916
Author: milde
Date: 2021-12-23 14:55:12 +0000 (Thu, 23 Dec 2021)
Log Message:
-----------
More detailled system-message for include directive with missing parser.
The system-message issued when an "include" directive sets
the "parser" option to "markdown", "commonmark" or "recommonmark"
but the upstream parser module is not available
has source/line info now.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/parsers/__init__.py
trunk/docutils/docutils/parsers/recommonmark_wrapper.py
trunk/docutils/docutils/parsers/rst/__init__.py
trunk/docutils/docutils/parsers/rst/directives/__init__.py
trunk/docutils/test/DocutilsTestSupport.py
trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test__init__.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2021-12-23 14:55:01 UTC (rev 8915)
+++ trunk/docutils/HISTORY.txt 2021-12-23 14:55:12 UTC (rev 8916)
@@ -14,9 +14,30 @@
Changes Since 0.18.1
====================
+* docutils/parsers/__init__.py
+
+ - Alias for the "myst" parser (https://pypi.org/project/myst-docutils).
+ - Use absolute module names in ``_parser_aliases`` instead of two
+ import attempts. (Keeps details if the `recommonmark_wrapper.py` module
+ raises an ImportError.)
+ - Prepend parser name to ImportError if importing a parser class fails.
+
+* docutils/parsers/recommonmark_wrapper.py
+
+ - Raise ImportError, if import of the upstream parser module fails.
+ If the parser was called from an `"include" directive`_,
+ the system-message now has source/line info.
+
+ .. _"include" directive: docs/ref/rst/directives.html#include
+
+* docutils/parsers/rst/directives/__init__.py
+
+ - parser_name() keeps details if converting ImportError to ValueError.
+
* test/DocutilsTestSupport.py
- - Function exception_data returns None if no exception was raised.
+ - exception_data() returns None if no exception was raised.
+ - recommonmark_wrapper only imported if upstream parser is present.
* test/test_parsers/test_rst/test_directives/test_tables.py
Modified: trunk/docutils/docutils/parsers/__init__.py
===================================================================
--- trunk/docutils/docutils/parsers/__init__.py 2021-12-23 14:55:01 UTC (rev 8915)
+++ trunk/docutils/docutils/parsers/__init__.py 2021-12-23 14:55:12 UTC (rev 8916)
@@ -64,22 +64,28 @@
self.document.note_parse_message)
-_parser_aliases = {
- 'restructuredtext': 'rst',
- 'rest': 'rst',
- 'restx': 'rst',
- 'rtxt': 'rst',
- 'recommonmark': 'recommonmark_wrapper',
- 'commonmark': 'recommonmark_wrapper',
- 'markdown': 'recommonmark_wrapper'}
+_parser_aliases = {# short names for known parsers
+ 'null': 'docutils.parsers.null',
+ # reStructuredText
+ 'rst': 'docutils.parsers.rst',
+ 'restructuredtext': 'docutils.parsers.rst',
+ 'rest': 'docutils.parsers.rst',
+ 'restx': 'docutils.parsers.rst',
+ 'rtxt': 'docutils.parsers.rst',
+ # 3rd-party Markdown parsers
+ 'recommonmark': 'docutils.parsers.recommonmark_wrapper',
+ 'myst': 'myst_parser.docutils_',
+ # 'myst': 'docutils.parsers.myst_wrapper',
+ # TODO: the following two could be either of the above
+ 'commonmark': 'docutils.parsers.recommonmark_wrapper',
+ 'markdown': 'docutils.parsers.recommonmark_wrapper',
+ }
def get_parser_class(parser_name):
"""Return the Parser class from the `parser_name` module."""
parser_name = parser_name.lower()
- if parser_name in _parser_aliases:
- parser_name = _parser_aliases[parser_name]
try:
- module = import_module('docutils.parsers.'+parser_name)
- except ImportError:
- module = import_module(parser_name)
+ module = import_module(_parser_aliases.get(parser_name, parser_name))
+ except ImportError as err:
+ raise ImportError('Parser "%s" missing. %s' % (parser_name, err))
return module.Parser
Modified: trunk/docutils/docutils/parsers/recommonmark_wrapper.py
===================================================================
--- trunk/docutils/docutils/parsers/recommonmark_wrapper.py 2021-12-23 14:55:01 UTC (rev 8915)
+++ trunk/docutils/docutils/parsers/recommonmark_wrapper.py 2021-12-23 14:55:12 UTC (rev 8916)
@@ -13,7 +13,7 @@
# Revision: $Revision$
# Date: $Date$
"""
-A parser for CommonMark MarkDown text using `recommonmark`__.
+A parser for CommonMark Markdown text using `recommonmark`__.
__ https://pypi.org/project/recommonmark/
@@ -27,15 +27,11 @@
try:
from recommonmark.parser import CommonMarkParser
except ImportError as err:
- CommonMarkParser = None
- class Parser(docutils.parsers.Parser):
- def parse(self, inputstring, document):
- error = document.reporter.warning(
- 'Missing dependency: MarkDown input is processed by a 3rd '
- 'party parser but Python did not find the required module '
- '"recommonmark" (https://pypi.org/project/recommonmark/).')
- document.append(error)
+ missing_dependency_msg = '%s.\nParsing "recommonmark" Markdown flavour ' \
+ 'requires the package https://pypi.org/project/recommonmark' % err
+ raise ImportError(missing_dependency_msg)
+
# recommonmark 0.5.0 introduced a hard dependency on Sphinx
# https://github.com/readthedocs/recommonmark/issues/202
# There is a PR to change this to an optional dependency
@@ -47,117 +43,116 @@
class addnodes(nodes.pending): pass
-if CommonMarkParser:
- class Parser(CommonMarkParser):
- """MarkDown parser based on recommonmark.
-
- This parser is provisional:
- the API is not settled and may change with any minor Docutils version.
+class Parser(CommonMarkParser):
+ """MarkDown parser based on recommonmark.
+
+ This parser is provisional:
+ the API is not settled and may change with any minor Docutils version.
+ """
+ supported = ('recommonmark', 'commonmark', 'markdown', 'md')
+ config_section = 'recommonmark parser'
+ config_section_dependencies = ('parsers',)
+
+ def get_transforms(self):
+ return Component.get_transforms(self) # + [AutoStructify]
+
+ def parse(self, inputstring, document):
+ """Use the upstream parser and clean up afterwards.
"""
- supported = ('recommonmark', 'commonmark', 'markdown', 'md')
- config_section = 'recommonmark parser'
- config_section_dependencies = ('parsers',)
+ # check for exorbitantly long lines
+ for i, line in enumerate(inputstring.split('\n')):
+ if len(line) > document.settings.line_length_limit:
+ error = document.reporter.error(
+ 'Line %d exceeds the line-length-limit.'%(i+1))
+ document.append(error)
+ return
- def get_transforms(self):
- return Component.get_transforms(self) # + [AutoStructify]
+ # pass to upstream parser
+ try:
+ CommonMarkParser.parse(self, inputstring, document)
+ except Exception as err:
+ error = document.reporter.error('Parsing with "recommonmark" '
+ 'returned the error:\n%s'%err)
+ document.append(error)
- def parse(self, inputstring, document):
- """Use the upstream parser and clean up afterwards.
- """
- # check for exorbitantly long lines
- for i, line in enumerate(inputstring.split('\n')):
- if len(line) > document.settings.line_length_limit:
- error = document.reporter.error(
- 'Line %d exceeds the line-length-limit.'%(i+1))
- document.append(error)
- return
+ # Post-Processing
+ # ---------------
- # pass to upstream parser
- try:
- CommonMarkParser.parse(self, inputstring, document)
- except Exception as err:
- error = document.reporter.error('Parsing with "recommonmark" '
- 'returned the error:\n%s'%err)
- document.append(error)
+ # merge adjoining Text nodes:
+ for node in document.findall(nodes.TextElement):
+ children = node.children
+ i = 0
+ while i+1 < len(children):
+ if (isinstance(children[i], nodes.Text)
+ and isinstance(children[i+1], nodes.Text)):
+ children[i] = nodes.Text(children[i]+children.pop(i+1))
+ children[i].parent = node
+ else:
+ i += 1
- # Post-Processing
- # ---------------
+ # add "code" class argument to literal elements (inline and block)
+ for node in document.findall(lambda n: isinstance(n,
+ (nodes.literal, nodes.literal_block))):
+ node['classes'].append('code')
+ # move "language" argument to classes
+ for node in document.findall(nodes.literal_block):
+ if 'language' in node.attributes:
+ node['classes'].append(node['language'])
+ del node['language']
- # merge adjoining Text nodes:
- for node in document.findall(nodes.TextElement):
- children = node.children
- i = 0
- while i+1 < len(children):
- if (isinstance(children[i], nodes.Text)
- and isinstance(children[i+1], nodes.Text)):
- children[i] = nodes.Text(children[i]+children.pop(i+1))
- children[i].parent = node
- else:
- i += 1
+ # remove empty target nodes
+ for node in list(document.findall(nodes.target)):
+ # remove empty name
+ node['names'] = [v for v in node['names'] if v]
+ if node.children or [v for v in node.attributes.values() if v]:
+ continue
+ node.parent.remove(node)
- # add "code" class argument to literal elements (inline and block)
- for node in document.findall(lambda n: isinstance(n,
- (nodes.literal, nodes.literal_block))):
- node['classes'].append('code')
- # move "language" argument to classes
- for node in document.findall(nodes.literal_block):
- if 'language' in node.attributes:
- node['classes'].append(node['language'])
- del node['language']
+ # replace raw nodes if raw is not allowed
+ if not document.settings.raw_enabled:
+ for node in document.findall(nodes.raw):
+ warning = document.reporter.warning('Raw content disabled.')
+ node.parent.replace(node, warning)
- # remove empty target nodes
- for node in list(document.findall(nodes.target)):
- # remove empty name
- node['names'] = [v for v in node['names'] if v]
- if node.children or [v for v in node.attributes.values() if v]:
- continue
- node.parent.remove(node)
+ # fix section nodes
+ for node in document.findall(nodes.section):
+ # remove spurious IDs (first may be from duplicate name)
+ if len(node['ids']) > 1:
+ node['ids'].pop()
+ # fix section levels (recommonmark 0.4.0
+ # later versions silently ignore incompatible levels)
+ if 'level' in node:
+ section_level = self.get_section_level(node)
+ if node['level'] != section_level:
+ warning = document.reporter.warning(
+ 'Title level inconsistent. Changing from %d to %d.'
+ %(node['level'], section_level),
+ nodes.literal_block('', node[0].astext()))
+ node.insert(1, warning)
+ # remove non-standard attribute "level"
+ del node['level']
- # replace raw nodes if raw is not allowed
- if not document.settings.raw_enabled:
- for node in document.findall(nodes.raw):
- warning = document.reporter.warning('Raw content disabled.')
- node.parent.replace(node, warning)
+ # drop pending_xref (Sphinx cross reference extension)
+ for node in document.findall(addnodes.pending_xref):
+ reference = node.children[0]
+ if 'name' not in reference:
+ reference['name'] = nodes.fully_normalize_name(
+ reference.astext())
+ node.parent.replace(node, reference)
- # fix section nodes
- for node in document.findall(nodes.section):
- # remove spurious IDs (first may be from duplicate name)
- if len(node['ids']) > 1:
- node['ids'].pop()
- # fix section levels (recommonmark 0.4.0
- # later versions silently ignore incompatible levels)
- if 'level' in node:
- section_level = self.get_section_level(node)
- if node['level'] != section_level:
- warning = document.reporter.warning(
- 'Title level inconsistent. Changing from %d to %d.'
- %(node['level'], section_level),
- nodes.literal_block('', node[0].astext()))
- node.insert(1, warning)
- # remove non-standard attribute "level"
- del node['level']
-
- # drop pending_xref (Sphinx cross reference extension)
- for node in document.findall(addnodes.pending_xref):
- reference = node.children[0]
- if 'name' not in reference:
- reference['name'] = nodes.fully_normalize_name(
- reference.astext())
- node.parent.replace(node, reference)
+ def get_section_level(self, node):
+ """Auxiliary function for post-processing in self.parse()"""
+ level = 1
+ while True:
+ node = node.parent
+ if isinstance(node, nodes.document):
+ return level
+ if isinstance(node, nodes.section):
+ level += 1
- def get_section_level(self, node):
- """Auxiliary function for post-processing in self.parse()"""
- level = 1
- while True:
- node = node.parent
- if isinstance(node, nodes.document):
- return level
- if isinstance(node, nodes.section):
- level += 1
+ def visit_document(self, node):
+ """Dummy function to prevent spurious warnings.
- def visit_document(self, node):
- """Dummy function to prevent spurious warnings.
-
- cf. https://github.com/readthedocs/recommonmark/issues/177
- """
- pass
+ cf. https://github.com/readthedocs/recommonmark/issues/177
+ """
+ pass
Modified: trunk/docutils/docutils/parsers/rst/__init__.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/__init__.py 2021-12-23 14:55:01 UTC (rev 8915)
+++ trunk/docutils/docutils/parsers/rst/__init__.py 2021-12-23 14:55:12 UTC (rev 8916)
@@ -325,7 +325,7 @@
self.state_machine = state_machine
def run(self):
- raise NotImplementedError('Must override run() is subclass.')
+ raise NotImplementedError('Must override run() in subclass.')
# Directive errors:
Modified: trunk/docutils/docutils/parsers/rst/directives/__init__.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/__init__.py 2021-12-23 14:55:01 UTC (rev 8915)
+++ trunk/docutils/docutils/parsers/rst/directives/__init__.py 2021-12-23 14:55:12 UTC (rev 8916)
@@ -429,10 +429,11 @@
(Directive option conversion function.)
Return `None`, if the argument evaluates to `False`.
+ Raise `ValueError` if importing the parser module fails.
"""
if not argument:
return None
try:
return parsers.get_parser_class(argument)
- except ImportError:
- raise ValueError('Unknown parser name "%s".'%argument)
+ except ImportError as err:
+ raise ValueError(str(err))
Modified: trunk/docutils/test/DocutilsTestSupport.py
===================================================================
--- trunk/docutils/test/DocutilsTestSupport.py 2021-12-23 14:55:01 UTC (rev 8915)
+++ trunk/docutils/test/DocutilsTestSupport.py 2021-12-23 14:55:12 UTC (rev 8916)
@@ -64,7 +64,7 @@
from docutils import frontend, nodes, statemachine, utils
from docutils.utils import urischemes
from docutils.transforms import universal
- from docutils.parsers import rst, recommonmark_wrapper
+ from docutils.parsers import rst
from docutils.parsers.rst import states, tableparser, roles, languages
from docutils.readers import standalone, pep
from docutils.statemachine import StringList, string2lines
@@ -522,11 +522,15 @@
"""Recommonmark-specific parser test case."""
- parser = recommonmark_wrapper.Parser()
+ try:
+ parser_class = docutils.parsers.get_parser_class('recommonmark')
+ parser = parser_class()
+ except ImportError:
+ parser_class = None
+ # recommonmark_wrapper.Parser
"""Parser shared by all RecommonmarkParserTestCases."""
- option_parser = frontend.OptionParser(
- components=(recommonmark_wrapper.Parser,))
+ option_parser = frontend.OptionParser(components=(parser_class,))
settings = option_parser.get_default_values()
settings.report_level = 5
settings.halt_level = 5
@@ -540,7 +544,7 @@
test_case_class = RecommonmarkParserTestCase
def generateTests(self, dict, dictname='totest'):
- if 'recommonmark' not in recommonmark_wrapper.Parser.supported:
+ if not RecommonmarkParserTestCase.parser_class:
return
# TODO: currently the tests are too version-specific
import recommonmark
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py 2021-12-23 14:55:01 UTC (rev 8915)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py 2021-12-23 14:55:12 UTC (rev 8916)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
# -*- coding: utf8 -*-
# :Copyright: © 2020 Günter Milde.
# :License: Released under the terms of the `2-Clause BSD license`_, in short:
@@ -23,7 +23,6 @@
from test_parsers import DocutilsTestSupport # must be imported before docutils
from docutils import core, utils
from docutils.core import publish_string
-from docutils.parsers import recommonmark_wrapper
sample_with_html = """\
A paragraph:
@@ -38,11 +37,12 @@
Final paragraph.
"""
+parser_class = DocutilsTestSupport.RecommonmarkParserTestCase.parser_class
skip_msg = 'optional module "recommonmark" not found'
class reCommonMarkParserTests(unittest.TestCase):
- @unittest.skipUnless(recommonmark_wrapper.CommonMarkParser, skip_msg)
+ @unittest.skipUnless(parser_class, skip_msg)
def test_raw_disabled(self):
output = publish_string(sample_with_html, parser_name='recommonmark',
settings_overrides={'warning_stream': '',
@@ -51,7 +51,7 @@
self.assertIn(b'<system_message', output)
self.assertIn(b'Raw content disabled.', output)
- @unittest.skipUnless(recommonmark_wrapper.CommonMarkParser, skip_msg)
+ @unittest.skipUnless(parser_class, skip_msg)
def test_raw_disabled_inline(self):
output = publish_string('foo <a href="uri">', parser_name='recommonmark',
settings_overrides={'warning_stream': '',
@@ -62,7 +62,7 @@
self.assertIn(b'Raw content disabled.', output)
- @unittest.skipUnless(recommonmark_wrapper.CommonMarkParser, skip_msg)
+ @unittest.skipUnless(parser_class, skip_msg)
def test_raw_disabled(self):
output = publish_string(sample_with_html, parser_name='recommonmark',
settings_overrides={'warning_stream': '',
@@ -72,13 +72,17 @@
self.assertNotIn(b'<raw>', output)
self.assertNotIn(b'<system_message', output)
- @unittest.skipIf(recommonmark_wrapper.CommonMarkParser,
+ @unittest.skipIf(parser_class,
'recommonmark_wrapper: parser found, fallback not used')
- def test_fallback_parser(self):
- output = publish_string(sample_with_html, parser_name='recommonmark',
- settings_overrides={'warning_stream': ''})
- self.assertIn(b'Python did not find the required module "recommonmark"',
- output)
+ def test_missing_parser(self):
+ try:
+ output = publish_string(sample_with_html,
+ parser_name='recommonmark')
+ except ImportError as err:
+ pass
+ self.assertIn(
+ b'requires the package https://pypi.org/project/recommonmark',
+ str(err))
if __name__ == '__main__':
unittest.main()
Modified: trunk/docutils/test/test_parsers/test_rst/test_directives/test__init__.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_directives/test__init__.py 2021-12-23 14:55:01 UTC (rev 8915)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test__init__.py 2021-12-23 14:55:12 UTC (rev 8916)
@@ -15,7 +15,9 @@
"""
from __future__ import absolute_import
+import unittest
+
if __name__ == '__main__':
import __init__
from test_parsers import DocutilsTestSupport
@@ -51,11 +53,16 @@
directives.parser_name('null'))
self.assertEqual(docutils.parsers.rst.Parser,
directives.parser_name('rst'))
- self.assertEqual(docutils.parsers.recommonmark_wrapper.Parser,
- directives.parser_name('markdown'))
self.assertRaises(ValueError, directives.parser_name, 'fantasy')
+ parser_class = DocutilsTestSupport.RecommonmarkParserTestCase.parser_class
+ skip_msg = 'optional module "recommonmark" not found'
+ @unittest.skipUnless(parser_class, skip_msg)
+ def test_external_parser_name(self):
+ self.assertEqual(docutils.parsers.recommonmark_wrapper.Parser,
+ directives.parser_name('recommonmark'))
+
if __name__ == '__main__':
import unittest
unittest.main()
Modified: trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py 2021-12-23 14:55:01 UTC (rev 8915)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py 2021-12-23 14:55:12 UTC (rev 8916)
@@ -15,7 +15,6 @@
import __init__
from test_parsers import DocutilsTestSupport
from docutils.parsers.rst import states
-from docutils.parsers import recommonmark_wrapper
from docutils.utils.code_analyzer import with_pygments
if sys.version_info >= (3, 0):
@@ -76,7 +75,7 @@
# Parsing with Markdown (recommonmark) is an optional feature depending
# on 3rd-party modules:
-if recommonmark_wrapper.CommonMarkParser:
+if DocutilsTestSupport.RecommonmarkParserTestCase.parser_class:
markdown_parsing_result = """\
<section ids="title-1" names="title\\ 1">
<title>
@@ -94,12 +93,16 @@
."""
else:
markdown_parsing_result = """\
- <system_message level="2" source="test_parsers/test_rst/test_directives/include.md" type="WARNING">
+ <system_message level="3" line="3" source="test data" type="ERROR">
<paragraph>
- Missing dependency: MarkDown input is processed by a 3rd party parser but Python did not find the required module "recommonmark" (https://pypi.org/project/recommonmark/).\
-"""
+ Error in "include" directive:
+ invalid option value: (option: "parser"; value: \'markdown\')
+ Parser "markdown" missing. No module named recommonmark.parser.
+ Parsing "recommonmark" Markdown flavour requires the package https://pypi.org/project/recommonmark.
+ <literal_block xml:space="preserve">
+ .. include:: test_parsers/test_rst/test_directives/include.md
+ :parser: markdown"""
-
totest = {}
totest['include'] = [
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2021-12-29 00:01:18
|
Revision: 8919
http://sourceforge.net/p/docutils/code/8919
Author: milde
Date: 2021-12-29 00:01:16 +0000 (Wed, 29 Dec 2021)
Log Message:
-----------
Avoid mutables as function argument defaults.
Mutable default values for functions are considered an anti-pattern
(cf. bug #430 and
https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments).
Mutable default values (empty lists and dictionaries) were used
in the "interpreted role function" API:
Interpreted role functions must accept (optional)
"options" and "content" arguments and must not modify passed values.
OTOH, the actual default value is irrelevant for the API, so there is
no need to use mutable defaults in the specification.
As a precaution and example for robust coding, mutable defaults
are replaced with None in the function definitions.
The documentation is updated to the current implementation (including
changes in [r8254] to apply feature request #63).
Fixes bug #430.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docs/howto/rst-roles.txt
trunk/docutils/docutils/parsers/rst/roles.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2021-12-25 15:28:33 UTC (rev 8918)
+++ trunk/docutils/HISTORY.txt 2021-12-29 00:01:16 UTC (rev 8919)
@@ -34,6 +34,10 @@
- parser_name() keeps details if converting ImportError to ValueError.
+* docutils/parsers/rst/roles.py
+
+ - Don't use mutable default values for function arguments. Fixes bug #430.
+
* test/DocutilsTestSupport.py
- exception_data() returns None if no exception was raised.
Modified: trunk/docutils/docs/howto/rst-roles.txt
===================================================================
--- trunk/docutils/docs/howto/rst-roles.txt 2021-12-25 15:28:33 UTC (rev 8918)
+++ trunk/docutils/docs/howto/rst-roles.txt 2021-12-29 00:01:16 UTC (rev 8919)
@@ -33,10 +33,10 @@
any additional processing required. Its signature is as follows::
def role_fn(name, rawtext, text, lineno, inliner,
- options={}, content=[]):
+ options=None, content=None):
code...
- # Set function attributes for customization:
+ # Optional function attributes for customization:
role_fn.options = ...
role_fn.content = ...
@@ -52,7 +52,8 @@
* ``text``: The interpreted text content.
-* ``lineno``: The line number where the interpreted text begins.
+* ``lineno``: The line number where the text block containing the
+ interpreted text begins.
* ``inliner``: The ``docutils.parsers.rst.states.Inliner`` object that
called role_fn. It contains the several attributes useful for error
@@ -187,10 +188,14 @@
Here is the implementation of the role::
def rfc_reference_role(role, rawtext, text, lineno, inliner,
- options={}, content=[]):
+ options=None, content=None):
+ if "#" in text:
+ rfcnum, section = utils.unescape(text).split("#", 1)
+ else:
+ rfcnum, section = utils.unescape(text), None
try:
- rfcnum = int(text)
- if rfcnum <= 0:
+ rfcnum = int(rfcnum)
+ if rfcnum < 1:
raise ValueError
except ValueError:
msg = inliner.reporter.error(
@@ -200,8 +205,10 @@
return [prb], [msg]
# Base URL mainly used by inliner.rfc_reference, so this is correct:
ref = inliner.document.settings.rfc_base_url + inliner.rfc_url % rfcnum
- set_classes(options)
- node = nodes.reference(rawtext, 'RFC ' + utils.unescape(text), refuri=ref,
+ if section is not None:
+ ref += "#"+section
+ options = normalize_role_options(options)
+ node = nodes.reference(rawtext, 'RFC ' + str(rfcnum), refuri=ref,
**options)
return [node], []
Modified: trunk/docutils/docutils/parsers/rst/roles.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/roles.py 2021-12-25 15:28:33 UTC (rev 8918)
+++ trunk/docutils/docutils/parsers/rst/roles.py 2021-12-29 00:01:16 UTC (rev 8919)
@@ -13,7 +13,7 @@
The interface for interpreted role functions is as follows::
def role_fn(name, rawtext, text, lineno, inliner,
- options={}, content=[]):
+ options=None, content=None):
code...
# Set function attributes for customization:
@@ -101,7 +101,7 @@
"""
Locate and return a role function from its language-dependent name, along
with a list of system messages.
-
+
If the role is not found in the current language, check English. Return a
2-tuple: role function (``None`` if the named role cannot be found) and a
list of system messages.
@@ -200,8 +200,8 @@
self.node_class = node_class
def __call__(self, role, rawtext, text, lineno, inliner,
- options={}, content=[]):
- set_classes(options)
+ options=None, content=None):
+ options = normalized_role_options(options)
return [self.node_class(rawtext, text, **options)], []
@@ -208,36 +208,35 @@
class CustomRole(object):
"""Wrapper for custom interpreted text roles."""
- def __init__(self, role_name, base_role, options={}, content=[]):
+ def __init__(self, role_name, base_role, options=None, content=None):
self.name = role_name
self.base_role = base_role
- self.options = None
- if hasattr(base_role, 'options'):
- self.options = base_role.options
- self.content = None
- if hasattr(base_role, 'content'):
- self.content = base_role.content
+ self.options = getattr(base_role, 'options', None)
+ self.content = getattr(base_role, 'content', None)
self.supplied_options = options
self.supplied_content = content
def __call__(self, role, rawtext, text, lineno, inliner,
- options={}, content=[]):
- opts = self.supplied_options.copy()
- opts.update(options)
- cont = list(self.supplied_content)
- if cont and content:
- cont += '\n'
- cont.extend(content)
+ options=None, content=None):
+ opts = normalized_role_options(self.supplied_options)
+ try:
+ opts.update(options)
+ except TypeError: # options may be ``None``
+ pass
+ # pass concatenation of content from instance and call argument:
+ supplied_content = self.supplied_content or []
+ content = content or []
+ delimiter = ['\n'] if supplied_content and content else []
return self.base_role(role, rawtext, text, lineno, inliner,
- options=opts, content=cont)
+ options=opts, content=supplied_content+delimiter+content)
def generic_custom_role(role, rawtext, text, lineno, inliner,
- options={}, content=[]):
+ options=None, content=None):
"""Base for custom roles if no other base role is specified."""
# Once nested inline markup is implemented, this and other methods should
# recursively call inliner.nested_parse().
- set_classes(options)
+ options = normalized_role_options(options)
return [nodes.inline(rawtext, text, **options)], []
generic_custom_role.options = {'class': directives.class_option}
@@ -257,7 +256,8 @@
register_generic_role('title-reference', nodes.title_reference)
def pep_reference_role(role, rawtext, text, lineno, inliner,
- options={}, content=[]):
+ options=None, content=None):
+ options = normalized_role_options(options)
try:
pepnum = int(utils.unescape(text))
if pepnum < 0 or pepnum > 9999:
@@ -271,14 +271,13 @@
# Base URL mainly used by inliner.pep_reference; so this is correct:
ref = (inliner.document.settings.pep_base_url
+ inliner.document.settings.pep_file_url_template % pepnum)
- set_classes(options)
- return [nodes.reference(rawtext, 'PEP ' + text, refuri=ref,
- **options)], []
+ return [nodes.reference(rawtext, 'PEP ' + text, refuri=ref, **options)], []
register_canonical_role('pep-reference', pep_reference_role)
def rfc_reference_role(role, rawtext, text, lineno, inliner,
- options={}, content=[]):
+ options=None, content=None):
+ options = normalized_role_options(options)
if "#" in text:
rfcnum, section = utils.unescape(text).split("#", 1)
else:
@@ -297,14 +296,13 @@
ref = inliner.document.settings.rfc_base_url + inliner.rfc_url % rfcnum
if section is not None:
ref += "#"+section
- set_classes(options)
- node = nodes.reference(rawtext, 'RFC ' + str(rfcnum), refuri=ref,
- **options)
+ node = nodes.reference(rawtext, 'RFC ' + str(rfcnum), refuri=ref, **options)
return [node], []
register_canonical_role('rfc-reference', rfc_reference_role)
-def raw_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
+def raw_role(role, rawtext, text, lineno, inliner, options=None, content=None):
+ options = normalized_role_options(options)
if not inliner.document.settings.raw_enabled:
msg = inliner.reporter.warning('raw (and derived) roles disabled')
prb = inliner.problematic(rawtext, rawtext, msg)
@@ -317,7 +315,6 @@
'an associated format.' % role, line=lineno)
prb = inliner.problematic(rawtext, rawtext, msg)
return [prb], [msg]
- set_classes(options)
node = nodes.raw(rawtext, utils.unescape(text, True), **options)
node.source, node.line = inliner.reporter.get_source_and_line(lineno)
return [node], []
@@ -326,8 +323,9 @@
register_canonical_role('raw', raw_role)
-def code_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
- set_classes(options)
+def code_role(role, rawtext, text, lineno, inliner,
+ options=None, content=None):
+ options = normalized_role_options(options)
language = options.get('language', '')
classes = ['code']
if 'classes' in options:
@@ -358,8 +356,9 @@
register_canonical_role('code', code_role)
-def math_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
- set_classes(options)
+def math_role(role, rawtext, text, lineno, inliner,
+ options=None, content=None):
+ options = normalized_role_options(options)
text = utils.unescape(text, True) # raw text without inline role markup
node = nodes.math(rawtext, text, **options)
return [node], []
@@ -390,13 +389,29 @@
register_canonical_role('restructuredtext-unimplemented-role',
unimplemented_role)
-
def set_classes(options):
- """
- Auxiliary function to set options['classes'] and delete
- options['class'].
- """
- if 'class' in options:
+ """Deprecated. Obsoleted by ``normalized_role_options()``."""
+ # TODO: Change use in directives.py and uncomment.
+ # raise PendingDeprecationWarning(
+ # 'The auxiliary function roles.set_classes() is obsoleted by '
+ # 'roles.normalized_role_options() and will be removed in Docutils 2.0.')
+ if options and 'class' in options:
assert 'classes' not in options
options['classes'] = options['class']
del options['class']
+
+def normalized_role_options(options):
+ """
+ Return normalized dictionary of role options.
+
+ * ``None`` is replaced by an empty dictionary.
+ * The key 'class' is renamed to 'classes'.
+ """
+ if options is None:
+ return {}
+ result = options.copy()
+ if 'class' in result:
+ assert 'classes' not in result
+ result['classes'] = result['class']
+ del result['class']
+ return result
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-03 23:48:07
|
Revision: 8924
http://sourceforge.net/p/docutils/code/8924
Author: milde
Date: 2022-01-03 23:48:04 +0000 (Mon, 03 Jan 2022)
Log Message:
-----------
Docutils 0.19 requires Python 3.7 or later.
Update documentation and setup.
Removal of special-casing and 2.7 compatibility hacks following soon.
Specify versions in deprecation/removal announcements.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/README.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docs/dev/testing.txt
trunk/docutils/docs/user/config.txt
trunk/docutils/docutils/frontend.py
trunk/docutils/setup.py
trunk/docutils/tox.ini
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2022-01-03 23:47:41 UTC (rev 8923)
+++ trunk/docutils/HISTORY.txt 2022-01-03 23:48:04 UTC (rev 8924)
@@ -14,6 +14,10 @@
Changes Since 0.18.1
====================
+* General
+
+ - Dropped support for Python 2.7, 3.5, and 3.6.
+
* docutils/parsers/__init__.py
- Alias for the "myst" parser (https://pypi.org/project/myst-docutils).
@@ -25,7 +29,7 @@
* docutils/parsers/recommonmark_wrapper.py
- Raise ImportError, if import of the upstream parser module fails.
- If the parser was called from an `"include" directive`_,
+ If called from an `"include" directive`_,
the system-message now has source/line info.
.. _"include" directive: docs/ref/rst/directives.html#include
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2022-01-03 23:47:41 UTC (rev 8923)
+++ trunk/docutils/README.txt 2022-01-03 23:48:04 UTC (rev 8924)
@@ -75,7 +75,7 @@
To run the code, Python_ must be installed.
-* Docutils 1.0 will require Python 3.7 or later.
+* Docutils 0.19 requires Python 3.7 or later.
* Docutils 0.16 to 0.18 require Python 2.7 or 3.5+.
* Docutils 0.14 dropped Python 2.4, 2.5, 3.1 and 3.2 support.
* Docutils 0.10 dropped Python 2.3 support.
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2022-01-03 23:47:41 UTC (rev 8923)
+++ trunk/docutils/RELEASE-NOTES.txt 2022-01-03 23:48:04 UTC (rev 8924)
@@ -20,10 +20,8 @@
Future changes
==============
-Drop support for Python 2.7, 3.5, and 3.6.
+Drop support for `old-format configuration files`_ in Docutils 1.2.
-Drop support for `old-format configuration files`_.
-
* `html5` writer:
- Stop setting the "footnote-reference" class value for footnote
@@ -31,7 +29,8 @@
``[role="doc-noteref"]`` instead of ``.footnote-reference``
(see minimal.css for examples).
- - Remove option ``--embed-images`` (obsoleted by "image_loading_").
+ - Remove option ``--embed-images`` (obsoleted by "image_loading_")
+ in Docutils 1.2.
.. _image_loading: docs/user/config.html#image-loading
@@ -44,15 +43,17 @@
* `latex2e` writer:
- - Change default of use_latex_citations_ setting to True.
+ - Change default of use_latex_citations_ setting to True
+ in Docutils 1.0.
- - Change default of legacy_column_widths_ setting to False.
+ - Change default of legacy_column_widths_ setting to False
+ in Docutils 1.0.
- Remove ``use_verbatim_when_possible`` setting
- (use literal_block_env_: verbatim).
+ (use literal_block_env_: verbatim) in Docutils 1.2.
* Remove the "rawsource" argument from nodes.Text.__init__()
- (deprecated and ignored since Docutils 0.18).
+ (deprecated and ignored since Docutils 0.18) in Docutils 1.3.
* Move math format conversion from docutils/utils/math (called from
docutils/writers/_html_base.py) to a transform__.
@@ -70,7 +71,7 @@
style sheet or post-processing that may break otherwise.
* Remove the ``--html-writer`` option of the ``buildhtml.py`` application
- (obsoleted by the `"writer" option`_).
+ (obsoleted by the `"writer" option`_) in Docutils 1.2.
.. _old-format configuration files:
docs/user/config.html#old-format-configuration-files
@@ -79,11 +80,15 @@
.. _literal_block_env: docs/user/config.html#literal-block-env
.. _use_latex_citations: docs/user/config.html#use-latex-citations
-Changes Since 0.18.1
-====================
+Release 0.19b (unpublished)
+===========================
-.
+Docutils 0.19 is compatible with Python versions 3.7 and later.
+* Support calling the "myst" parser (https://pypi.org/project/myst-docutils)
+ from docutils-cli.py_.
+
+
Release 0.18.1 (2021-12-23)
===========================
@@ -92,7 +97,7 @@
Docutils 0.18.x is the last version supporting Python 2.7, 3.5, and 3.6.
* nodes.Node.traverse() returns a list again to restore backwards
- compatibility (fixes bug #431).
+ compatibility (fixes bug #431).
Use nodes.Node.findall() to get an iterator.
* re-add module ``parsers.rst.directives.html``
@@ -116,7 +121,7 @@
with ``--id-prefix="DU-"``, a section with title "34. May"
currently gets the identifier key ``DU-may`` and after the
change the identifier key ``DU-34-may``.
-
+
- The default value for the auto_id_prefix_ setting changed to ``%``:
"use the tag name as prefix for auto-generated IDs".
Set auto_id_prefix_ to ``id`` for unchanged auto-IDs.
@@ -125,32 +130,32 @@
- Use the semantic tag <aside> for footnote text and citations, topics
(except abstract and toc), admonitions, and system messages.
Use <nav> for the Table of Contents.
-
+
- Make "auto" table column widths the default: Only specify column
widths, if the `"widths" option`_ is set and not "auto".
The table-style__ setting "colwidths-grid" restores the current default.
-
+
.. _"widths" option: __ docs/ref/rst/directives.html#table
__ docs/user/config.html#table-style
-
+
- Items of a definition list with class argument "details" are
converted to `details disclosure elements`_. Example::
-
+
..class:: details
-
+
Summary
This additional information should be hidden.
-
+
- Do not add "compound-first", "compound-middle", or "compound-last" to
elements nested in a compound. Use child selector and ":first-child",
":last-child" pseudo classes instead.
-
+
- Use class value "backrefs" instead of "fn-backref" for a span of
back-references.
-
+
- Write footnote brackets and field term colons to HTML, so that they
are present also without CSS and when copying text.
-
+
- Move space character between section number and heading into
"sectnum" span.
@@ -167,7 +172,7 @@
* New standard Docutils doctree node: <meta__>.
* New configuration settings:
-
+
- [latex writers] legacy_column_widths_ and
- [html5 writer] image_loading_.
@@ -181,13 +186,13 @@
* Removed function: utils.unique_combinations()
(obsoleted by itertools.combinations()).
-* Removed attributes:
-
+* Removed attributes:
+
- ``HTMLTranslator.topic_classes``: check ``node.parent.classes`` instead.
- ``nodes.Text.rawsource``: we store the null-escaped text in Text
nodes since 0.16 so there is no additional information in the
rawsource.
-
+
* Major refactoring and fixes/additions in
``docutils/utils/math/math2html.py`` and
``docutils/utils/math/latex2mathml.py``
Modified: trunk/docutils/docs/dev/testing.txt
===================================================================
--- trunk/docutils/docs/dev/testing.txt 2022-01-03 23:47:41 UTC (rev 8923)
+++ trunk/docutils/docs/dev/testing.txt 2022-01-03 23:48:04 UTC (rev 8924)
@@ -67,21 +67,21 @@
`pyenv`_ can be installed and configured (see `installing pyenv`_) to
get multiple Python versions::
- # assuming your system runs 2.7.x
- pyenv install 3.5.7
- pyenv install 3.6.9
- pyenv install 3.7.3
- pyenv global system 3.5.7 3.6.9 3.7.3
+ # assuming your system runs 3.9.x
+ pyenv install 3.7.12
+ pyenv install 3.8.12
+ pyenv install 3.10.1
+ pyenv global system 3.7.12 3.8.12 3.10.1
# reset your shims
rm -rf ~/.pyenv/shims && pyenv rehash
-This will give you ``python2.7`` and ``python3.5`` through ``python3.7``.
+This will give you ``python3.7`` through ``python3.10``.
Then run::
- python2.7 -u alltests.py
+ python3.7 -u alltests.py
[...]
- python3.7 -u alltests.py
+ python3.10 -u alltests.py
.. [#] Good resources covering the differences between Python versions
are the `What's New` documents (`What's New in Python 3.10`__ and
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2022-01-03 23:47:41 UTC (rev 8923)
+++ trunk/docutils/docs/user/config.txt 2022-01-03 23:48:04 UTC (rev 8924)
@@ -2150,12 +2150,12 @@
[docutils-cli application]
--------------------------
-New in 0.17. Config file support added in 0.18.
+New in 0.17. Config file support added in 0.18.
Support for reader/parser import names added in 0.19.
reader
~~~~~~
-Reader component name.
+Reader component name.
One of "standalone", "pep",
or the import name of a drop-in reader module.
@@ -2278,8 +2278,9 @@
Formerly, Docutils configuration files contained a single "[options]"
section only. This was found to be inflexible, and in August 2003
Docutils adopted the current component-based configuration file
-sections as described above. Docutils will still recognize the old
-"[options]" section, but complains with a deprecation warning.
+sections as described above.
+Up to version 1.1, Docutils will still recognize the old "[options]"
+section, but complain with a deprecation warning.
To convert existing config files, the easiest way is to change the
section title: change "[options]" to "[general]". Most settings
Modified: trunk/docutils/docutils/frontend.py
===================================================================
--- trunk/docutils/docutils/frontend.py 2022-01-03 23:47:41 UTC (rev 8923)
+++ trunk/docutils/docutils/frontend.py 2022-01-03 23:48:04 UTC (rev 8924)
@@ -759,7 +759,7 @@
old_warning = """
The "[option]" section is deprecated. Support for old-format configuration
-files will be removed in a future Docutils release. Please revise your
+files will be removed in Docutils release 1.2. Please revise your
configuration files. See <http://docutils.sf.net/docs/user/config.html>,
section "Old-Format Configuration Files".
"""
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2022-01-03 23:47:41 UTC (rev 8923)
+++ trunk/docutils/setup.py 2022-01-03 23:48:04 UTC (rev 8924)
@@ -91,14 +91,11 @@
'License :: OSI Approved :: BSD License',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: OS Independent',
- 'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.5',
- 'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
+ 'Programming Language :: Python :: 3.10',
'Topic :: Documentation',
'Topic :: Software Development :: Documentation',
'Topic :: Text Processing',
Modified: trunk/docutils/tox.ini
===================================================================
--- trunk/docutils/tox.ini 2022-01-03 23:47:41 UTC (rev 8923)
+++ trunk/docutils/tox.ini 2022-01-03 23:48:04 UTC (rev 8924)
@@ -1,6 +1,6 @@
[tox]
minversion = 2.0
-envlist = py{27,35,36,37,38,39,310}
+envlist = py{37,38,39,310}
[testenv]
whitelist_externals =
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-03 23:49:03
|
Revision: 8925
http://sourceforge.net/p/docutils/code/8925
Author: milde
Date: 2022-01-03 23:48:58 +0000 (Mon, 03 Jan 2022)
Log Message:
-----------
Remove 2.7-compatibility __future__ imports.
Modified Paths:
--------------
trunk/docutils/docutils/core.py
trunk/docutils/docutils/io.py
trunk/docutils/docutils/nodes.py
trunk/docutils/docutils/statemachine.py
trunk/docutils/docutils/utils/math/tex2mathml_extern.py
trunk/docutils/docutils/utils/smartquotes.py
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/docutils/writers/odf_odt/__init__.py
trunk/docutils/install.py
trunk/docutils/setup.py
trunk/docutils/test/DocutilsTestSupport.py
trunk/docutils/test/alltests.py
trunk/docutils/test/package_unittest.py
trunk/docutils/test/test_error_reporting.py
trunk/docutils/test/test_functional.py
trunk/docutils/test/test_parsers/test_get_parser_class.py
trunk/docutils/test/test_parsers/test_recommonmark/test_block_quotes.py
trunk/docutils/test/test_parsers/test_recommonmark/test_bullet_lists.py
trunk/docutils/test/test_parsers/test_recommonmark/test_enumerated_lists.py
trunk/docutils/test/test_parsers/test_recommonmark/test_html_blocks.py
trunk/docutils/test/test_parsers/test_recommonmark/test_inline_markup.py
trunk/docutils/test/test_parsers/test_recommonmark/test_line_length_limit.py
trunk/docutils/test/test_parsers/test_recommonmark/test_line_length_limit_default.py
trunk/docutils/test/test_parsers/test_recommonmark/test_literal_blocks.py
trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py
trunk/docutils/test/test_parsers/test_recommonmark/test_paragraphs.py
trunk/docutils/test/test_parsers/test_recommonmark/test_section_headers.py
trunk/docutils/test/test_parsers/test_recommonmark/test_targets.py
trunk/docutils/test/test_parsers/test_recommonmark/test_transitions.py
trunk/docutils/test/test_parsers/test_rst/test_SimpleTableParser.py
trunk/docutils/test/test_parsers/test_rst/test_TableParser.py
trunk/docutils/test/test_parsers/test_rst/test_block_quotes.py
trunk/docutils/test/test_parsers/test_rst/test_bullet_lists.py
trunk/docutils/test/test_parsers/test_rst/test_character_level_inline_markup.py
trunk/docutils/test/test_parsers/test_rst/test_citations.py
trunk/docutils/test/test_parsers/test_rst/test_comments.py
trunk/docutils/test/test_parsers/test_rst/test_definition_lists.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test__init__.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_admonitions.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_de.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_dummy_lang.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_block_quotes.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_class.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_code.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_code_long.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_code_none.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_code_parsing.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_compound.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_container.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_contents.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_date.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_decorations.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_default_role.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_figures.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_images.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_line_blocks.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_math.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_meta.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_parsed_literals.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_raw.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_replace.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_replace_fr.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_role.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_rubrics.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_sectnum.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_sidebars.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_tables.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_target_notes.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_test_directives.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_title.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_topics.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_unicode.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_unknown.py
trunk/docutils/test/test_parsers/test_rst/test_doctest_blocks.py
trunk/docutils/test/test_parsers/test_rst/test_east_asian_text.py
trunk/docutils/test/test_parsers/test_rst/test_enumerated_lists.py
trunk/docutils/test/test_parsers/test_rst/test_field_lists.py
trunk/docutils/test/test_parsers/test_rst/test_footnotes.py
trunk/docutils/test/test_parsers/test_rst/test_inline_markup.py
trunk/docutils/test/test_parsers/test_rst/test_interpreted.py
trunk/docutils/test/test_parsers/test_rst/test_interpreted_fr.py
trunk/docutils/test/test_parsers/test_rst/test_line_blocks.py
trunk/docutils/test/test_parsers/test_rst/test_line_length_limit.py
trunk/docutils/test/test_parsers/test_rst/test_line_length_limit_default.py
trunk/docutils/test/test_parsers/test_rst/test_literal_blocks.py
trunk/docutils/test/test_parsers/test_rst/test_option_lists.py
trunk/docutils/test/test_parsers/test_rst/test_outdenting.py
trunk/docutils/test/test_parsers/test_rst/test_paragraphs.py
trunk/docutils/test/test_parsers/test_rst/test_section_headers.py
trunk/docutils/test/test_parsers/test_rst/test_source_line.py
trunk/docutils/test/test_parsers/test_rst/test_substitutions.py
trunk/docutils/test/test_parsers/test_rst/test_tables.py
trunk/docutils/test/test_parsers/test_rst/test_targets.py
trunk/docutils/test/test_parsers/test_rst/test_transitions.py
trunk/docutils/test/test_readers/test_get_reader_class.py
trunk/docutils/test/test_readers/test_pep/test_inline_markup.py
trunk/docutils/test/test_readers/test_pep/test_rfc2822.py
trunk/docutils/test/test_settings.py
trunk/docutils/test/test_statemachine.py
trunk/docutils/test/test_transforms/itest_hyperlinks_de.py
trunk/docutils/test/test_transforms/test___init__.py
trunk/docutils/test/test_transforms/test_class.py
trunk/docutils/test/test_transforms/test_contents.py
trunk/docutils/test/test_transforms/test_docinfo.py
trunk/docutils/test/test_transforms/test_doctitle.py
trunk/docutils/test/test_transforms/test_expose_internals.py
trunk/docutils/test/test_transforms/test_filter.py
trunk/docutils/test/test_transforms/test_footnotes.py
trunk/docutils/test/test_transforms/test_hyperlinks.py
trunk/docutils/test/test_transforms/test_messages.py
trunk/docutils/test/test_transforms/test_peps.py
trunk/docutils/test/test_transforms/test_sectnum.py
trunk/docutils/test/test_transforms/test_smartquotes.py
trunk/docutils/test/test_transforms/test_strip_comments.py
trunk/docutils/test/test_transforms/test_strip_elements_with_class.py
trunk/docutils/test/test_transforms/test_substitution_expansion_length_limit.py
trunk/docutils/test/test_transforms/test_substitutions.py
trunk/docutils/test/test_transforms/test_target_notes.py
trunk/docutils/test/test_transforms/test_transitions.py
trunk/docutils/test/test_transforms/test_writer_aux.py
trunk/docutils/test/test_writers/test_docutils_xml.py
trunk/docutils/test/test_writers/test_get_writer_class.py
trunk/docutils/test/test_writers/test_html4css1_misc.py
trunk/docutils/test/test_writers/test_html4css1_parts.py
trunk/docutils/test/test_writers/test_html4css1_template.py
trunk/docutils/test/test_writers/test_html5_polyglot_misc.py
trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
trunk/docutils/test/test_writers/test_latex2e.py
trunk/docutils/test/test_writers/test_latex2e_misc.py
trunk/docutils/test/test_writers/test_manpage.py
trunk/docutils/test/test_writers/test_null.py
trunk/docutils/test/test_writers/test_odt.py
trunk/docutils/test/test_writers/test_pseudoxml.py
trunk/docutils/test/test_writers/test_s5.py
trunk/docutils/tools/dev/create_unimap.py
trunk/docutils/tools/dev/generate_punctuation_chars.py
trunk/docutils/tools/dev/profile_docutils.py
trunk/docutils/tools/dev/unicode2rstsubs.py
trunk/docutils/tools/quicktest.py
trunk/docutils/tools/rst2odt_prepstyles.py
Modified: trunk/docutils/docutils/core.py
===================================================================
--- trunk/docutils/docutils/core.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/docutils/core.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -11,7 +11,6 @@
.. _The Docutils Publisher: http://docutils.sf.net/docs/api/publisher.html
"""
-from __future__ import print_function
__docformat__ = 'reStructuredText'
Modified: trunk/docutils/docutils/io.py
===================================================================
--- trunk/docutils/docutils/io.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/docutils/io.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -6,7 +6,6 @@
I/O classes provide a uniform API for low-level input and output. Subclasses
exist for a variety of input/output mechanisms.
"""
-from __future__ import print_function
__docformat__ = 'reStructuredText'
Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/docutils/nodes.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -19,14 +19,13 @@
.. _DTD: http://docutils.sourceforge.net/docs/ref/docutils.dtd
"""
-from __future__ import print_function
-from collections import Counter
__docformat__ = 'reStructuredText'
-import sys
+from collections import Counter
import os
import re
+import sys
import warnings
import unicodedata
# import xml.dom.minidom as dom # -> conditional import in Node.asdom()
Modified: trunk/docutils/docutils/statemachine.py
===================================================================
--- trunk/docutils/docutils/statemachine.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/docutils/statemachine.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -103,7 +103,6 @@
sm.unlink()
"""
-from __future__ import print_function
__docformat__ = 'restructuredtext'
Modified: trunk/docutils/docutils/utils/math/tex2mathml_extern.py
===================================================================
--- trunk/docutils/docutils/utils/math/tex2mathml_extern.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/docutils/utils/math/tex2mathml_extern.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# :Id: $Id$
@@ -18,7 +18,6 @@
the API is not settled and may change with any minor Docutils version.
"""
-from __future__ import print_function
import subprocess
document_template = r"""\documentclass{article}
Modified: trunk/docutils/docutils/utils/smartquotes.py
===================================================================
--- trunk/docutils/docutils/utils/smartquotes.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/docutils/utils/smartquotes.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
# :Id: $Id$
@@ -315,7 +315,6 @@
1.5_1.0: Tue, 09 Mar 2004 08:08:35 -0500
- Initial release
"""
-from __future__ import print_function
options = r"""
Options
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -6,8 +6,6 @@
"""LaTeX2e document tree Writer."""
-from __future__ import division
-
__docformat__ = 'reStructuredText'
# code contributions from several people included, thanks to all.
Modified: trunk/docutils/docutils/writers/odf_odt/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/odf_odt/__init__.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/docutils/writers/odf_odt/__init__.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -8,7 +8,6 @@
This module is provisional:
the API is not settled and may change with any minor Docutils version.
"""
-from __future__ import absolute_import
__docformat__ = 'reStructuredText'
Modified: trunk/docutils/install.py
===================================================================
--- trunk/docutils/install.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/install.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# $Id$
# Copyright: This file has been placed in the public domain.
@@ -15,7 +15,6 @@
python setup.py install --help
python setup.py --help
"""
-from __future__ import print_function
from distutils import core
from setup import do_setup
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/setup.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,9 +1,7 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# $Id$
# Copyright: This file has been placed in the public domain.
-from __future__ import print_function
-
import glob
import os
import sys
Modified: trunk/docutils/test/DocutilsTestSupport.py
===================================================================
--- trunk/docutils/test/DocutilsTestSupport.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/DocutilsTestSupport.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -38,7 +38,6 @@
- `HtmlFragmentTestSuite`
- `DevNull` (output sink)
"""
-from __future__ import print_function
__docformat__ = 'reStructuredText'
import sys
Modified: trunk/docutils/test/alltests.py
===================================================================
--- trunk/docutils/test/alltests.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/alltests.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,6 +1,5 @@
#!/bin/sh
''''exec python -u "$0" "$@" #'''
-from __future__ import print_function
# $Id$
# Author: David Goodger <go...@py...>
Modified: trunk/docutils/test/package_unittest.py
===================================================================
--- trunk/docutils/test/package_unittest.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/package_unittest.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# $Id$
# Author: Garth Kidd <ga...@de...>
@@ -9,7 +9,6 @@
test modules from a directory. Optionally, test packages are also loaded,
recursively.
"""
-from __future__ import print_function
import sys
import os
Modified: trunk/docutils/test/test_error_reporting.py
===================================================================
--- trunk/docutils/test/test_error_reporting.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_error_reporting.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# .. coding: utf-8
# $Id$
# Author: Günter Milde <mi...@us...>
@@ -24,7 +24,6 @@
unless the minimal required Python version has this problem fixed.
"""
-from __future__ import print_function
import os
import sys
Modified: trunk/docutils/test/test_functional.py
===================================================================
--- trunk/docutils/test/test_functional.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_functional.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# $Id$
# Author: Lea Wiemann <LeW...@gm...>
@@ -9,7 +9,6 @@
Read README.txt for details on how this is done.
"""
-from __future__ import print_function
import sys
import os
Modified: trunk/docutils/test/test_parsers/test_get_parser_class.py
===================================================================
--- trunk/docutils/test/test_parsers/test_get_parser_class.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_get_parser_class.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# $Id$
# Author: grubert abadger1999
@@ -8,7 +8,6 @@
"""
test get_parser_class
"""
-from __future__ import absolute_import
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_block_quotes.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_block_quotes.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_block_quotes.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -15,8 +15,6 @@
Cf. the `CommonMark Specification <https://spec.commonmark.org/>`__
"""
-from __future__ import absolute_import
-
if __name__ == '__main__':
import __init__
from test_parsers import DocutilsTestSupport
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_bullet_lists.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_bullet_lists.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_bullet_lists.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -15,8 +15,6 @@
Cf. the `CommonMark Specification <https://spec.commonmark.org/>`__
"""
-from __future__ import absolute_import
-
if __name__ == '__main__':
import __init__
from test_parsers import DocutilsTestSupport
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_enumerated_lists.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_enumerated_lists.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_enumerated_lists.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -13,7 +13,6 @@
Test for enumerated lists in CommonMark parsers
Cf. the `CommonMark Specification <https://spec.commonmark.org/>`__
"""
-from __future__ import absolute_import
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_html_blocks.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_html_blocks.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_html_blocks.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -14,7 +14,6 @@
Tests for HTML blocks in CommonMark parsers
Cf. the `CommonMark Specification <https://spec.commonmark.org/>`__
"""
-from __future__ import absolute_import
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_inline_markup.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_inline_markup.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_inline_markup.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -14,8 +14,6 @@
Cf. the `CommonMark Specification <https://spec.commonmark.org/>`__
"""
-from __future__ import absolute_import
-
if __name__ == '__main__':
import __init__
from test_parsers import DocutilsTestSupport
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_line_length_limit.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_line_length_limit.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_line_length_limit.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -14,7 +14,6 @@
Tests for inline markup in docutils/parsers/rst/states.py.
Interpreted text tests are in a separate module, test_interpreted.py.
"""
-from __future__ import absolute_import
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_line_length_limit_default.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_line_length_limit_default.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_line_length_limit_default.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -15,7 +15,6 @@
Tests for inline markup in docutils/parsers/rst/states.py.
Interpreted text tests are in a separate module, test_interpreted.py.
"""
-from __future__ import absolute_import
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_literal_blocks.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_literal_blocks.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_literal_blocks.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -14,7 +14,6 @@
Tests for literal blocks in CommonMark parsers
Cf. the `CommonMark Specification <https://spec.commonmark.org/>`__
"""
-from __future__ import absolute_import
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf8 -*-
# :Copyright: © 2020 Günter Milde.
# :License: Released under the terms of the `2-Clause BSD license`_, in short:
@@ -14,7 +14,6 @@
Various tests for the recommonmark parser.
"""
-from __future__ import absolute_import
import sys
import unittest
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_paragraphs.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_paragraphs.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_paragraphs.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# $Id$
# Author: David Goodger <go...@py...>
@@ -7,7 +7,6 @@
"""
Tests for states.py.
"""
-from __future__ import absolute_import
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_section_headers.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_section_headers.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_section_headers.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -14,8 +14,6 @@
Cf. the `CommonMark Specification <https://spec.commonmark.org/>`__
"""
-from __future__ import absolute_import
-
if __name__ == '__main__':
import __init__
from test_parsers import DocutilsTestSupport
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_targets.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_targets.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_targets.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -14,8 +14,6 @@
Cf. the `CommonMark Specification <https://spec.commonmark.org/>`__
"""
-from __future__ import absolute_import
-
if __name__ == '__main__':
import __init__
from test_parsers import DocutilsTestSupport
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_transitions.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_transitions.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_transitions.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# $Id$
# Author: David Goodger <go...@py...>
@@ -7,7 +7,6 @@
"""
Tests for transitions (`thematic breaks`).
"""
-from __future__ import absolute_import
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_parsers/test_rst/test_SimpleTableParser.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_SimpleTableParser.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_rst/test_SimpleTableParser.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# .. coding: utf-8
# $Id$
@@ -8,7 +8,6 @@
"""
Tests for states.py.
"""
-from __future__ import absolute_import
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_parsers/test_rst/test_TableParser.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_TableParser.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_rst/test_TableParser.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# coding: utf-8
# $Id$
@@ -8,7 +8,6 @@
"""
Tests for states.py.
"""
-from __future__ import absolute_import
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_parsers/test_rst/test_block_quotes.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_block_quotes.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_rst/test_block_quotes.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# $Id$
# Author: David Goodger <go...@py...>
@@ -7,7 +7,6 @@
"""
Tests for states.py.
"""
-from __future__ import absolute_import
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_parsers/test_rst/test_bullet_lists.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_bullet_lists.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_rst/test_bullet_lists.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# $Id$
# Author: David Goodger <go...@py...>
@@ -7,7 +7,6 @@
"""
Tests for states.py.
"""
-from __future__ import absolute_import
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_parsers/test_rst/test_character_level_inline_markup.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_character_level_inline_markup.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_rst/test_character_level_inline_markup.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -11,7 +11,6 @@
Experimental.
"""
-from __future__ import absolute_import
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_parsers/test_rst/test_citations.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_citations.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_rst/test_citations.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# $Id$
# Author: David Goodger <go...@py...>
@@ -7,7 +7,6 @@
"""
Tests for states.py.
"""
-from __future__ import absolute_import
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_parsers/test_rst/test_comments.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_comments.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_rst/test_comments.py 2022-01-03 23:48:58 UTC (rev 8925)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# $Id$
# Author: David Goodger <go...@py...>
@@ -7,7 +7,6 @@
"""
Tests for states.py.
"""
-from __future__ import absolute_import
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_parsers/test_rst/test_definition_lists.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_definition_lists.py 2022-01-03 23:48:04 UTC (rev 8924)
+++ trunk/docutils/test/test_parsers/test_rst/test_definition_lists.py 2022-01-03 23:48:58 ...
[truncated message content] |
|
From: <mi...@us...> - 2022-01-03 23:49:43
|
Revision: 8926
http://sourceforge.net/p/docutils/code/8926
Author: milde
Date: 2022-01-03 23:49:39 +0000 (Mon, 03 Jan 2022)
Log Message:
-----------
Remove "coding:" slug
Only required with Python 2.x. Encoding in Py3k is utf8 by default.
Modified Paths:
--------------
trunk/docutils/docutils/languages/ar.py
trunk/docutils/docutils/languages/da.py
trunk/docutils/docutils/languages/es.py
trunk/docutils/docutils/languages/fa.py
trunk/docutils/docutils/languages/gl.py
trunk/docutils/docutils/languages/ja.py
trunk/docutils/docutils/languages/ko.py
trunk/docutils/docutils/languages/lt.py
trunk/docutils/docutils/languages/lv.py
trunk/docutils/docutils/languages/ru.py
trunk/docutils/docutils/languages/sv.py
trunk/docutils/docutils/languages/zh_cn.py
trunk/docutils/docutils/languages/zh_tw.py
trunk/docutils/docutils/parsers/recommonmark_wrapper.py
trunk/docutils/docutils/parsers/rst/languages/ar.py
trunk/docutils/docutils/parsers/rst/languages/da.py
trunk/docutils/docutils/parsers/rst/languages/de.py
trunk/docutils/docutils/parsers/rst/languages/es.py
trunk/docutils/docutils/parsers/rst/languages/fa.py
trunk/docutils/docutils/parsers/rst/languages/fi.py
trunk/docutils/docutils/parsers/rst/languages/gl.py
trunk/docutils/docutils/parsers/rst/languages/ja.py
trunk/docutils/docutils/parsers/rst/languages/ko.py
trunk/docutils/docutils/parsers/rst/languages/lt.py
trunk/docutils/docutils/parsers/rst/languages/lv.py
trunk/docutils/docutils/parsers/rst/languages/ru.py
trunk/docutils/docutils/parsers/rst/languages/sv.py
trunk/docutils/docutils/parsers/rst/languages/zh_cn.py
trunk/docutils/docutils/parsers/rst/languages/zh_tw.py
trunk/docutils/docutils/transforms/references.py
trunk/docutils/docutils/transforms/universal.py
trunk/docutils/docutils/utils/__init__.py
trunk/docutils/docutils/utils/code_analyzer.py
trunk/docutils/docutils/utils/error_reporting.py
trunk/docutils/docutils/utils/math/latex2mathml.py
trunk/docutils/docutils/utils/math/math2html.py
trunk/docutils/docutils/utils/math/tex2mathml_extern.py
trunk/docutils/docutils/utils/math/tex2unichar.py
trunk/docutils/docutils/utils/punctuation_chars.py
trunk/docutils/docutils/utils/smartquotes.py
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/html5_polyglot/__init__.py
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/docutils/writers/manpage.py
trunk/docutils/docutils/writers/xetex/__init__.py
trunk/docutils/test/local-parser.py
trunk/docutils/test/local-reader.py
trunk/docutils/test/local-writer.py
trunk/docutils/test/test__init__.py
trunk/docutils/test/test_command_line.py
trunk/docutils/test/test_error_reporting.py
trunk/docutils/test/test_nodes.py
trunk/docutils/test/test_parsers/test_recommonmark/test_block_quotes.py
trunk/docutils/test/test_parsers/test_recommonmark/test_bullet_lists.py
trunk/docutils/test/test_parsers/test_recommonmark/test_enumerated_lists.py
trunk/docutils/test/test_parsers/test_recommonmark/test_html_blocks.py
trunk/docutils/test/test_parsers/test_recommonmark/test_inline_markup.py
trunk/docutils/test/test_parsers/test_recommonmark/test_line_length_limit.py
trunk/docutils/test/test_parsers/test_recommonmark/test_line_length_limit_default.py
trunk/docutils/test/test_parsers/test_recommonmark/test_literal_blocks.py
trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py
trunk/docutils/test/test_parsers/test_recommonmark/test_section_headers.py
trunk/docutils/test/test_parsers/test_recommonmark/test_targets.py
trunk/docutils/test/test_parsers/test_rst/test_SimpleTableParser.py
trunk/docutils/test/test_parsers/test_rst/test_TableParser.py
trunk/docutils/test/test_parsers/test_rst/test_character_level_inline_markup.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test__init__.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_code_parsing.py
trunk/docutils/test/test_parsers/test_rst/test_east_asian_text.py
trunk/docutils/test/test_parsers/test_rst/test_inline_markup.py
trunk/docutils/test/test_parsers/test_rst/test_line_length_limit.py
trunk/docutils/test/test_parsers/test_rst/test_line_length_limit_default.py
trunk/docutils/test/test_parsers/test_rst/test_section_headers.py
trunk/docutils/test/test_parsers/test_rst/test_source_line.py
trunk/docutils/test/test_settings.py
trunk/docutils/test/test_transforms/test_docinfo.py
trunk/docutils/test/test_transforms/test_smartquotes.py
trunk/docutils/test/test_writers/test_html4css1_misc.py
trunk/docutils/test/test_writers/test_html5_polyglot_misc.py
trunk/docutils/test/test_writers/test_latex2e.py
trunk/docutils/test/test_writers/test_latex2e_misc.py
trunk/docutils/tools/dev/generate_punctuation_chars.py
trunk/docutils/tools/docutils-cli.py
trunk/docutils/tools/rst2html5.py
Modified: trunk/docutils/docutils/languages/ar.py
===================================================================
--- trunk/docutils/docutils/languages/ar.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/languages/ar.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id: fa.py 4564 2016-08-10 11:48:42Z
# Author: Shahin <me...@5h...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/languages/da.py
===================================================================
--- trunk/docutils/docutils/languages/da.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/languages/da.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: E D
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/languages/es.py
===================================================================
--- trunk/docutils/docutils/languages/es.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/languages/es.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Marcelo Huerta San Martín <ric...@us...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/languages/fa.py
===================================================================
--- trunk/docutils/docutils/languages/fa.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/languages/fa.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id: fa.py 4564 2016-08-10 11:48:42Z
# Author: Shahin <me...@5h...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/languages/gl.py
===================================================================
--- trunk/docutils/docutils/languages/gl.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/languages/gl.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Author: David Goodger
# Contact: go...@us...
# Revision: $Revision: 2224 $
Modified: trunk/docutils/docutils/languages/ja.py
===================================================================
--- trunk/docutils/docutils/languages/ja.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/languages/ja.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Hisashi Morita <his...@kt...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/languages/ko.py
===================================================================
--- trunk/docutils/docutils/languages/ko.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/languages/ko.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Thomas SJ Kang <tho...@uj...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/languages/lt.py
===================================================================
--- trunk/docutils/docutils/languages/lt.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/languages/lt.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Dalius Dobravolskas <dal...@gm...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/languages/lv.py
===================================================================
--- trunk/docutils/docutils/languages/lv.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/languages/lv.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/languages/ru.py
===================================================================
--- trunk/docutils/docutils/languages/ru.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/languages/ru.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Roman Suzi <rn...@on...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/languages/sv.py
===================================================================
--- trunk/docutils/docutils/languages/sv.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/languages/sv.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Adam Chodorowski <cho...@us...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/languages/zh_cn.py
===================================================================
--- trunk/docutils/docutils/languages/zh_cn.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/languages/zh_cn.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Pan Junyong <pa...@zo...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/languages/zh_tw.py
===================================================================
--- trunk/docutils/docutils/languages/zh_tw.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/languages/zh_tw.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Joe YS Jaw <jo...@us...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/parsers/recommonmark_wrapper.py
===================================================================
--- trunk/docutils/docutils/parsers/recommonmark_wrapper.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/recommonmark_wrapper.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-# -*- coding: utf8 -*-
+#!/usr/bin/env python3
# :Copyright: © 2020 Günter Milde.
# :License: Released under the terms of the `2-Clause BSD license`_, in short:
#
Modified: trunk/docutils/docutils/parsers/rst/languages/ar.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/ar.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/rst/languages/ar.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id: fa.py 4564 2016-08-10 11:48:42Z
# Author: Shahin <me...@5h...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/parsers/rst/languages/da.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/da.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/rst/languages/da.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: E D
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/parsers/rst/languages/de.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/de.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/rst/languages/de.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Authors: Engelbert Gruber <gr...@us...>;
# Lea Wiemann <LeW...@gm...>
Modified: trunk/docutils/docutils/parsers/rst/languages/es.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/es.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/rst/languages/es.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Marcelo Huerta San Martín <ric...@us...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/parsers/rst/languages/fa.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/fa.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/rst/languages/fa.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id: fa.py 4564 2016-08-10 11:48:42Z
# Author: Shahin <me...@5h...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/parsers/rst/languages/fi.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/fi.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/rst/languages/fi.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Asko Soukka <ask...@ik...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/parsers/rst/languages/gl.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/gl.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/rst/languages/gl.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Author: David Goodger
# Contact: go...@us...
# Revision: $Revision: 4229 $
Modified: trunk/docutils/docutils/parsers/rst/languages/ja.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/ja.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/rst/languages/ja.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: David Goodger <go...@py...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/parsers/rst/languages/ko.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/ko.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/rst/languages/ko.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Thomas SJ Kang <tho...@uj...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/parsers/rst/languages/lt.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/lt.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/rst/languages/lt.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Dalius Dobravolskas <dal...@gm...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/parsers/rst/languages/lv.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/lv.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/rst/languages/lv.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/parsers/rst/languages/ru.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/ru.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/rst/languages/ru.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Roman Suzi <rn...@on...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/parsers/rst/languages/sv.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/sv.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/rst/languages/sv.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Adam Chodorowski <cho...@us...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/parsers/rst/languages/zh_cn.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/zh_cn.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/rst/languages/zh_cn.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Panjunyong <pa...@zo...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/parsers/rst/languages/zh_tw.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/zh_tw.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/parsers/rst/languages/zh_tw.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: David Goodger <go...@py...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/transforms/references.py
===================================================================
--- trunk/docutils/docutils/transforms/references.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/transforms/references.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# .. coding: utf-8
# $Id$
# Author: David Goodger <go...@py...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/transforms/universal.py
===================================================================
--- trunk/docutils/docutils/transforms/universal.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/transforms/universal.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,5 +1,4 @@
# $Id$
-# -*- coding: utf-8 -*-
# Authors: David Goodger <go...@py...>; Ueli Schlaepfer; Günter Milde
# Maintainer: doc...@li...
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/utils/__init__.py
===================================================================
--- trunk/docutils/docutils/utils/__init__.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/utils/__init__.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# coding: utf-8
# $Id$
# Author: David Goodger <go...@py...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/docutils/utils/code_analyzer.py
===================================================================
--- trunk/docutils/docutils/utils/code_analyzer.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/utils/code_analyzer.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,5 +1,4 @@
-#!/usr/bin/python
-# coding: utf-8
+#!/usr/bin/python3
"""Lexical analysis of formal languages (i.e. code) using Pygments."""
Modified: trunk/docutils/docutils/utils/error_reporting.py
===================================================================
--- trunk/docutils/docutils/utils/error_reporting.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/utils/error_reporting.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,6 +1,4 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
+#!/usr/bin/env python3
# :Id: $Id$
# :Copyright: © 2011 Günter Milde.
# :License: Released under the terms of the `2-Clause BSD license`_, in short:
Modified: trunk/docutils/docutils/utils/math/latex2mathml.py
===================================================================
--- trunk/docutils/docutils/utils/math/latex2mathml.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/utils/math/latex2mathml.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,6 +1,4 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
+#!/usr/bin/env python3
# :Id: $Id$
# :Copyright: © 2005 Jens Jørgen Mortensen [1]_
# © 2010, 2021 Günter Milde.
Modified: trunk/docutils/docutils/utils/math/math2html.py
===================================================================
--- trunk/docutils/docutils/utils/math/math2html.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/utils/math/math2html.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,6 +1,4 @@
-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
-
+#! /usr/bin/env python3
# math2html: convert LaTeX equations to HTML output.
#
# Copyright (C) 2009-2011 Alex Fernández, 2021 Günter Milde
Modified: trunk/docutils/docutils/utils/math/tex2mathml_extern.py
===================================================================
--- trunk/docutils/docutils/utils/math/tex2mathml_extern.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/utils/math/tex2mathml_extern.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,6 +1,4 @@
#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
# :Id: $Id$
# :Copyright: © 2015 Günter Milde.
# :License: Released under the terms of the `2-Clause BSD license`_, in short:
Modified: trunk/docutils/docutils/utils/math/tex2unichar.py
===================================================================
--- trunk/docutils/docutils/utils/math/tex2unichar.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/utils/math/tex2unichar.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,5 +1,3 @@
-# -*- coding: utf8 -*-
-
# LaTeX math to Unicode symbols translation dictionaries.
# Generated with ``write_tex2unichar.py`` from the data in
# http://milde.users.sourceforge.net/LUCR/Math/
Modified: trunk/docutils/docutils/utils/punctuation_chars.py
===================================================================
--- trunk/docutils/docutils/utils/punctuation_chars.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/utils/punctuation_chars.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
+#!/usr/bin/env python3
# :Id: $Id$
# :Copyright: © 2011, 2017 Günter Milde.
# :License: Released under the terms of the `2-Clause BSD license`_, in short:
Modified: trunk/docutils/docutils/utils/smartquotes.py
===================================================================
--- trunk/docutils/docutils/utils/smartquotes.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/utils/smartquotes.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,6 +1,4 @@
#!/usr/bin/python3
-# -*- coding: utf-8 -*-
-
# :Id: $Id$
# :Copyright: © 2010 Günter Milde,
# original `SmartyPants`_: © 2003 John Gruber
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/writers/_html_base.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
+#!/usr/bin/env python3
# :Author: David Goodger, Günter Milde
# Based on the html4css1 writer by David Goodger.
# :Maintainer: doc...@li...
Modified: trunk/docutils/docutils/writers/html5_polyglot/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# .. coding: utf-8
# $Id$
# :Author: Günter Milde <mi...@us...>
# Based on the html4css1 writer by David Goodger.
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# .. coding: utf-8
# $Id$
# Author: Engelbert Gruber, Günter Milde
# Maintainer: doc...@li...
Modified: trunk/docutils/docutils/writers/manpage.py
===================================================================
--- trunk/docutils/docutils/writers/manpage.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/writers/manpage.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Engelbert Gruber <gr...@us...>
# Copyright: This module is put into the public domain.
Modified: trunk/docutils/docutils/writers/xetex/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/xetex/__init__.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/docutils/writers/xetex/__init__.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,6 +1,4 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
+#!/usr/bin/env python3
# :Author: Günter Milde <mi...@us...>
# :Revision: $Revision$
# :Date: $Date$
Modified: trunk/docutils/test/local-parser.py
===================================================================
--- trunk/docutils/test/local-parser.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/test/local-parser.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Authors: Engelbert Gruber <gr...@us...>
# Toshio Kuratomi <to...@fe...>
Modified: trunk/docutils/test/local-reader.py
===================================================================
--- trunk/docutils/test/local-reader.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/test/local-reader.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Authors: Engelbert Gruber <gr...@us...>
# Toshio Kuratomi <to...@fe...>
Modified: trunk/docutils/test/local-writer.py
===================================================================
--- trunk/docutils/test/local-writer.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/test/local-writer.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# $Id$
# Author: Engelbert Gruber <gr...@us...>
# Copyright: This module is put into the public domain.
Modified: trunk/docutils/test/test__init__.py
===================================================================
--- trunk/docutils/test/test__init__.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/test/test__init__.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,5 +1,4 @@
-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
+#! /usr/bin/env python3
# $Id$
# Authors: Günter Milde <mi...@us...>,
# David Goodger <go...@py...>
Modified: trunk/docutils/test/test_command_line.py
===================================================================
--- trunk/docutils/test/test_command_line.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/test/test_command_line.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,5 +1,4 @@
-#! /usr/bin/env python
-# .. coding: utf-8
+#! /usr/bin/env python3
# $Id$
# Author: Günter Milde <mi...@us...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/test/test_error_reporting.py
===================================================================
--- trunk/docutils/test/test_error_reporting.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/test/test_error_reporting.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,5 +1,4 @@
#! /usr/bin/env python3
-# .. coding: utf-8
# $Id$
# Author: Günter Milde <mi...@us...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/test/test_nodes.py
===================================================================
--- trunk/docutils/test/test_nodes.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/test/test_nodes.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,5 +1,4 @@
-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
+#! /usr/bin/env python3
# $Id$
# Author: David Goodger <go...@py...>
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_block_quotes.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_block_quotes.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_block_quotes.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-# -*- coding: utf8 -*-
# :Copyright: © 2020 Günter Milde.
# :License: Released under the terms of the `2-Clause BSD license`_, in short:
#
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_bullet_lists.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_bullet_lists.py 2022-01-03 23:48:58 UTC (rev 8925)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_bullet_lists.py 2022-01-03 23:49:39 UTC (rev 8926)
@@ -1,5 +1,4 @@
#!/u...
[truncated message content] |
|
From: <mi...@us...> - 2022-01-03 23:50:09
|
Revision: 8927
http://sourceforge.net/p/docutils/code/8927
Author: milde
Date: 2022-01-03 23:50:05 +0000 (Mon, 03 Jan 2022)
Log Message:
-----------
Drop special-casing for Python 2.x in tests and tools.
Use "python3" in the shebang line
(cf. PEP 394 -- The "python" Command on Unix-Like Systems).
Modified Paths:
--------------
trunk/docutils/test/DocutilsTestSupport.py
trunk/docutils/test/alltests.py
trunk/docutils/test/test__init__.py
trunk/docutils/test/test_command_line.py
trunk/docutils/test/test_dependencies.py
trunk/docutils/test/test_error_reporting.py
trunk/docutils/test/test_functional.py
trunk/docutils/test/test_io.py
trunk/docutils/test/test_language.py
trunk/docutils/test/test_nodes.py
trunk/docutils/test/test_parsers/test_parser.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_admonitions.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_de.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_admonitions_dummy_lang.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_block_quotes.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_code_long.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_code_none.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_container.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_decorations.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_default_role.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_line_blocks.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_parsed_literals.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_raw.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_replace_fr.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_tables.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_target_notes.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_test_directives.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_unicode.py
trunk/docutils/test/test_pickle.py
trunk/docutils/test/test_publisher.py
trunk/docutils/test/test_transforms/test_substitution_expansion_length_limit.py
trunk/docutils/test/test_traversals.py
trunk/docutils/test/test_utils.py
trunk/docutils/test/test_viewlist.py
trunk/docutils/test/test_writers/test_docutils_xml.py
trunk/docutils/tools/buildhtml.py
trunk/docutils/tools/dev/create_unimap.py
trunk/docutils/tools/dev/generate_punctuation_chars.py
trunk/docutils/tools/dev/unicode2rstsubs.py
trunk/docutils/tools/rst2html.py
trunk/docutils/tools/rst2html4.py
trunk/docutils/tools/rst2latex.py
trunk/docutils/tools/rst2man.py
trunk/docutils/tools/rst2odt.py
trunk/docutils/tools/rst2pseudoxml.py
trunk/docutils/tools/rst2s5.py
trunk/docutils/tools/rst2xetex.py
trunk/docutils/tools/rst2xml.py
trunk/docutils/tools/rstpep2html.py
trunk/docutils/tools/test/test_buildhtml.py
Modified: trunk/docutils/test/DocutilsTestSupport.py
===================================================================
--- trunk/docutils/test/DocutilsTestSupport.py 2022-01-03 23:49:39 UTC (rev 8926)
+++ trunk/docutils/test/DocutilsTestSupport.py 2022-01-03 23:50:05 UTC (rev 8927)
@@ -82,10 +82,7 @@
except:
import pdb
-if sys.version_info >= (3, 0):
- unicode = str # noqa
-
# Hack to make repr(StringList) look like repr(list):
StringList.__repr__ = StringList.__str__
@@ -192,21 +189,13 @@
self.clear_roles()
def compare_output(self, input, output, expected):
- """`input`, `output`, and `expected` should all be strings."""
- if isinstance(input, unicode):
+ """`input` should by bytes, `output` and `expected` strings."""
+ if isinstance(input, str):
input = input.encode('raw_unicode_escape')
- if sys.version_info > (3, 0):
- # API difference: Python 3's node.__str__ doesn't escape
- #assert expected is None or isinstance(expected, unicode)
- if isinstance(expected, bytes):
- expected = expected.decode('utf-8')
- if isinstance(output, bytes):
- output = output.decode('utf-8')
- else:
- if isinstance(expected, unicode):
- expected = expected.encode('raw_unicode_escape')
- if isinstance(output, unicode):
- output = output.encode('raw_unicode_escape')
+ if isinstance(expected, bytes):
+ expected = expected.decode('utf-8')
+ if isinstance(output, bytes):
+ output = output.decode('utf-8')
# Normalize line endings:
if expected:
expected = '\n'.join(expected.splitlines())
@@ -847,10 +836,10 @@
return_tuple = []
for i in args:
r = repr(i)
- if ( (isinstance(i, bytes) or isinstance(i, unicode))
+ if ( (isinstance(i, bytes) or isinstance(i, str))
and '\n' in i):
stripped = ''
- if isinstance(i, unicode) and r.startswith('u'):
+ if isinstance(i, str) and r.startswith('u'):
stripped = r[0]
r = r[1:]
elif isinstance(i, bytes) and r.startswith('b'):
Modified: trunk/docutils/test/alltests.py
===================================================================
--- trunk/docutils/test/alltests.py 2022-01-03 23:49:39 UTC (rev 8926)
+++ trunk/docutils/test/alltests.py 2022-01-03 23:50:05 UTC (rev 8927)
@@ -1,5 +1,5 @@
#!/bin/sh
-''''exec python -u "$0" "$@" #'''
+''''exec python3 -u "$0" "$@" #'''
# $Id$
# Author: David Goodger <go...@py...>
@@ -30,10 +30,7 @@
"""Write to a file and a stream (default: stdout) simultaneously."""
def __init__(self, filename, stream=sys.__stdout__):
- if sys.version_info >= (3, 0):
- self.file = open(filename, 'w', errors='backslashreplace')
- else:
- self.file = open(filename, 'w')
+ self.file = open(filename, 'w', errors='backslashreplace')
atexit.register(self.close)
self.stream = stream
self.encoding = getattr(stream, 'encoding', None)
Modified: trunk/docutils/test/test__init__.py
===================================================================
--- trunk/docutils/test/test__init__.py 2022-01-03 23:49:39 UTC (rev 8926)
+++ trunk/docutils/test/test__init__.py 2022-01-03 23:50:05 UTC (rev 8927)
@@ -16,19 +16,15 @@
from docutils import VersionInfo
-if sys.version_info >= (3, 0):
- unicode = str # noqa
-
-
class ApplicationErrorTests(unittest.TestCase):
def test_message(self):
err = docutils.ApplicationError('the message')
- self.assertEqual(unicode(err), u'the message')
+ self.assertEqual(str(err), u'the message')
def test_non_ASCII_message(self):
err = docutils.ApplicationError(u'\u0169')
- self.assertEqual(unicode(err), u'\u0169')
+ self.assertEqual(str(err), u'\u0169')
class VersionInfoTests(unittest.TestCase):
Modified: trunk/docutils/test/test_command_line.py
===================================================================
--- trunk/docutils/test/test_command_line.py 2022-01-03 23:49:39 UTC (rev 8926)
+++ trunk/docutils/test/test_command_line.py 2022-01-03 23:50:05 UTC (rev 8927)
@@ -32,10 +32,7 @@
if argv_encoding == 'ascii': # cannot test
return
sys.argv.append('--source-url=test.txt') # pure ASCII argument
- if sys.version_info < (3, 0):
- sys.argv.append(u'--title=Dornröschen'.encode(argv_encoding))
- else:
- sys.argv.append(u'--title=Dornröschen')
+ sys.argv.append(u'--title=Dornröschen')
publisher = docutils.core.Publisher()
publisher.process_command_line()
self.assertEqual(publisher.settings.source_url, 'test.txt')
Modified: trunk/docutils/test/test_dependencies.py
===================================================================
--- trunk/docutils/test/test_dependencies.py 2022-01-03 23:49:39 UTC (rev 8926)
+++ trunk/docutils/test/test_dependencies.py 2022-01-03 23:50:05 UTC (rev 8927)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# $Id$
# Author: Lea Wiemann <LeW...@gm...>
Modified: trunk/docutils/test/test_error_reporting.py
===================================================================
--- trunk/docutils/test/test_error_reporting.py 2022-01-03 23:49:39 UTC (rev 8926)
+++ trunk/docutils/test/test_error_reporting.py 2022-01-03 23:50:05 UTC (rev 8927)
@@ -34,55 +34,14 @@
from docutils.utils.error_reporting import SafeString, ErrorString, ErrorOutput
-oldlocale = None
-if sys.version_info < (3, 0): # problems solved in py3k
- try:
- import locale # module missing in Jython
- oldlocale = locale.getlocale()
- except ImportError:
- print('cannot test error reporting with problematic locales,\n'
- '`import locale` failed.')
-if sys.version_info >= (3, 0):
- unicode = str # noqa
-
-
-# locales confirmed to use non-ASCII chars in the IOError message
-# for a missing file (https://bugs.gentoo.org/show_bug.cgi?id=349101)
-# TODO: add more confirmed problematic locales
-problematic_locales = ['cs_CZ', 'cs_CZ.UTF8',
- 'el_GR', 'el_GR.UTF-8',
- # 'fr_FR.UTF-8', # only OSError
- 'ja_JP.UTF-8',
- 'ru_RU', 'ru_RU.KOI8-R',
- 'ru_RU.UTF-8',
- # '', # default locale: might be non-problematic
- ]
-
-if oldlocale is not None:
- # find a supported problematic locale:
- for testlocale in problematic_locales:
- try:
- locale.setlocale(locale.LC_ALL, testlocale)
- except locale.Error:
- testlocale = None
- else:
- break
- locale.setlocale(locale.LC_ALL, oldlocale) # reset
-else:
- testlocale = None
-
-
class SafeStringTests(unittest.TestCase):
- # the error message in EnvironmentError instances comes from the OS
- # and in some locales (e.g. ru_RU), contains high bit chars.
- # -> see the test in test_error_reporting.py
# test data:
- bs = b'\xc3\xbc' # unicode(bs) fails, str(bs) in Python 3 returns repr(bs)
- us = u'\xfc' # bytes(us) fails; str(us) fails in Python 2
- be = Exception(bs) # unicode(be) fails
- ue = Exception(us) # bytes(ue) fails, str(ue) fails in Python 2;
+ bs = b'\xc3\xbc' # str(bs) returns repr(bs)
+ us = u'\xfc' # bytes(us) fails (requires encoding argument)
+ be = Exception(bs)
+ ue = Exception(us) # bytes(ue) fails
# wrapped test data:
wbs = SafeString(bs)
wus = SafeString(us)
@@ -96,36 +55,28 @@
us7 = u'foo'
be7 = Exception(bs7)
ue7 = Exception(us7)
- self.assertEqual(str(42), str(SafeString(42)))
self.assertEqual(str(bs7), str(SafeString(bs7)))
self.assertEqual(str(us7), str(SafeString(us7)))
self.assertEqual(str(be7), str(SafeString(be7)))
self.assertEqual(str(ue7), str(SafeString(ue7)))
- self.assertEqual(unicode(7), unicode(SafeString(7)))
- self.assertEqual(unicode(bs7), unicode(SafeString(bs7)))
- self.assertEqual(unicode(us7), unicode(SafeString(us7)))
- self.assertEqual(unicode(be7), unicode(SafeString(be7)))
- self.assertEqual(unicode(ue7), unicode(SafeString(ue7)))
def test_ustr(self):
"""Test conversion to a unicode-string."""
# unicode(self.bs) fails
- self.assertEqual(unicode, type(unicode(self.wbs)))
- self.assertEqual(unicode(self.us), unicode(self.wus))
+ self.assertEqual(str, type(str(self.wbs)))
+ self.assertEqual(str(self.us), str(self.wus))
# unicode(self.be) fails
- self.assertEqual(unicode, type(unicode(self.wbe)))
- self.assertEqual(unicode, type(unicode(self.ue)))
- self.assertEqual(unicode, type(unicode(self.wue)))
- self.assertEqual(self.us, unicode(self.wue))
+ self.assertEqual(str, type(str(self.wbe)))
+ self.assertEqual(str, type(str(self.ue)))
+ self.assertEqual(str, type(str(self.wue)))
+ self.assertEqual(self.us, str(self.wue))
def test_str(self):
"""Test conversion to a string (bytes in Python 2, unicode in Python 3)."""
self.assertEqual(str(self.bs), str(self.wbs))
- self.assertEqual(str(self.be), str(self.be))
- # str(us) fails in Python 2
- self.assertEqual(str, type(str(self.wus)))
- # str(ue) fails in Python 2
- self.assertEqual(str, type(str(self.wue)))
+ self.assertEqual(str(self.be), str(self.wbe))
+ self.assertEqual(str(self.us), str(self.wus))
+ self.assertEqual(str(self.ue), str(self.wue))
class ErrorStringTests(unittest.TestCase):
@@ -142,11 +93,11 @@
def test_unicode(self):
self.assertEqual(u'Exception: spam',
- unicode(ErrorString(Exception(u'spam'))))
+ str(ErrorString(Exception(u'spam'))))
self.assertEqual(u'IndexError: '+self.us,
- unicode(ErrorString(IndexError(self.us))))
+ str(ErrorString(IndexError(self.us))))
self.assertEqual(u'ImportError: %s' % SafeString(self.bs),
- unicode(ErrorString(ImportError(self.bs))))
+ str(ErrorString(ImportError(self.bs))))
# ErrorOutput tests
@@ -155,7 +106,7 @@
# Stub: Buffer with 'strict' auto-conversion of input to byte string:
class BBuf(BytesIO):
def write(self, data):
- if isinstance(data, unicode):
+ if isinstance(data, str):
data.encode('ascii', 'strict')
super(BBuf, self).write(data)
@@ -215,8 +166,6 @@
The error message in `EnvironmentError` instances comes from the OS
and in some locales (e.g. ru_RU), contains high bit chars.
"""
- if testlocale:
- locale.setlocale(locale.LC_ALL, testlocale)
# test data:
bs = b'\xc3\xbc'
us = u'\xfc'
@@ -251,17 +200,14 @@
wuioe = SafeString(uioe)
wbose = SafeString(bose)
wuose = SafeString(uose)
- # reset locale
- if testlocale:
- locale.setlocale(locale.LC_ALL, oldlocale)
def test_ustr(self):
"""Test conversion to a unicode-string."""
# unicode(bioe) fails with e.g. 'ru_RU.utf8' locale
- self.assertEqual(unicode, type(unicode(self.wbioe)))
- self.assertEqual(unicode, type(unicode(self.wuioe)))
- self.assertEqual(unicode, type(unicode(self.wbose)))
- self.assertEqual(unicode, type(unicode(self.wuose)))
+ self.assertEqual(str, type(str(self.wbioe)))
+ self.assertEqual(str, type(str(self.wuioe)))
+ self.assertEqual(str, type(str(self.wbose)))
+ self.assertEqual(str, type(str(self.wuose)))
def test_str(self):
"""Test conversion to a string (bytes in Python 2, unicode in Python 3)."""
@@ -293,14 +239,6 @@
settings.warning_stream = ''
document = utils.new_document('test data', settings)
- def setUp(self):
- if testlocale:
- locale.setlocale(locale.LC_ALL, testlocale)
-
- def tearDown(self):
- if testlocale:
- locale.setlocale(locale.LC_ALL, oldlocale)
-
def test_include(self):
source = ('.. include:: bogus.txt')
self.assertRaises(utils.SystemMessage,
Modified: trunk/docutils/test/test_functional.py
===================================================================
--- trunk/docutils/test/test_functional.py 2022-01-03 23:49:39 UTC (rev 8926)
+++ trunk/docutils/test/test_functional.py 2022-01-03 23:50:05 UTC (rev 8927)
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
# $Id$
# Author: Lea Wiemann <LeW...@gm...>
# Copyright: This module has been placed in the public domain.
@@ -143,12 +142,6 @@
output = docutils.core.publish_file(**params)
# ensure output is unicode
output_encoding = params.get('output_encoding', 'utf-8')
- if sys.version_info < (3, 0):
- try:
- output = output.decode(output_encoding)
- except UnicodeDecodeError:
- # failsafe
- output = output.decode('latin1', 'replace')
# Normalize line endings:
output = '\n'.join(output.splitlines())
# Get the expected output *after* writing the actual output.
@@ -155,18 +148,11 @@
no_expected = self.no_expected_template % {
'exp': expected_path, 'out': params['destination_path']}
self.assertTrue(os.access(expected_path, os.R_OK), no_expected)
- if sys.version_info < (3, 0):
- f = open(expected_path, 'r')
- else: # samples are UTF8 encoded. 'rb' leads to errors with Python 3!
- f = open(expected_path, 'r', encoding='utf-8')
+ # samples are UTF8 encoded. 'rb' leads to errors with Python 3!
+ f = open(expected_path, 'r', encoding='utf-8')
# Normalize line endings:
expected = '\n'.join(f.read().splitlines())
f.close()
- if sys.version_info < (3, 0):
- try:
- expected = expected.decode(output_encoding)
- except UnicodeDecodeError:
- expected = expected.decode('latin1', 'replace')
diff = self.expected_output_differs_template % {
'exp': expected_path, 'out': params['destination_path']}
@@ -176,8 +162,6 @@
diff = ''.join(difflib.unified_diff(
expected.splitlines(True), output.splitlines(True),
expected_path, params['destination_path']))
- if sys.version_info < (3, 0):
- diff = diff.encode(sys.stderr.encoding or 'ascii', 'replace')
print('\n%s:' % (self,), file=sys.stderr)
print(diff, file=sys.stderr)
raise
Modified: trunk/docutils/test/test_io.py
===================================================================
--- trunk/docutils/test/test_io.py 2022-01-03 23:49:39 UTC (rev 8926)
+++ trunk/docutils/test/test_io.py 2022-01-03 23:50:05 UTC (rev 8927)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# $Id$
# Author: Lea Wiemann <LeW...@gm...>
@@ -102,19 +102,10 @@
data = input.readlines()
self.assertEqual(data, [u'Some include text.\n'])
- def test_heuristics_utf8(self):
- # if no encoding is given, try decoding with utf8:
- input = io.FileInput(source_path='functional/input/cyrillic.txt')
- data = input.read()
- if sys.version_info < (3, 0):
- # in Py3k, the locale encoding is used without --input-encoding
- # skipping the heuristic
- self.assertEqual(input.successful_encoding, 'utf-8')
-
def test_heuristics_no_utf8(self):
# if no encoding is given and decoding with utf8 fails,
# use either the locale encoding (if specified) or latin-1:
- if sys.version_info >= (3, 0) and locale_encoding != "utf8":
+ if locale_encoding != "utf8":
# in Py3k, the locale encoding is used without --input-encoding
# skipping the heuristic unless decoding fails.
return
@@ -157,16 +148,10 @@
self.assertEqual(self.udrain.getvalue(), self.udata)
def test_write_utf8(self):
- if sys.version_info >= (3, 0):
- fo = io.FileOutput(destination=self.udrain, encoding='utf8',
- autoclose=False)
- fo.write(self.udata)
- self.assertEqual(self.udrain.getvalue(), self.udata)
- else:
- fo = io.FileOutput(destination=self.bdrain, encoding='utf8',
- autoclose=False)
- fo.write(self.udata)
- self.assertEqual(self.bdrain.getvalue(), self.udata.encode('utf8'))
+ fo = io.FileOutput(destination=self.udrain, encoding='utf8',
+ autoclose=False)
+ fo.write(self.udata)
+ self.assertEqual(self.udrain.getvalue(), self.udata)
def test_FileOutput_hande_io_errors_deprection_warning(self):
with warnings.catch_warnings(record=True) as wng:
@@ -183,28 +168,26 @@
fo.write(self.bdata)
self.assertEqual(self.bdrain.getvalue(), self.bdata)
- # Test for Python 3 features:
- if sys.version_info >= (3, 0):
- def test_write_bytes_to_stdout(self):
- # try writing data to `destination.buffer`, if data is
- # instance of `bytes` and writing to `destination` fails:
- fo = io.FileOutput(destination=self.mock_stdout)
- fo.write(self.bdata)
- self.assertEqual(self.mock_stdout.buffer.getvalue(),
- self.bdata)
+ def test_write_bytes_to_stdout(self):
+ # try writing data to `destination.buffer`, if data is
+ # instance of `bytes` and writing to `destination` fails:
+ fo = io.FileOutput(destination=self.mock_stdout)
+ fo.write(self.bdata)
+ self.assertEqual(self.mock_stdout.buffer.getvalue(),
+ self.bdata)
- def test_encoding_clash_resolved(self):
- fo = io.FileOutput(destination=self.mock_stdout,
- encoding='latin1', autoclose=False)
- fo.write(self.udata)
- self.assertEqual(self.mock_stdout.buffer.getvalue(),
- self.udata.encode('latin1'))
+ def test_encoding_clash_resolved(self):
+ fo = io.FileOutput(destination=self.mock_stdout,
+ encoding='latin1', autoclose=False)
+ fo.write(self.udata)
+ self.assertEqual(self.mock_stdout.buffer.getvalue(),
+ self.udata.encode('latin1'))
- def test_encoding_clash_nonresolvable(self):
- del(self.mock_stdout.buffer)
- fo = io.FileOutput(destination=self.mock_stdout,
- encoding='latin1', autoclose=False)
- self.assertRaises(ValueError, fo.write, self.udata)
+ def test_encoding_clash_nonresolvable(self):
+ del(self.mock_stdout.buffer)
+ fo = io.FileOutput(destination=self.mock_stdout,
+ encoding='latin1', autoclose=False)
+ self.assertRaises(ValueError, fo.write, self.udata)
if __name__ == '__main__':
Modified: trunk/docutils/test/test_language.py
===================================================================
--- trunk/docutils/test/test_language.py 2022-01-03 23:49:39 UTC (rev 8926)
+++ trunk/docutils/test/test_language.py 2022-01-03 23:50:05 UTC (rev 8927)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# $Id$
# Authors: Engelbert Gruber <gr...@us...>;
@@ -26,10 +26,7 @@
reference_language = 'en'
-if sys.version_info >= (3, 0):
- unicode = str # noqa
-
class LanguageTestSuite(DocutilsTestSupport.CustomTestSuite):
language_module_pattern = re.compile(r'^([a-z]{2,3}(_[a-z]{2,8})*)\.py$')
@@ -158,7 +155,7 @@
if failures:
text = ('Module docutils.parsers.rst.languages.%s:\n %s'
% (self.language, '\n '.join(failures)))
- if isinstance(text, unicode):
+ if isinstance(text, str):
text = text.encode('raw_unicode_escape')
self.fail(text)
@@ -192,7 +189,7 @@
if failures:
text = ('Module docutils.parsers.rst.languages.%s:\n %s'
% (self.language, '\n '.join(failures)))
- if isinstance(text, unicode):
+ if isinstance(text, str):
text = text.encode('raw_unicode_escape')
self.fail(text)
Modified: trunk/docutils/test/test_nodes.py
===================================================================
--- trunk/docutils/test/test_nodes.py 2022-01-03 23:49:39 UTC (rev 8926)
+++ trunk/docutils/test/test_nodes.py 2022-01-03 23:50:05 UTC (rev 8927)
@@ -1,5 +1,4 @@
#! /usr/bin/env python3
-
# $Id$
# Author: David Goodger <go...@py...>
# Copyright: This module has been placed in the public domain.
@@ -17,10 +16,7 @@
debug = False
-if sys.version_info >= (3, 0):
- unicode = str # noqa
-
class TextTests(unittest.TestCase):
def setUp(self):
@@ -36,25 +32,22 @@
self.assertEqual(self.text.shortrepr(),
r"<#text: 'Line 1.\nLine 2.'>")
self.assertEqual(nodes.reprunicode('foo'), u'foo')
- if sys.version_info < (3, 0):
- self.assertEqual(repr(self.unicode_text), r"<#text: 'M\xf6hren'>")
- else:
- self.assertEqual(repr(self.unicode_text), u"<#text: 'Möhren'>")
+ self.assertEqual(repr(self.unicode_text), u"<#text: 'Möhren'>")
def test_str(self):
self.assertEqual(str(self.text), 'Line 1.\nLine 2.')
def test_unicode(self):
- self.assertEqual(unicode(self.unicode_text), u'Möhren')
+ self.assertEqual(str(self.unicode_text), u'Möhren')
self.assertEqual(str(self.unicode_text), 'M\xf6hren')
def test_astext(self):
- self.assertTrue(isinstance(self.text.astext(), unicode))
+ self.assertTrue(isinstance(self.text.astext(), str))
self.assertEqual(self.text.astext(), u'Line 1.\nLine 2.')
self.assertEqual(self.unicode_text.astext(), u'Möhren')
def test_pformat(self):
- self.assertTrue(isinstance(self.text.pformat(), unicode))
+ self.assertTrue(isinstance(self.text.pformat(), str))
self.assertEqual(self.text.pformat(), u'Line 1.\nLine 2.\n')
def test_strip(self):
@@ -65,12 +58,8 @@
self.assertEqual(stripped2, u's noc')
def test_asciirestriction(self):
- if sys.version_info < (3, 0):
- self.assertRaises(UnicodeDecodeError, nodes.Text,
- b'hol%s' % chr(224))
- else:
- # no bytes at all allowed
- self.assertRaises(TypeError, nodes.Text, b'hol')
+ # no bytes at all allowed
+ self.assertRaises(TypeError, nodes.Text, b'hol')
def test_longrepr(self):
self.assertEqual(repr(self.longtext), r"<#text: 'Mary had a "
@@ -106,19 +95,12 @@
del element['attr']
element['mark'] = u'\u2022'
self.assertEqual(repr(element), '<Element: >')
- if sys.version_info < (3, 0):
- self.assertEqual(str(element), '<Element mark="\\u2022"/>')
- else:
- self.assertEqual(str(element), u'<Element mark="\u2022"/>')
+ self.assertEqual(str(element), u'<Element mark="\u2022"/>')
dom = element.asdom()
self.assertEqual(dom.toxml(), u'<Element mark="\u2022"/>')
dom.unlink()
element['names'] = ['nobody', u'имя', u'näs']
- if sys.version_info < (3, 0):
- self.assertEqual(repr(element),
- '<Element "nobody; \\u0438\\u043c\\u044f; n\\xe4s": >')
- else:
- self.assertEqual(repr(element), u'<Element "nobody; имя; näs": >')
+ self.assertEqual(repr(element), u'<Element "nobody; имя; näs": >')
self.assertTrue(isinstance(repr(element), str))
def test_withtext(self):
@@ -125,10 +107,7 @@
element = nodes.Element('text\nmore', nodes.Text('text\nmore'))
uelement = nodes.Element(u'grün', nodes.Text(u'grün'))
self.assertEqual(repr(element), r"<Element: <#text: 'text\nmore'>>")
- if sys.version_info < (3, 0):
- self.assertEqual(repr(uelement), "<Element: <#text: 'gr\\xfcn'>>")
- else:
- self.assertEqual(repr(uelement), u"<Element: <#text: 'grün'>>")
+ self.assertEqual(repr(uelement), u"<Element: <#text: 'grün'>>")
self.assertTrue(isinstance(repr(uelement), str))
self.assertEqual(str(element), '<Element>text\nmore</Element>')
self.assertEqual(str(uelement), '<Element>gr\xfcn</Element>')
@@ -339,7 +318,7 @@
def test_unicode(self):
node = nodes.Element(u'Möhren', nodes.Text(u'Möhren'))
- self.assertEqual(unicode(node), u'<Element>Möhren</Element>')
+ self.assertEqual(str(node), u'<Element>Möhren</Element>')
class MiscTests(unittest.TestCase):
@@ -346,22 +325,16 @@
def test_reprunicode(self):
# return `unicode` instance
- self.assertTrue(isinstance(nodes.reprunicode('foo'), unicode))
+ self.assertTrue(isinstance(nodes.reprunicode('foo'), str))
self.assertEqual(nodes.reprunicode('foo'), u'foo')
self.assertEqual(nodes.reprunicode(u'Möhre'), u'Möhre')
- if sys.version_info < (3, 0): # strip leading "u" from representation
- self.assertEqual(repr(nodes.reprunicode(u'Möhre')),
- repr(u'Möhre')[1:])
- else: # no change to `unicode` under Python 3k
- self.assertEqual(repr(nodes.reprunicode(u'Möhre')), repr(u'Möhre'))
+ # no change to `unicode` under Python 3k
+ self.assertEqual(repr(nodes.reprunicode(u'Möhre')), repr(u'Möhre'))
def test_ensure_str(self):
self.assertTrue(isinstance(nodes.ensure_str(u'über'), str))
self.assertEqual(nodes.ensure_str('over'), 'over')
- if sys.version_info < (3, 0): # strip leading "u" from representation
- self.assertEqual(nodes.ensure_str(u'über'), r'\xfcber')
- else:
- self.assertEqual(nodes.ensure_str(u'über'), r'über')
+ self.assertEqual(nodes.ensure_str(u'über'), r'über')
def test_node_class_names(self):
node_class_names = []
@@ -553,7 +526,7 @@
if failures:
self.fail("%d failures in %d\n%s" % (len(failures), len(self.ids), "\n".join(failures)))
- def test_traverse(self):
+ def test_findall(self):
e = nodes.Element()
e += nodes.Element()
e[0] += nodes.Element()
@@ -561,33 +534,33 @@
e[0][1] += nodes.Text('so...
[truncated message content] |
|
From: <mi...@us...> - 2022-01-04 22:53:41
|
Revision: 8930
http://sourceforge.net/p/docutils/code/8930
Author: milde
Date: 2022-01-04 22:53:36 +0000 (Tue, 04 Jan 2022)
Log Message:
-----------
Small revision of the documentation update.
Modified Paths:
--------------
trunk/docutils/README.txt
trunk/docutils/docs/dev/repository.txt
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2022-01-04 17:03:32 UTC (rev 8929)
+++ trunk/docutils/README.txt 2022-01-04 22:53:36 UTC (rev 8930)
@@ -141,11 +141,6 @@
To install a pre-relase, append the option ``--pre``.
-* For a *manual install* see the options in
- `Setting up for Docutils development`__.
-
- __ docs/dev/policies.html#setting-up-for-docutils-development
-
* To install a `development version`_ from source with `setuptools`_:
* Go to the directory containing the file ``setup.py``.
@@ -155,9 +150,14 @@
* Run ``setup.py install``.
On Windows systems it may be sufficient to double-click ``install.py``.
+ See also OS-specific installation instructions below.
- OS-specific installation instructions follow below.
+* For installing "by hand" or in "development mode", see the
+ `editable installs`_ section in the `Docutils version repository`_
+ documentation.
+ .. _editable installs: docs/dev/repository.html#editable-installs
+
Optional steps:
* `Running the test suite`_
Modified: trunk/docutils/docs/dev/repository.txt
===================================================================
--- trunk/docutils/docs/dev/repository.txt 2022-01-04 17:03:32 UTC (rev 8929)
+++ trunk/docutils/docs/dev/repository.txt 2022-01-04 22:53:36 UTC (rev 8930)
@@ -133,11 +133,8 @@
Editable installs
=================
-The `Docutils project policies`_ require that any modifications must be
-tested_ before check-in_.
There are several ways to ensure that edits to the Docutils code are
picked up by Python.
-
We'll assume that the Docutils "trunk" is checked out under the
``~/projects/`` directory.
@@ -154,8 +151,8 @@
3. Install "manually".
- To ensure the "docutils" package is in ``sys.path``, do one of the
- following:
+ Ensure that the "docutils" package is in ``sys.path`` by
+ one of the following actions:
* Set the ``PYTHONPATH`` environment variable so that Python
picks up your local working copy of the code.
@@ -166,7 +163,7 @@
export PYTHONPATH
The first line points to the directory containing the ``docutils``
- package. The second line exports this environment variable.
+ package. The second line exports the environment variable.
* Create a symlink to the docutils package directory somewhere in the
module search path (``sys.path``), e.g., ::
@@ -178,22 +175,20 @@
__ https://docs.python.org/library/site.html
- Optionally, add some or all `front-end tools`_ from ``docutils/tools``
+ Optionally, add some or all `front-end tools`_
to the binary search path, e.g.,
+ add the ``tools`` directory to the ``PATH`` variable::
- * add the ``tools`` directory to the ``PATH`` variable::
-
PATH=$PATH:$HOME/projects/docutils/docutils/tools
export PATH
- * copy or link idividual front-end tools
- to a suitable place in your binary path::
+ or link idividual front-end tools to a suitable place
+ in the binary path::
ln -s ~/projects/docutils/docutils/tools/docutils-cli.py \
/usr/local/bin/docutils
-5. Before you run anything, every time you make a change, reinstall
- Docutils::
+5. Reinstall Docutils after any change::
python3 setup.py install
@@ -222,9 +217,6 @@
$ cd some-branch/docutils
$ . set-PATHS
-.. _Docutils Project Policies: policies.html
-.. _check-in: policies.html#check-ins
-.. _tested: policies.html#tested
.. _pip: https://pypi.org/project/pip/
.. _setuptools: https://pypi.org/project/setuptools/
.. _front-end tools: ../user/tools.html
@@ -246,6 +238,13 @@
__ http://sourceforge.net/p/forge/documentation/svn/
+Ensure any changes comply with the `Docutils Project Policies`_
+before `checking in`_,
+
+.. _Docutils Project Policies: policies.html
+.. _checking in: policies.html#check-ins
+
+
Setting Up Your Subversion Client For Development
-------------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-04 23:34:02
|
Revision: 8931
http://sourceforge.net/p/docutils/code/8931
Author: milde
Date: 2022-01-04 23:33:59 +0000 (Tue, 04 Jan 2022)
Log Message:
-----------
Deprecate `nodes.reprunicode` and `nodes.ensure_str()`.
Drop uses of the deprecated constructs (not required with Python 3).
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/nodes.py
trunk/docutils/docutils/parsers/rst/directives/misc.py
trunk/docutils/docutils/utils/__init__.py
trunk/docutils/test/test_nodes.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_images.py
trunk/docutils/test/test_utils.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2022-01-04 22:53:36 UTC (rev 8930)
+++ trunk/docutils/HISTORY.txt 2022-01-04 23:33:59 UTC (rev 8931)
@@ -15,9 +15,10 @@
====================
* General
-
- - Dropped support for Python 2.7, 3.5, and 3.6.
+ - Dropped support for Python 2.7, 3.5, and 3.6. and removed compatibility
+ hacks from code and tests.
+
* docutils/parsers/__init__.py
- Alias for the "myst" parser (https://pypi.org/project/myst-docutils).
@@ -42,6 +43,10 @@
- Don't use mutable default values for function arguments. Fixes bug #430.
+* docutils/utils/__init__.py
+
+ - decode_path() returns `str` instance instead of `nodes.reprunicode`.
+
* test/DocutilsTestSupport.py
- exception_data() returns None if no exception was raised.
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2022-01-04 22:53:36 UTC (rev 8930)
+++ trunk/docutils/RELEASE-NOTES.txt 2022-01-04 23:33:59 UTC (rev 8931)
@@ -54,6 +54,9 @@
* Remove the "rawsource" argument from nodes.Text.__init__()
(deprecated and ignored since Docutils 0.18) in Docutils 1.3.
+
+* Remove the compatibility hacks `nodes.reprunicode` and `nodes.ensure_str()`
+ in Docutils 1.2. They are not required with Python 3.x.
* Move math format conversion from docutils/utils/math (called from
docutils/writers/_html_base.py) to a transform__.
Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py 2022-01-04 22:53:36 UTC (rev 8930)
+++ trunk/docutils/docutils/nodes.py 2022-01-04 23:33:59 UTC (rev 8931)
@@ -77,15 +77,6 @@
"""
return True
- if sys.version_info < (3, 0):
- __nonzero__ = __bool__
-
- if sys.version_info < (3, 0):
- # on 2.x, str(node) will be a byte string with Unicode
- # characters > 255 escaped; on 3.x this is no longer necessary
- def __str__(self):
- return unicode(self).encode('raw_unicode_escape')
-
def asdom(self, dom=None):
"""Return a DOM **fragment** representation of this Node."""
if dom is None:
@@ -346,24 +337,25 @@
except (AttributeError, IndexError):
return None
-if sys.version_info < (3, 0):
- class reprunicode(unicode):
- """
- A unicode sub-class that removes the initial u from unicode's repr.
- """
- def __repr__(self):
- return unicode.__repr__(self)[1:]
-else:
- reprunicode = unicode
+class reprunicode(str):
+ """
+ Deprecated backwards compatibility stub. Use the standard `str` instead.
+ """
+ def __init__(self, s):
+ warnings.warn('nodes.reprunicode() is not required with Python 3'
+ ' and will be removed in Docutils 1.2.',
+ DeprecationWarning, stacklevel=2)
+ super().__init__()
def ensure_str(s):
"""
- Failsafe conversion of `unicode` to `str`.
+ Deprecated backwards compatibility stub returning `s`.
"""
- if sys.version_info < (3, 0) and isinstance(s, unicode):
- return s.encode('ascii', 'backslashreplace')
+ warnings.warn('nodes.ensure_str() is not required with Python 3'
+ ' and will be removed in Docutils 1.2.',
+ DeprecationWarning, stacklevel=2)
return s
# definition moved here from `utils` to avoid circular import dependency
@@ -381,12 +373,13 @@
return text
-class Text(Node, reprunicode):
+class Text(Node, str):
"""
Instances are terminal nodes (leaves) containing text only; no child
nodes or attributes. Initialize by passing a string to the constructor.
- Access the text itself with the `astext` method.
+ Access the raw (null-escaped) text with ``str(<instance>)``
+ and unescaped text with the `astext` method.
"""
tagname = '#text'
@@ -394,15 +387,11 @@
children = ()
"""Text nodes have no children, and cannot have children."""
- if sys.version_info > (3, 0):
- def __new__(cls, data, rawsource=None):
- """Assert that `data` is not an array of bytes."""
- if isinstance(data, bytes):
- raise TypeError('expecting str data, not bytes')
- return reprunicode.__new__(cls, data)
- else:
- def __new__(cls, data, rawsource=None):
- return reprunicode.__new__(cls, data)
+ def __new__(cls, data, rawsource=None):
+ """Assert that `data` is not an array of bytes."""
+ if isinstance(data, bytes):
+ raise TypeError('expecting str data, not bytes')
+ return str.__new__(cls, data)
def __init__(self, data, rawsource=None):
"""The `rawsource` argument is ignored and deprecated."""
@@ -415,7 +404,7 @@
data = self
if len(data) > maxlen:
data = data[:maxlen-4] + ' ...'
- return '<%s: %r>' % (self.tagname, reprunicode(data))
+ return '<%s: %r>' % (self.tagname, str(data))
def __repr__(self):
return self.shortrepr(maxlen=68)
@@ -424,7 +413,7 @@
return domroot.createTextNode(unicode(self))
def astext(self):
- return reprunicode(unescape(self))
+ return str(unescape(self))
# Note about __unicode__: The implementation of __unicode__ here,
# and the one raising NotImplemented in the superclass Node had
@@ -436,7 +425,7 @@
# an infinite loop
def copy(self):
- return self.__class__(reprunicode(self))
+ return self.__class__(str(self))
def deepcopy(self):
return self.copy()
@@ -445,7 +434,7 @@
try:
if self.document.settings.detailed:
lines = ['%s%s' % (indent*level, '<#text>')
- ] + [indent*(level+1) + repr(reprunicode(line))
+ ] + [indent*(level+1) + repr(line)
for line in self.splitlines(True)]
return '\n'.join(lines) + '\n'
except AttributeError:
@@ -461,10 +450,10 @@
# taken care of by UserString.
def rstrip(self, chars=None):
- return self.__class__(reprunicode.rstrip(self, chars))
+ return self.__class__(str.rstrip(self, chars))
def lstrip(self, chars=None):
- return self.__class__(reprunicode.lstrip(self, chars))
+ return self.__class__(str.lstrip(self, chars))
class Element(Node):
@@ -589,7 +578,7 @@
break
if self['names']:
return '<%s "%s": %s>' % (self.__class__.__name__,
- '; '.join([ensure_str(n) for n in self['names']]), data)
+ '; '.join(self['names']), data)
else:
return '<%s: %s>' % (self.__class__.__name__, data)
@@ -596,11 +585,11 @@
def shortrepr(self):
if self['names']:
return '<%s "%s"...>' % (self.__class__.__name__,
- '; '.join([ensure_str(n) for n in self['names']]))
+ '; '.join(self['names']))
else:
return '<%s...>' % self.tagname
- def __unicode__(self):
+ def __str__(self):
if self.children:
return u'%s%s%s' % (self.starttag(),
''.join([unicode(c) for c in self.children]),
@@ -608,9 +597,6 @@
else:
return self.emptytag()
- if sys.version_info >= (3, 0):
- __str__ = __unicode__
-
def starttag(self, quoteattr=None):
# the optional arg is used by the docutils_xml writer
if quoteattr is None:
Modified: trunk/docutils/docutils/parsers/rst/directives/misc.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/misc.py 2022-01-04 22:53:36 UTC (rev 8930)
+++ trunk/docutils/docutils/parsers/rst/directives/misc.py 2022-01-04 23:33:59 UTC (rev 8931)
@@ -67,7 +67,6 @@
path = os.path.join(self.standard_include_path, path[1:-1])
path = os.path.normpath(os.path.join(source_dir, path))
path = utils.relative_path(None, path)
- path = nodes.reprunicode(path)
encoding = self.options.get(
'encoding', self.state.document.settings.input_encoding)
e_handler=self.state.document.settings.input_encoding_error_handler
Modified: trunk/docutils/docutils/utils/__init__.py
===================================================================
--- trunk/docutils/docutils/utils/__init__.py 2022-01-04 22:53:36 UTC (rev 8930)
+++ trunk/docutils/docutils/utils/__init__.py 2022-01-04 23:33:59 UTC (rev 8931)
@@ -336,7 +336,7 @@
def decode_path(path):
"""
- Ensure `path` is Unicode. Return `nodes.reprunicode` object.
+ Ensure `path` is Unicode. Return `str` instance.
Decode file/path string in a failsafe manner if not already done.
"""
@@ -348,7 +348,7 @@
path = path.decode(sys.getfilesystemencoding(), 'strict')
except AttributeError: # default value None has no decode method
if not path:
- return nodes.reprunicode('')
+ return ''
raise ValueError('`path` value must be a String or ``None``, not %r'
%path)
except UnicodeDecodeError:
@@ -356,7 +356,7 @@
path = path.decode('utf-8', 'strict')
except UnicodeDecodeError:
path = path.decode('ascii', 'replace')
- return nodes.reprunicode(path)
+ return path
def extract_name_value(line):
Modified: trunk/docutils/test/test_nodes.py
===================================================================
--- trunk/docutils/test/test_nodes.py 2022-01-04 22:53:36 UTC (rev 8930)
+++ trunk/docutils/test/test_nodes.py 2022-01-04 23:33:59 UTC (rev 8931)
@@ -31,7 +31,6 @@
self.assertEqual(repr(self.text), r"<#text: 'Line 1.\nLine 2.'>")
self.assertEqual(self.text.shortrepr(),
r"<#text: 'Line 1.\nLine 2.'>")
- self.assertEqual(nodes.reprunicode('foo'), u'foo')
self.assertEqual(repr(self.unicode_text), u"<#text: 'Möhren'>")
def test_str(self):
@@ -323,19 +322,6 @@
class MiscTests(unittest.TestCase):
- def test_reprunicode(self):
- # return `unicode` instance
- self.assertTrue(isinstance(nodes.reprunicode('foo'), str))
- self.assertEqual(nodes.reprunicode('foo'), u'foo')
- self.assertEqual(nodes.reprunicode(u'Möhre'), u'Möhre')
- # no change to `unicode` under Python 3k
- self.assertEqual(repr(nodes.reprunicode(u'Möhre')), repr(u'Möhre'))
-
- def test_ensure_str(self):
- self.assertTrue(isinstance(nodes.ensure_str(u'über'), str))
- self.assertEqual(nodes.ensure_str('over'), 'over')
- self.assertEqual(nodes.ensure_str(u'über'), r'über')
-
def test_node_class_names(self):
node_class_names = []
for x in dir(nodes):
Modified: trunk/docutils/test/test_parsers/test_rst/test_directives/test_images.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_directives/test_images.py 2022-01-04 22:53:36 UTC (rev 8930)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_images.py 2022-01-04 23:33:59 UTC (rev 8931)
@@ -12,9 +12,7 @@
import __init__
from test_parsers import DocutilsTestSupport
-from docutils.nodes import reprunicode
-
def suite():
s = DocutilsTestSupport.ParserTestSuite()
s.generateTests(totest)
@@ -417,12 +415,12 @@
<system_message level="3" line="1" source="test data" type="ERROR">
<paragraph>
Error in "image" directive:
- invalid option value: (option: "align"; value: %s)
+ invalid option value: (option: "align"; value: 'ä')
"\xe4" unknown; choose from "top", "middle", "bottom", "left", "center", or "right".
<literal_block xml:space="preserve">
.. image:: picture.png
:align: \xe4
-""" % repr(reprunicode(u'\xe4'))],
+"""],
["""
.. image:: test.png
:target: Uppercase_
Modified: trunk/docutils/test/test_utils.py
===================================================================
--- trunk/docutils/test/test_utils.py 2022-01-04 22:53:36 UTC (rev 8930)
+++ trunk/docutils/test/test_utils.py 2022-01-04 23:33:59 UTC (rev 8931)
@@ -288,7 +288,7 @@
self.assertEqual(bytespath, u'späm')
self.assertEqual(unipath, u'späm')
self.assertEqual(defaultpath, u'')
- self.assertTrue(isinstance(bytespath, nodes.reprunicode))
+ self.assertTrue(isinstance(bytespath, str))
self.assertTrue(isinstance(unipath, str))
self.assertTrue(isinstance(defaultpath, str))
self.assertRaises(ValueError, utils.decode_path, 13)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-05 14:59:34
|
Revision: 8932
http://sourceforge.net/p/docutils/code/8932
Author: milde
Date: 2022-01-05 14:59:31 +0000 (Wed, 05 Jan 2022)
Log Message:
-----------
Front-end documentation update and small fix.
Revise/fix front-end tool documentation.
Add support for -h and --help options to rst2odt_prepstyles.py
in order to unify behaviour.
Modified Paths:
--------------
trunk/docutils/docs/user/config.txt
trunk/docutils/docs/user/tools.txt
trunk/docutils/tools/rst2odt_prepstyles.py
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2022-01-04 23:33:59 UTC (rev 8931)
+++ trunk/docutils/docs/user/config.txt 2022-01-05 14:59:31 UTC (rev 8932)
@@ -20,10 +20,12 @@
Configuration Files
-------------------
-Configuration files are used for persistent customization; they can be
-set once and take effect every time you use a front-end tool.
+Configuration files are used for persistent customization;
+they can be set once and take effect every time you use a component,
+e.g., via a `front-end tool`_.
Configuration file settings override the built-in defaults, and
command-line options override all.
+For the technicalities, see `Docutils Runtime Settings`_.
By default, Docutils checks the following places for configuration
files, in the following order:
@@ -63,7 +65,9 @@
``DOCUTILSCONFIG`` environment variable), and its entries will have
priority.
+.. _Docutils Runtime Settings: ../api/runtime-settings.html
+
-------------------------
Configuration File Syntax
-------------------------
@@ -192,6 +196,7 @@
http://www.python.org/doc/current/lib/module-ConfigParser.html
.. _Python: http://www.python.org/
.. _RFC 822: http://www.rfc-editor.org/rfc/rfc822.txt
+.. _front-end tool:
.. _Docutils application: tools.html
@@ -2313,5 +2318,4 @@
.. _literal blocks: ../ref/rst/restructuredtext.html#literal-blocks
.. _option lists: ../ref/rst/restructuredtext.html#option-lists
.. _tables: ../ref/rst/restructuredtext.html#tables
-
.. _table of contents: ../ref/rst/directives.html#contents
Modified: trunk/docutils/docs/user/tools.txt
===================================================================
--- trunk/docutils/docs/user/tools.txt 2022-01-04 23:33:59 UTC (rev 8931)
+++ trunk/docutils/docs/user/tools.txt 2022-01-05 14:59:31 UTC (rev 8932)
@@ -24,16 +24,15 @@
understands the syntax of the text), and a "Writer" (which knows how
to generate a specific data format).
-Most front ends have common options and the same command-line usage
+Most [#]_ front ends have common options and the same command-line usage
pattern::
toolname [options] [<source> [<destination>]]
-(The exceptions are buildhtml.py_ and rstpep2html.py_.) See
-rst2html.py_ for concrete examples. Each tool has a "``--help``"
-option which lists the `command-line options`_ and arguments it
-supports. Processing can also be customized with `configuration
-files`_.
+See rst2html4.py_ for examples.
+Each tool has a "``--help``" option which lists the
+`command-line options`_ and arguments it supports.
+Processing can also be customized with `configuration files`_.
The two arguments, "source" and "destination", are optional. If only
one argument (source) is specified, the standard output (stdout) is
@@ -40,7 +39,13 @@
used for the destination. If no arguments are specified, the standard
input (stdin) is used for the source.
+.. note::
+ Docutils front-end tool support is currently under discussion.
+ Tool names, install details and the set of auto-installed tools
+ may change in future Docutils versions.
+.. [#] The exceptions are buildhtml.py_ and rst2odt_prepstyles.py_.
+
Getting Help
============
@@ -70,6 +75,7 @@
:Parser: reStructuredText, Markdown (reCommonMark)
:Writers: html_, html4css1_, html5_, latex__, manpage_,
odt_, pep_html_, pseudo-xml_, s5_html_, xelatex_, xml_,
+:Config_: See `[docutils-cli application]`_
The ``docutils-cli.py`` front allows combining reader, parser, and
writer components.
@@ -77,13 +83,22 @@
For example, to process a Markdown_ file "``test.md``" into
Pseudo-XML_ ::
- docutils_.py --parser=markdown --writer=pseudoxml test.md test.txt
+ docutils-cli.py --parser=markdown --writer=pseudoxml\
+ test.md test.txt
-__ `Generating LaTeX with Docutils`_
+Use the "--help" option together with the component-selection options
+to get the correct list of supported command-line options. Example::
+
+ docutils-cli.py --parser=markdown --writer=xml --help
+
+__
+.. _latex2e:
.. _Generating LaTeX with Docutils: latex.html
.. _manpage: manpage.html
.. _Markdown: https://www.markdownguide.org/
+.. _[docutils-cli application]: config.html#docutils-cli-application
+
HTML-Generating Tools
=====================
@@ -93,6 +108,7 @@
:Readers: Standalone, PEP
:Parser: reStructuredText
:Writers: html_, html5_, pep_html_
+:Config_: `[buildhtml application]`_
Use ``buildhtml.py`` to generate ``*.html`` from all the ``*.txt`` files
(including PEPs) in each <directory> given, and their subdirectories
@@ -123,6 +139,7 @@
automatically). Command-line options may be used to override config
file settings or replace them altogether.
+.. _[buildhtml application]: config.html#buildhtml-application
.. _configuration file: configuration files
@@ -137,11 +154,14 @@
The default writer may change with the development of HTML, browsers,
Docutils, and the web. Currently, it is html4css1_.
-* Use `rst2html.py`, if you want the output to be up-to-date automatically.
+.. caution::
+ Use docutils-cli.py_ with the `"writer" option`__ or
+ a specific front end like rst2html4.py_ or rst2html5.py_,
+ if you depend on stability of the generated HTML code
+ (e.g., because you use a custom style sheet or post-processing
+ that may break otherwise).
-* Use a specific front end, if you depend on stability of the
- generated HTML code, e.g. because you use a custom style sheet or
- post-processing that may break otherwise.
+ __ config.html#writer-docutils-cli-application
rst2html4.py
@@ -346,7 +366,7 @@
:Reader: Standalone
:Parser: reStructuredText
-:Writer: latex2e
+:Writer: latex2e_
The ``rst2latex.py`` front end reads standalone reStructuredText
source files and produces LaTeX_ output. For example, to process a
@@ -368,7 +388,7 @@
:Writer: _`xelatex`
The ``rst2xetex.py`` front end reads standalone reStructuredText source
-files and produces `LaTeX` output for processing with unicode-aware
+files and produces `LaTeX` output for processing with Unicode-aware
TeX engines (`LuaTeX`_ or `XeTeX`_). For example, to process a
reStructuredText file "``test.txt``" into LaTeX::
@@ -409,21 +429,34 @@
:Reader: Standalone
:Parser: reStructuredText
-:Writer: ODF/odt
+:Writer: odt_
The ``rst2odt.py`` front end reads standalone reStructuredText
source files and produces ODF/.odt files that can be read, edited,
-printed, etc with OpenOffice ``oowriter`` or LibreOffice.
-(http://www.openoffice.org/). A stylesheet file is required. A
+printed, etc with OpenOffice_ ``oowriter`` or LibreOffice_ ``lowriter``.
+A stylesheet file is required. A
stylesheet file is an OpenOffice .odt file containing definitions
-of the styles required for ``rst2odt.py``. You can learn more
-about how to use ``rst2odt.py``, the styles used ``rst2odt.py``,
-etc from `Odt Writer for Docutils`_.
+of the styles required for ``rst2odt.py``.
+For details, see `Odt Writer for Docutils`_.
-.. _Odt Writer for Docutils:
-.. _odt: odt.html
+.. _OpenOffice: https://www.openoffice.org/
+.. _LibreOffice: https://www.libreoffice.org/
+.. _odt:
+.. _Odt Writer for Docutils: odt.html
+rst2odt_prepstyles.py
+`````````````````````
+A helper tool to fix a word-processor-generated STYLE_FILE.odt for
+odtwriter use::
+
+ rst2odt_prepstyles STYLE_FILE.odt
+
+See `Odt Writer for Docutils`__ for details.
+
+__ odt.html#page-size
+
+
reStructuredText-Generating Tools
=================================
@@ -480,19 +513,29 @@
parser. It does not use a Docutils Reader or Writer or the standard
Docutils command-line options. Rather, it does its own I/O and calls
the parser directly. No transforms are applied to the parsed
-document. Various forms output are possible:
+document. Possible output forms output include:
-- Pretty-printed pseudo-XML (default)
-- Test data (Python list of input and pseudo-XML output strings;
- useful for creating new test cases)
-- Pretty-printed native XML
-- Raw native XML (with or without a stylesheet reference)
+--pretty Pretty-printed pseudo-XML (default)
+--test Test data (Python list of input and pseudo-XML output strings;
+ useful for creating new test cases)
+--xml Pretty-printed native XML
+--rawxml Raw native XML (with or without a stylesheet reference)
+--help Usage hint and complete list of supported options.
+
---------------
Customization
---------------
+Most front-end tools support the options/settings from the generic
+`configuration file sections`_ plus the sections of their components
+(reader, writer, parser). [#]_
+Some front-end tools also add application-specific settings.
+
+.. [#] The exceptions are quicktest.py_ and rst2odt_prepstyles.py_.
+
+
Command-Line Options
====================
@@ -513,6 +556,9 @@
names are listed in the `Docutils Configuration`_ document.
.. _Docutils Configuration: config.html
+.. _Config:
+.. _configuration file sections:
+ config.html#configuration-file-sections-entries
..
Modified: trunk/docutils/tools/rst2odt_prepstyles.py
===================================================================
--- trunk/docutils/tools/rst2odt_prepstyles.py 2022-01-04 23:33:59 UTC (rev 8931)
+++ trunk/docutils/tools/rst2odt_prepstyles.py 2022-01-05 14:59:31 UTC (rev 8932)
@@ -53,7 +53,7 @@
def main():
args = sys.argv[1:]
- if len(args) != 1:
+ if len(args) != 1 or args[0] in ('-h', '--help'):
print(__doc__, file=sys.stderr)
print("Usage: %s STYLE_FILE.odt\n" % sys.argv[0], file=sys.stderr)
sys.exit(1)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|