|
From: <mi...@us...> - 2022-01-06 00:26:22
|
Revision: 8933
http://sourceforge.net/p/docutils/code/8933
Author: milde
Date: 2022-01-06 00:26:19 +0000 (Thu, 06 Jan 2022)
Log Message:
-----------
Fix/silence DeprecationWarnings and RessourceWarnings.
Found by Tomasz K{U+0142}oczko running "pytest" (cf. feature-request #81)
and by running `python3 -W all alltests.py`.
Modified Paths:
--------------
trunk/docutils/docutils/parsers/rst/directives/images.py
trunk/docutils/docutils/writers/html4css1/__init__.py
trunk/docutils/test/DocutilsTestSupport.py
trunk/docutils/test/test_dependencies.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_rst/test_directives/test_tables.py
trunk/docutils/test/test_settings.py
trunk/docutils/test/test_transforms/test_writer_aux.py
Modified: trunk/docutils/docutils/parsers/rst/directives/images.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/images.py 2022-01-05 14:59:31 UTC (rev 8932)
+++ trunk/docutils/docutils/parsers/rst/directives/images.py 2022-01-06 00:26:19 UTC (rev 8933)
@@ -129,15 +129,14 @@
if PIL and self.state.document.settings.file_insertion_enabled:
imagepath = url2pathname(image_node['uri'])
try:
- img = PIL.Image.open(
- imagepath.encode(sys.getfilesystemencoding()))
+ with PIL.Image.open(imagepath.encode(
+ sys.getfilesystemencoding())) as img:
+ figure_node['width'] = '%dpx' % img.size[0]
except (IOError, UnicodeEncodeError):
pass # TODO: warn?
else:
self.state.document.settings.record_dependencies.add(
imagepath.replace('\\', '/'))
- figure_node['width'] = '%dpx' % img.size[0]
- del img
elif figwidth is not None:
figure_node['width'] = figwidth
if figclasses:
Modified: trunk/docutils/docutils/writers/html4css1/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html4css1/__init__.py 2022-01-05 14:59:31 UTC (rev 8932)
+++ trunk/docutils/docutils/writers/html4css1/__init__.py 2022-01-06 00:26:19 UTC (rev 8933)
@@ -564,8 +564,9 @@
and self.settings.file_insertion_enabled):
imagepath = url2pathname(uri)
try:
- img = PIL.Image.open(
- imagepath.encode(sys.getfilesystemencoding()))
+ with PIL.Image.open(imagepath.encode(
+ sys.getfilesystemencoding())) as img:
+ img_size = img.size
except (IOError, UnicodeEncodeError):
pass # TODO: warn?
else:
@@ -572,10 +573,9 @@
self.settings.record_dependencies.add(
imagepath.replace('\\', '/'))
if 'width' not in atts:
- atts['width'] = '%dpx' % img.size[0]
+ atts['width'] = '%dpx' % img_size[0]
if 'height' not in atts:
- atts['height'] = '%dpx' % img.size[1]
- del img
+ atts['height'] = '%dpx' % img_size[1]
for att_name in 'width', 'height':
if att_name in atts:
match = re.match(r'([0-9.]+)(\S*)$', atts[att_name])
Modified: trunk/docutils/test/DocutilsTestSupport.py
===================================================================
--- trunk/docutils/test/DocutilsTestSupport.py 2022-01-05 14:59:31 UTC (rev 8932)
+++ trunk/docutils/test/DocutilsTestSupport.py 2022-01-06 00:26:19 UTC (rev 8933)
@@ -538,8 +538,6 @@
import recommonmark
if recommonmark.__version__ != '0.4.0':
return
- # suppress UserWarnings from recommonmark parser
- warnings.filterwarnings('ignore', message='Unsupported.*type')
ParserTestSuite.generateTests(self, dict, dictname='totest')
Modified: trunk/docutils/test/test_dependencies.py
===================================================================
--- trunk/docutils/test/test_dependencies.py 2022-01-05 14:59:31 UTC (rev 8932)
+++ trunk/docutils/test/test_dependencies.py 2022-01-06 00:26:19 UTC (rev 8933)
@@ -49,7 +49,7 @@
encoding='utf8')
return record.read().splitlines()
- def test_dependencies(self):
+ def test_dependencies_xml(self):
# Note: currently, raw input files are read (and hence recorded) while
# parsing even if not used in the chosen output format.
# This should change (see parsers/rst/directives/misc.py).
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py 2022-01-05 14:59:31 UTC (rev 8932)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py 2022-01-06 00:26:19 UTC (rev 8933)
@@ -15,6 +15,7 @@
import sys
import unittest
+import warnings
if __name__ == '__main__':
import __init__
@@ -62,6 +63,9 @@
@unittest.skipUnless(parser_class, skip_msg)
def test_raw_disabled(self):
+ # silence Warnings in recommonmark (unmaintained 3rd party module):
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ module='recommonmark')
output = publish_string(sample_with_html, parser_name='recommonmark',
settings_overrides={'warning_stream': '',
'raw_enabled': False,
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-05 14:59:31 UTC (rev 8932)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_section_headers.py 2022-01-06 00:26:19 UTC (rev 8933)
@@ -31,8 +31,7 @@
=========
Paragraph.
""",
-"""\
-<document source="test data">
+r"""<document source="test data">
<section ids="the-title" names="the\ title">
<title>
The Title
@@ -44,8 +43,7 @@
=====================
Paragraph (no blank line required).
""",
-"""\
-<document source="test data">
+r"""<document source="test data">
<section ids="another-section-title" names="another\ section\ title">
<title>
Another Section Title
@@ -158,7 +156,7 @@
### Title 5
""",
-"""\
+r"""
<document source="test data">
<paragraph>
Test bad subsection order.
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 2022-01-05 14:59:31 UTC (rev 8932)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_tables.py 2022-01-06 00:26:19 UTC (rev 8933)
@@ -47,8 +47,7 @@
with open(utf_16_csv, 'rb') as f:
csv_data = f.read()
csv_data = str(csv_data, 'latin1').splitlines()
- reader = csv.reader([tables.CSVTable.encode_for_csv(line + '\n')
- for line in csv_data])
+ reader = csv.reader([line + '\n' for line in csv_data])
next(reader)
null_bytes_exception = DocutilsTestSupport.exception_data(null_bytes)[0]
Modified: trunk/docutils/test/test_settings.py
===================================================================
--- trunk/docutils/test/test_settings.py 2022-01-05 14:59:31 UTC (rev 8932)
+++ trunk/docutils/test/test_settings.py 2022-01-06 00:26:19 UTC (rev 8933)
@@ -122,6 +122,8 @@
warnings.simplefilter("always") # check also for deprecation warning
self.compare_output(self.files_settings('old'),
self.expected_settings('old'))
+ warnings.filterwarnings(action='ignore',
+ category=frontend.ConfigDeprecationWarning)
self.assertEqual(len(wng), 1, "Expected a FutureWarning.")
assert issubclass(wng[-1].category, FutureWarning)
Modified: trunk/docutils/test/test_transforms/test_writer_aux.py
===================================================================
--- trunk/docutils/test/test_transforms/test_writer_aux.py 2022-01-05 14:59:31 UTC (rev 8932)
+++ trunk/docutils/test/test_transforms/test_writer_aux.py 2022-01-06 00:26:19 UTC (rev 8933)
@@ -23,34 +23,6 @@
totest = {}
-totest['compound'] = ((writer_aux.Compound,), [
-["""\
-.. class:: compound
-
-.. compound::
-
- .. class:: paragraph1
-
- Paragraph 1.
-
- .. class:: paragraph2
-
- Paragraph 2.
-
- Block quote.
-""",
-"""\
-<document source="test data">
- <paragraph classes="paragraph1 compound">
- Paragraph 1.
- <paragraph classes="paragraph2 continued">
- Paragraph 2.
- <block_quote classes="continued">
- <paragraph>
- Block quote.
-"""],
-])
-
totest['admonitions'] = ((writer_aux.Admonitions,), [
["""\
.. note::
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-06 14:52:56
|
Revision: 8934
http://sourceforge.net/p/docutils/code/8934
Author: milde
Date: 2022-01-06 14:52:54 +0000 (Thu, 06 Jan 2022)
Log Message:
-----------
Remove lingering references to Python 2.
Based on Patch 1/6 by Adam Turner (patches #188).
Modified Paths:
--------------
trunk/docutils/docs/dev/distributing.txt
trunk/docutils/docs/dev/release.txt
trunk/docutils/docs/dev/repository.txt
trunk/docutils/docs/user/config.txt
trunk/docutils/docs/user/links.txt
trunk/docutils/setup.py
Modified: trunk/docutils/docs/dev/distributing.txt
===================================================================
--- trunk/docutils/docs/dev/distributing.txt 2022-01-06 00:26:19 UTC (rev 8933)
+++ trunk/docutils/docs/dev/distributing.txt 2022-01-06 14:52:54 UTC (rev 8934)
@@ -28,8 +28,8 @@
Docutils has the following dependencies:
-* Python 2.7 or later is required. Use ">= Python 2.7" in the
- dependencies.
+* Python 3.7 or later is required.
+ Use ">= Python 3.7" in the dependencies.
* Docutils may optionally make use of the PIL (`Python Imaging
Library`_ or Pillow_). If PIL is present, it is automatically
Modified: trunk/docutils/docs/dev/release.txt
===================================================================
--- trunk/docutils/docs/dev/release.txt 2022-01-06 00:26:19 UTC (rev 8933)
+++ trunk/docutils/docs/dev/release.txt 2022-01-06 14:52:54 UTC (rev 8934)
@@ -30,7 +30,6 @@
Run tests ::
export PYTHONWARNINGS=default
- python2 test/alltests.py
python3 test/alltests.py
or use tox.
@@ -46,19 +45,6 @@
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
- Wait some minutes to test in virtualenv ::
-
- python2 -m virtualenv py2.7 ; cd py2.7
- export PYTHONPATH= ; . bin/activate
-
- python -m pip install --index-url https://test.pypi.org/simple/ --no-deps docutils
-
- cp -Lr ../docutils-code/docutils/test .
- python test/alltests.py
-
- python -m pip uninstall docutils
- deactivate ; cd .. ; rm -r py2.7
-
Test in venv ::
python3 -m venv du3 ; cd du3
@@ -105,15 +91,6 @@
deactivate ; cd .. ; rm -r du3
- python2 -m virtualenv du2 ; cd du2
- export PYTHONPATH= ; . bin/activate
-
- pip install --no-deps docutils
- cp -Lr ../docutils-code/docutils/test .
- python test/alltests.py
-
- deactivate ; cd .. ; rm -r du2
-
* Notify to docutils-developer and user.
* upload source and generated html to sf-htdocs/0.## ::
@@ -136,7 +113,7 @@
- Select docutils-0.16.tar.gz as default for all OS.
* set_version 0.#.#+1b.dev
-* test with py2 and py3
+* test with py3
* docutils/HISTORY.txt: add title "Changes Since 0.##"
* run sandbox/infrastructure/docutils-update.local
Modified: trunk/docutils/docs/dev/repository.txt
===================================================================
--- trunk/docutils/docs/dev/repository.txt 2022-01-06 00:26:19 UTC (rev 8933)
+++ trunk/docutils/docs/dev/repository.txt 2022-01-06 14:52:54 UTC (rev 8934)
@@ -148,6 +148,8 @@
__ https://setuptools.pypa.io/en/latest/userguide/development_mode.html
#development-mode
+
+ .. _install manually:
3. Install "manually".
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2022-01-06 00:26:19 UTC (rev 8933)
+++ trunk/docutils/docs/user/config.txt 2022-01-06 14:52:54 UTC (rev 8934)
@@ -900,10 +900,6 @@
.. Caution::
- * In Python versions older than 2.7.3 and 3.2.3, the newlines_ and
- indents_ options may adversely affect whitespace; use them only for
- reading convenience (see http://bugs.python.org/issue4147).
-
* The XML declaration carries text encoding information. If the encoding
is not UTF-8 or ASCII and the XML declaration is missing, standard
tools may be unable to read the generated XML.
Modified: trunk/docutils/docs/user/links.txt
===================================================================
--- trunk/docutils/docs/user/links.txt 2022-01-06 00:26:19 UTC (rev 8933)
+++ trunk/docutils/docs/user/links.txt 2022-01-06 14:52:54 UTC (rev 8934)
@@ -362,8 +362,7 @@
documentation of Software (and other) *projects* (but other documents
can be written with it too).
- Since version 2.6, the `Python documentation`_ is based on
- reStructuredText and Sphinx.
+ The `Python documentation`_ is based on reStructuredText and Sphinx.
.. _Python documentation: http://docs.python.org/
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2022-01-06 00:26:19 UTC (rev 8933)
+++ trunk/docutils/setup.py 2022-01-06 14:52:54 UTC (rev 8934)
@@ -9,14 +9,20 @@
try:
from setuptools import setup
except ImportError:
- print('Error: The "setuptools" module, which is required for the')
- print(' installation of Docutils, could not be found.\n')
- print(' You may install it with `python -m pip install setuptools`')
- print(' or from a package called "python-setuptools" (or similar)')
- print(' using your system\'s package manager.\n')
- print(' Alternatively, install a release from PyPi with')
- print(' `python -m pip install docutils`.')
-
+ print("""\
+Error: The "setuptools" module, which is required for the
+ installation of Docutils, could not be found.
+
+ You may install it with `python -m pip install setuptools`
+ or from a package called "python-setuptools" (or similar)
+ using your system\'s package manager.
+
+ Alternatively, install a release from PyPi with
+ `python -m pip install docutils`.'
+
+ If all this fails, try a "manual install".
+ https://docutils.sourceforge.io/docs/dev/repository.html#install-manually
+""")
sys.exit(1)
@@ -36,9 +42,9 @@
'maintainer_email': 'doc...@li...',
'license': 'public domain, Python, 2-Clause BSD, GPL 3 (see COPYING.txt)',
'platforms': 'OS-independent',
- 'python_requires': '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
+ 'python_requires': '>=3.7',
'include_package_data': True,
- 'exclude_package_data': {"": ["docutils.conf"]},
+ 'exclude_package_data': {"": ["docutils.conf"]},
'package_dir': {
'docutils': 'docutils',
'docutils.tools': 'tools'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-07 20:12:03
|
Revision: 8937
http://sourceforge.net/p/docutils/code/8937
Author: milde
Date: 2022-01-07 20:12:00 +0000 (Fri, 07 Jan 2022)
Log Message:
-----------
Drop use of utils.error_reporting module and deprecate it.
SafeString not required in Python 3
ErrorString obsoleted by new function io.error_string().
ErrorOutput and locale_encoding moved to docutils.io.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/core.py
trunk/docutils/docutils/frontend.py
trunk/docutils/docutils/io.py
trunk/docutils/docutils/parsers/rst/directives/misc.py
trunk/docutils/docutils/parsers/rst/directives/tables.py
trunk/docutils/docutils/statemachine.py
trunk/docutils/docutils/utils/__init__.py
trunk/docutils/docutils/utils/error_reporting.py
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/test/test_error_reporting.py
trunk/docutils/test/test_io.py
trunk/docutils/test/test_writers/test_latex2e.py
trunk/docutils/tools/buildhtml.py
trunk/docutils/tools/docutils-cli.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2022-01-07 20:11:44 UTC (rev 8936)
+++ trunk/docutils/HISTORY.txt 2022-01-07 20:12:00 UTC (rev 8937)
@@ -46,7 +46,13 @@
* docutils/utils/__init__.py
- decode_path() returns `str` instance instead of `nodes.reprunicode`.
+ - new function error_string() obsoletes utils.error_reporting.ErrorString.
+ - class ErrorOutput moved here from docutils/utils/error_reporting.py
+* docutils/utils/error_reporting.py
+
+ - Add deprecation warning.
+
* test/DocutilsTestSupport.py
- exception_data() returns None if no exception was raised.
Modified: trunk/docutils/docutils/core.py
===================================================================
--- trunk/docutils/docutils/core.py 2022-01-07 20:11:44 UTC (rev 8936)
+++ trunk/docutils/docutils/core.py 2022-01-07 20:12:00 UTC (rev 8937)
@@ -20,7 +20,6 @@
from docutils import frontend, io, utils, readers, writers
from docutils.frontend import OptionParser
from docutils.transforms import Transformer
-from docutils.utils.error_reporting import ErrorOutput, ErrorString
import docutils.readers.doctree
class Publisher(object):
@@ -75,7 +74,7 @@
"""An object containing Docutils settings as instance attributes.
Set by `self.process_command_line()` or `self.get_settings()`."""
- self._stderr = ErrorOutput()
+ self._stderr = io.ErrorOutput()
def set_reader(self, reader_name, parser, parser_name):
"""Set `self.reader` by name."""
@@ -264,13 +263,13 @@
self.report_UnicodeError(error)
elif isinstance(error, io.InputError):
self._stderr.write(u'Unable to open source file for reading:\n'
- u' %s\n' % ErrorString(error))
+ u' %s\n' % io.error_string(error))
elif isinstance(error, io.OutputError):
self._stderr.write(
u'Unable to open destination file for writing:\n'
- u' %s\n' % ErrorString(error))
+ u' %s\n' % io.error_string(error))
else:
- print(u'%s' % ErrorString(error), file=self._stderr)
+ print(u'%s' % io.error_string(error), file=self._stderr)
print(("""\
Exiting due to error. Use "--traceback" to diagnose.
Please report errors to <doc...@li...>.
@@ -309,7 +308,7 @@
'Include "--traceback" output, Docutils version (%s),\n'
'Python version (%s), your OS type & version, and the\n'
'command line used.\n'
- % (ErrorString(error),
+ % (io.error_string(error),
self.settings.output_encoding,
data.encode('ascii', 'xmlcharrefreplace'),
data.encode('ascii', 'backslashreplace'),
Modified: trunk/docutils/docutils/frontend.py
===================================================================
--- trunk/docutils/docutils/frontend.py 2022-01-07 20:11:44 UTC (rev 8936)
+++ trunk/docutils/docutils/frontend.py 2022-01-07 20:12:00 UTC (rev 8937)
@@ -39,10 +39,7 @@
import warnings
import docutils
-import docutils.utils
-import docutils.nodes
-from docutils.utils.error_reporting import (locale_encoding, SafeString,
- ErrorOutput, ErrorString)
+from docutils import io
def store_multiple(option, opt, value, parser, *args, **kwargs):
@@ -63,8 +60,8 @@
"""
try:
new_settings = parser.get_config_file_settings(value)
- except ValueError as error:
- parser.error(error)
+ except ValueError as err:
+ parser.error(err)
parser.values.update(new_settings, parser)
def validate_encoding(setting, value, option_parser,
@@ -349,10 +346,10 @@
value = getattr(values, setting)
try:
new_value = self.validator(setting, value, parser)
- except Exception as error:
+ except Exception as err:
raise optparse.OptionValueError(
'Error in option "%s":\n %s'
- % (opt, ErrorString(error)))
+ % (opt, io.error_string(err)))
setattr(values, setting, new_value)
if self.overrides:
setattr(values, self.overrides, None)
@@ -607,8 +604,8 @@
if read_config_files and not self.defaults['_disable_config']:
try:
config_settings = self.get_standard_config_settings()
- except ValueError as error:
- self.error(SafeString(error))
+ except ValueError as err:
+ self.error(err)
self.set_defaults_from_dict(config_settings.__dict__)
def populate_from_components(self, components):
@@ -766,7 +763,7 @@
self._files = []
"""List of paths of configuration files read."""
- self._stderr = ErrorOutput()
+ self._stderr = io.ErrorOutput()
"""Wrapper around sys.stderr catching en-/decoding errors"""
def read(self, filenames, option_parser):
@@ -825,12 +822,12 @@
new_value = option.validator(
setting, value, option_parser,
config_parser=self, config_section=section)
- except Exception as error:
+ except Exception as err:
raise ValueError(
'Error in config file "%s", section "[%s]":\n'
' %s\n'
' %s = %s'
- % (filename, section, ErrorString(error),
+ % (filename, section, io.error_string(err),
setting, value))
self.set(section, setting, new_value)
if option.overrides:
Modified: trunk/docutils/docutils/io.py
===================================================================
--- trunk/docutils/docutils/io.py 2022-01-07 20:11:44 UTC (rev 8936)
+++ trunk/docutils/docutils/io.py 2022-01-07 20:12:00 UTC (rev 8937)
@@ -10,6 +10,10 @@
__docformat__ = 'reStructuredText'
import codecs
+try:
+ import locale # module missing in Jython
+except ImportError:
+ pass
import os
import re
import sys
@@ -16,12 +20,32 @@
import warnings
from docutils import TransformSpec
-from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
+# Guess the locale's encoding.
+# If no valid guess can be made, locale_encoding is set to `None`:
+try:
+ locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
+except ValueError as error: # OS X may set UTF-8 without language code
+ # See http://bugs.python.org/issue18378 fixed in 3.8
+ # and https://sourceforge.net/p/docutils/bugs/298/.
+ # Drop the special case after requiring Python >= 3.8
+ if "unknown locale: UTF-8" in error.args:
+ locale_encoding = "UTF-8"
+ else:
+ locale_encoding = None
+except: # any other problems determining the locale -> use None
+ locale_encoding = None
+try:
+ codecs.lookup(locale_encoding or '')
+except LookupError:
+ locale_encoding = None
+
+
class InputError(IOError): pass
class OutputError(IOError): pass
+
def check_encoding(stream, encoding):
"""Test, whether the encoding of `stream` matches `encoding`.
@@ -37,7 +61,12 @@
except (LookupError, AttributeError, TypeError):
return None
+def error_string(err):
+ """Return string representation of Exception `err`.
+ """
+ return f'{err.__class__.__name__}: {err}'
+
class Input(TransformSpec):
"""
@@ -120,7 +149,7 @@
raise UnicodeError(
'Unable to decode input data. Tried the following encodings: '
'%s.\n(%s)' % (', '.join([repr(enc) for enc in encodings]),
- ErrorString(error)))
+ error_string(error)))
coding_slug = re.compile(br"coding[:=]\s*([-\w.]+)")
"""Encoding declaration pattern."""
@@ -197,6 +226,86 @@
return data.encode(self.encoding, self.error_handler)
+class ErrorOutput(object):
+ """
+ Wrapper class for file-like error streams with
+ failsafe de- and encoding of `str`, `bytes`, `unicode` and
+ `Exception` instances.
+ """
+
+ def __init__(self, destination=None, encoding=None,
+ encoding_errors='backslashreplace',
+ decoding_errors='replace'):
+ """
+ :Parameters:
+ - `destination`: a file-like object,
+ a string (path to a file),
+ `None` (write to `sys.stderr`, default), or
+ evaluating to `False` (write() requests are ignored).
+ - `encoding`: `destination` text encoding. Guessed if None.
+ - `encoding_errors`: how to treat encoding errors.
+ """
+ if destination is None:
+ destination = sys.stderr
+ elif not destination:
+ destination = False
+ # if `destination` is a file name, open it
+ elif isinstance(destination, str):
+ destination = open(destination, 'w')
+
+ self.destination = destination
+ """Where warning output is sent."""
+
+ self.encoding = (encoding or getattr(destination, 'encoding', None) or
+ locale_encoding or 'ascii')
+ """The output character encoding."""
+
+ self.encoding_errors = encoding_errors
+ """Encoding error handler."""
+
+ self.decoding_errors = decoding_errors
+ """Decoding error handler."""
+
+ def write(self, data):
+ """
+ Write `data` to self.destination. Ignore, if self.destination is False.
+
+ `data` can be a `bytes`, `str`, or `Exception` instance.
+ """
+ if not self.destination:
+ return
+ if isinstance(data, Exception):
+ data = str(data)
+ try:
+ self.destination.write(data)
+ except UnicodeEncodeError:
+ self.destination.write(data.encode(self.encoding,
+ self.encoding_errors))
+ except TypeError:
+ if isinstance(data, str): # destination may expect bytes
+ self.destination.write(data.encode(self.encoding,
+ self.encoding_errors))
+ elif self.destination in (sys.stderr, sys.stdout):
+ self.destination.buffer.write(data) # write bytes to raw stream
+ else:
+ self.destination.write(str(data, self.encoding,
+ self.decoding_errors))
+
+ def close(self):
+ """
+ Close the error-output stream.
+
+ Ignored if the destination is` sys.stderr` or `sys.stdout` or has no
+ close() method.
+ """
+ if self.destination in (sys.stdout, sys.stderr):
+ return
+ try:
+ self.destination.close()
+ except AttributeError:
+ pass
+
+
class FileInput(Input):
"""
@@ -362,12 +471,12 @@
"""
if not self.opened:
self.open()
- if ('b' not in self.mode
+ if ('b' not in self.mode
and check_encoding(self.destination, self.encoding) is False):
data = self.encode(data)
if os.linesep != '\n':
# fix endings
- data = data.replace(b'\n', bytes(os.linesep, 'ascii'))
+ data = data.replace(b'\n', bytes(os.linesep, 'ascii'))
try:
self.destination.write(data)
except TypeError as err:
@@ -386,7 +495,7 @@
except (UnicodeError, LookupError) as err:
raise UnicodeError(
'Unable to encode output data. output-encoding is: '
- '%s.\n(%s)' % (self.encoding, ErrorString(err)))
+ '%s.\n(%s)' % (self.encoding, error_string(err)))
finally:
if self.autoclose:
self.close()
Modified: trunk/docutils/docutils/parsers/rst/directives/misc.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/misc.py 2022-01-07 20:11:44 UTC (rev 8936)
+++ trunk/docutils/docutils/parsers/rst/directives/misc.py 2022-01-07 20:12:00 UTC (rev 8937)
@@ -11,8 +11,6 @@
import re
import time
from docutils import io, nodes, statemachine, utils
-from docutils.utils.error_reporting import SafeString, ErrorString
-from docutils.utils.error_reporting import locale_encoding
from docutils.parsers.rst import Directive, convert_directive_function
from docutils.parsers.rst import directives, roles, states
from docutils.parsers.rst.directives.body import CodeBlock, NumberLines
@@ -81,10 +79,10 @@
raise self.severe(u'Problems with "%s" directive path:\n'
'Cannot encode input file path "%s" '
'(wrong locale?).' %
- (self.name, SafeString(path)))
+ (self.name, path))
except IOError as error:
raise self.severe(u'Problems with "%s" directive path:\n%s.' %
- (self.name, ErrorString(error)))
+ (self.name, io.error_string(error)))
# Get to-be-included content
startline = self.options.get('start-line', None)
@@ -97,7 +95,7 @@
rawtext = include_file.read()
except UnicodeError as error:
raise self.severe(u'Problem with "%s" directive:\n%s' %
- (self.name, ErrorString(error)))
+ (self.name, io.error_string(error)))
# start-after/end-before: no restrictions on newlines in match-text,
# and no restrictions on matching inside lines vs. line boundaries
after_text = self.options.get('start-after', None)
@@ -255,12 +253,12 @@
self.state.document.settings.record_dependencies.add(path)
except IOError as error:
raise self.severe(u'Problems with "%s" directive path:\n%s.'
- % (self.name, ErrorString(error)))
+ % (self.name, io.error_string(error)))
try:
text = raw_file.read()
except UnicodeError as error:
raise self.severe(u'Problem with "%s" directive:\n%s'
- % (self.name, ErrorString(error)))
+ % (self.name, io.error_string(error)))
attributes['source'] = path
elif 'url' in self.options:
source = self.options['url']
@@ -273,7 +271,7 @@
raw_text = urlopen(source).read()
except (URLError, IOError, OSError) as error:
raise self.severe(u'Problems with "%s" directive URL "%s":\n%s.'
- % (self.name, self.options['url'], ErrorString(error)))
+ % (self.name, self.options['url'], io.error_string(error)))
raw_file = io.StringInput(source=raw_text, source_path=source,
encoding=encoding,
error_handler=e_handler)
@@ -281,7 +279,7 @@
text = raw_file.read()
except UnicodeError as error:
raise self.severe(u'Problem with "%s" directive:\n%s'
- % (self.name, ErrorString(error)))
+ % (self.name, io.error_string(error)))
attributes['source'] = source
else:
# This will always fail because there is no content.
@@ -364,7 +362,7 @@
decoded = directives.unicode_code(code)
except ValueError as error:
raise self.error(u'Invalid character code: %s\n%s'
- % (code, ErrorString(error)))
+ % (code, io.error_string(error)))
element += nodes.Text(decoded)
return element.children
@@ -460,7 +458,7 @@
except ValueError as detail:
error = self.state_machine.reporter.error(
u'Invalid argument for "%s" directive:\n%s.'
- % (self.name, SafeString(detail)), nodes.literal_block(
+ % (self.name, detail), nodes.literal_block(
self.block_text, self.block_text), line=self.lineno)
return messages + [error]
role = roles.CustomRole(new_role_name, base_role, options, content)
Modified: trunk/docutils/docutils/parsers/rst/directives/tables.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/tables.py 2022-01-07 20:11:44 UTC (rev 8936)
+++ trunk/docutils/docutils/parsers/rst/directives/tables.py 2022-01-07 20:12:00 UTC (rev 8937)
@@ -15,7 +15,6 @@
import warnings
from docutils import io, nodes, statemachine, utils
-from docutils.utils.error_reporting import SafeString
from docutils.utils import SystemMessagePropagation
from docutils.parsers.rst import Directive
from docutils.parsers.rst import directives
@@ -324,7 +323,7 @@
except IOError as error:
severe = self.state_machine.reporter.severe(
u'Problems with "%s" directive path:\n%s.'
- % (self.name, SafeString(error)),
+ % (self.name, error),
nodes.literal_block(self.block_text, self.block_text),
line=self.lineno)
raise SystemMessagePropagation(severe)
@@ -342,7 +341,7 @@
except (URLError, IOError, OSError, ValueError) as error:
severe = self.state_machine.reporter.severe(
'Problems with "%s" directive URL "%s":\n%s.'
- % (self.name, self.options['url'], SafeString(error)),
+ % (self.name, self.options['url'], error),
nodes.literal_block(self.block_text, self.block_text),
line=self.lineno)
raise SystemMessagePropagation(severe)
Modified: trunk/docutils/docutils/statemachine.py
===================================================================
--- trunk/docutils/docutils/statemachine.py 2022-01-07 20:11:44 UTC (rev 8936)
+++ trunk/docutils/docutils/statemachine.py 2022-01-07 20:12:00 UTC (rev 8937)
@@ -110,8 +110,7 @@
import re
from unicodedata import east_asian_width
-from docutils import utils
-from docutils.utils.error_reporting import ErrorOutput
+from docutils import io, utils
class StateMachine(object):
@@ -171,7 +170,7 @@
line changes. Observers are called with one argument, ``self``.
Cleared at the end of `run()`."""
- self._stderr = ErrorOutput()
+ self._stderr = io.ErrorOutput()
"""Wrapper around sys.stderr catching en-/decoding errors"""
Modified: trunk/docutils/docutils/utils/__init__.py
===================================================================
--- trunk/docutils/docutils/utils/__init__.py 2022-01-07 20:11:44 UTC (rev 8936)
+++ trunk/docutils/docutils/utils/__init__.py 2022-01-07 20:12:00 UTC (rev 8937)
@@ -16,10 +16,8 @@
import warnings
import unicodedata
from docutils import ApplicationError, DataError, __version_info__
-from docutils import nodes
+from docutils import io, nodes
from docutils.nodes import unescape
-import docutils.io
-from docutils.utils.error_reporting import ErrorOutput, SafeString
class SystemMessage(ApplicationError):
@@ -108,8 +106,8 @@
"""The level at or above which `SystemMessage` exceptions
will be raised, halting execution."""
- if not isinstance(stream, ErrorOutput):
- stream = ErrorOutput(stream, encoding, error_handler)
+ if not isinstance(stream, io.ErrorOutput):
+ stream = io.ErrorOutput(stream, encoding, error_handler)
self.stream = stream
"""Where warning output is sent."""
@@ -131,8 +129,8 @@
DeprecationWarning, stacklevel=2)
self.report_level = report_level
self.halt_level = halt_level
- if not isinstance(stream, ErrorOutput):
- stream = ErrorOutput(stream, self.encoding, self.error_handler)
+ if not isinstance(stream, io.ErrorOutput):
+ stream = io.ErrorOutput(stream, self.encoding, self.error_handler)
self.stream = stream
self.debug_flag = debug
@@ -158,7 +156,7 @@
"""
# `message` can be a `str` or `Exception` instance.
if isinstance(message, Exception):
- message = SafeString(message)
+ message = str(message)
attributes = kwargs.copy()
if 'base_node' in kwargs:
@@ -717,8 +715,8 @@
of = None
else:
of = output_file
- self.file = docutils.io.FileOutput(destination_path=of,
- encoding='utf8', autoclose=False)
+ self.file = io.FileOutput(destination_path=of,
+ encoding='utf8', autoclose=False)
else:
self.file = None
Modified: trunk/docutils/docutils/utils/error_reporting.py
===================================================================
--- trunk/docutils/docutils/utils/error_reporting.py 2022-01-07 20:11:44 UTC (rev 8936)
+++ trunk/docutils/docutils/utils/error_reporting.py 2022-01-07 20:12:00 UTC (rev 8937)
@@ -11,15 +11,22 @@
# .. _2-Clause BSD license: https://opensource.org/licenses/BSD-2-Clause
"""
-Provisional module to handle Exceptions across Python versions.
+Deprecated module to handle Exceptions across Python versions.
-This module will be deprecated with the end of support for Python 2.7
-and be removed in Docutils 1.2.
+.. warning::
+ This module is deprecated with the end of support for Python 2.7
+ and will be removed in Docutils 1.2 or later.
+
+ Replacements:
+ | SafeString -> str
+ | ErrorString -> docutils.io.error_string()
+ | ErrorOutput -> docutils.io.ErrorOutput
+ | locale_encoding -> docutils.io.locale_encoding
Error reporting should be safe from encoding/decoding errors.
However, implicit conversions of strings and exceptions like
->>> u'%s world: %s' % ('H\xe4llo', Exception(u'H\xe4llo')
+>>> u'%s world: %s' % ('H\xe4llo', Exception(u'H\xe4llo'))
fail in some Python versions:
@@ -40,7 +47,13 @@
import codecs
import sys
+import warnings
+warnings.warn('The `docutils.utils.error_reporting` module is deprecated '
+ 'and will be removed in Docutils 1.2.\n'
+ 'Details with help("docutils.utils.error_reporting").',
+ DeprecationWarning, stacklevel=2)
+
# Guess the locale's encoding.
# If no valid guess can be made, locale_encoding is set to `None`:
try:
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2022-01-07 20:11:44 UTC (rev 8936)
+++ trunk/docutils/docutils/writers/_html_base.py 2022-01-07 20:12:00 UTC (rev 8937)
@@ -28,7 +28,6 @@
from docutils import frontend, languages, nodes, utils, writers
from docutils.parsers.rst.directives import length_or_percentage_or_unitless
from docutils.parsers.rst.directives.images import PIL
-from docutils.utils.error_reporting import SafeString
from docutils.transforms import writer_aux
from docutils.utils.math import (unichar2tex, pick_math_environment,
math2html, latex2mathml, tex2mathml_extern)
@@ -395,8 +394,7 @@
encoding='utf-8').read()
self.settings.record_dependencies.add(path)
except IOError as err:
- msg = u"Cannot embed stylesheet '%r': %s." % (
- path, SafeString(err.strerror))
+ msg = f'Cannot embed stylesheet: {err}'
self.document.reporter.error(msg)
return '<--- %s --->\n' % msg
return self.embedded_stylesheet % content
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-07 20:11:44 UTC (rev 8936)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-07 20:12:00 UTC (rev 8937)
@@ -26,7 +26,6 @@
import docutils
from docutils import frontend, nodes, languages, writers, utils
-from docutils.utils.error_reporting import SafeString
from docutils.transforms import writer_aux
from docutils.utils.math import pick_math_environment, unichar2tex
@@ -1396,8 +1395,7 @@
encoding='utf-8').read()
self.settings.record_dependencies.add(path)
except IOError as err:
- msg = u'Cannot embed stylesheet %r:\n %s.' % (
- path, SafeString(err.strerror))
+ msg = f'Cannot embed stylesheet:\n {err}'
self.document.reporter.error(msg)
return '% ' + msg.replace('\n', '\n% ')
if is_package:
Modified: trunk/docutils/test/test_error_reporting.py
===================================================================
--- trunk/docutils/test/test_error_reporting.py 2022-01-07 20:11:44 UTC (rev 8936)
+++ trunk/docutils/test/test_error_reporting.py 2022-01-07 20:12:00 UTC (rev 8937)
@@ -24,10 +24,13 @@
unless the minimal required Python version has this problem fixed.
"""
+from io import StringIO, BytesIO
import os
import sys
import unittest
-from io import StringIO, BytesIO
+import warnings
+warnings.filterwarnings('ignore', category=DeprecationWarning,
+ message=r'.*utils\.error_reporting')
import DocutilsTestSupport # must be imported before docutils
from docutils import core, parsers, frontend, utils
@@ -34,7 +37,6 @@
from docutils.utils.error_reporting import SafeString, ErrorString, ErrorOutput
-
class SafeStringTests(unittest.TestCase):
# test data:
@@ -158,7 +160,6 @@
self.assertEqual(buf.getvalue(), u'b\ufffd u\xfc e\xfc b\xfc')
-
class SafeStringTests_locale(unittest.TestCase):
"""
Test docutils.SafeString with 'problematic' locales.
@@ -256,5 +257,6 @@
self.assertRaises(utils.SystemMessage,
self.parser.parse, source, self.document)
+
if __name__ == '__main__':
unittest.main()
Modified: trunk/docutils/test/test_io.py
===================================================================
--- trunk/docutils/test/test_io.py 2022-01-07 20:11:44 UTC (rev 8936)
+++ trunk/docutils/test/test_io.py 2022-01-07 20:12:00 UTC (rev 8937)
@@ -8,6 +8,7 @@
Test module for io.py.
"""
+from io import StringIO, BytesIO
import sys
import unittest
import warnings
@@ -14,9 +15,25 @@
import DocutilsTestSupport # must be imported before docutils
from docutils import io
-from docutils.utils.error_reporting import locale_encoding
-from test_error_reporting import BBuf, UBuf
+
+# Stub: Buffer with 'strict' auto-conversion of input to byte string:
+class BBuf(BytesIO):
+ def write(self, data):
+ if isinstance(data, str):
+ data.encode('ascii', 'strict')
+ super(BBuf, self).write(data)
+
+
+# Stub: Buffer expecting unicode string:
+class UBuf(StringIO):
+ def write(self, data):
+ # emulate Python 3 handling of stdout, stderr
+ if isinstance(data, bytes):
+ raise TypeError('must be unicode, not bytes')
+ super(UBuf, self).write(data)
+
+
class mock_stdout(UBuf):
encoding = 'utf8'
@@ -24,6 +41,7 @@
self.buffer = BBuf()
UBuf.__init__(self)
+
class HelperTests(unittest.TestCase):
def test_check_encoding_true(self):
@@ -47,8 +65,21 @@
self.assertEqual(io.check_encoding(mock_stdout, None), None)
# encoding is invalid
self.assertEqual(io.check_encoding(mock_stdout, 'UTF-9'), None)
+
+ def test_error_string(self):
+ us = '\xfc' # bytes(us) fails
+ bs = b'\xc3\xbc' # str(bs) returns repr(bs)
+ self.assertEqual('Exception: spam',
+ io.error_string(Exception('spam')))
+ self.assertEqual('IndexError: '+str(bs),
+ io.error_string(IndexError(bs)))
+ self.assertEqual('ImportError: %s' % us,
+ io.error_string(ImportError(us)))
+
+
+
class InputTests(unittest.TestCase):
def test_bom(self):
@@ -105,7 +136,7 @@
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:
- ...
[truncated message content] |
|
From: <gr...@us...> - 2022-01-09 19:32:55
|
Revision: 8938
http://sourceforge.net/p/docutils/code/8938
Author: grubert
Date: 2022-01-09 19:32:54 +0000 (Sun, 09 Jan 2022)
Log Message:
-----------
Fix sphinx adress
Modified Paths:
--------------
trunk/docutils/FAQ.txt
trunk/docutils/docs/dev/todo.txt
Modified: trunk/docutils/FAQ.txt
===================================================================
--- trunk/docutils/FAQ.txt 2022-01-07 20:12:00 UTC (rev 8937)
+++ trunk/docutils/FAQ.txt 2022-01-09 19:32:54 UTC (rev 8938)
@@ -1191,7 +1191,7 @@
The Sphinx_ documentation generator includes an autodoc module.
-.. _Sphinx: http://sphinx.pocoo.org/index.html
+.. _Sphinx: http://www.sphinx-doc.org
Version 2.0 of Ed Loper's `Epydoc <http://epydoc.sourceforge.net/>`_
supports reStructuredText-format docstrings for HTML output. Docutils
Modified: trunk/docutils/docs/dev/todo.txt
===================================================================
--- trunk/docutils/docs/dev/todo.txt 2022-01-07 20:12:00 UTC (rev 8937)
+++ trunk/docutils/docs/dev/todo.txt 2022-01-09 19:32:54 UTC (rev 8938)
@@ -66,7 +66,7 @@
* Suitability for `Python module documentation
<http://docutils.sf.net/sandbox/README.html#documenting-python>`_.
-.. _Sphinx: http://sphinx.pocoo.org/
+.. _Sphinx: http://www.sphinx-doc.org/
Repository
==========
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-11 17:39:52
|
Revision: 8941
http://sourceforge.net/p/docutils/code/8941
Author: milde
Date: 2022-01-11 17:39:49 +0000 (Tue, 11 Jan 2022)
Log Message:
-----------
Module "locale" is supported by Jython since version 2.7.2.
Cf. https://github.com/jython/jython/commit/c5509579
Jython does not support Python3 at the moment,
so we don't need to care about earlier versions in Docutils >= 0.19.
Modified Paths:
--------------
trunk/docutils/docutils/io.py
trunk/docutils/docutils/utils/smartquotes.py
trunk/docutils/docutils/writers/odf_odt/__init__.py
trunk/docutils/test/test_command_line.py
Modified: trunk/docutils/docutils/io.py
===================================================================
--- trunk/docutils/docutils/io.py 2022-01-11 17:39:37 UTC (rev 8940)
+++ trunk/docutils/docutils/io.py 2022-01-11 17:39:49 UTC (rev 8941)
@@ -10,10 +10,7 @@
__docformat__ = 'reStructuredText'
import codecs
-try:
- import locale # module missing in Jython
-except ImportError:
- pass
+import locale
import os
import re
import sys
@@ -116,9 +113,9 @@
"""
if self.encoding and self.encoding.lower() == 'unicode':
assert isinstance(data, str), ('input encoding is "unicode" '
- 'but input is not a str object')
+ 'but input is not a `str` object')
if isinstance(data, str):
- # Accept unicode even if self.encoding != 'unicode'.
+ # Accept unicode string even if self.encoding != 'unicode'.
return data
if self.encoding:
# We believe the user/application when the encoding is
@@ -144,8 +141,8 @@
# Return decoded, removing BOMs.
return decoded.replace(u'\ufeff', u'')
except (UnicodeError, LookupError) as err:
- error = err # in Python 3, the <exception instance> is
- # local to the except clause
+ # keep exception instance for use outside of the "for" loop.
+ error = err
raise UnicodeError(
'Unable to decode input data. Tried the following encodings: '
'%s.\n(%s)' % (', '.join([repr(enc) for enc in encodings]),
Modified: trunk/docutils/docutils/utils/smartquotes.py
===================================================================
--- trunk/docutils/docutils/utils/smartquotes.py 2022-01-11 17:39:37 UTC (rev 8940)
+++ trunk/docutils/docutils/utils/smartquotes.py 2022-01-11 17:39:49 UTC (rev 8941)
@@ -910,8 +910,8 @@
if __name__ == "__main__":
import itertools
+ import locale
try:
- import locale # module missing in Jython
locale.setlocale(locale.LC_ALL, '') # set to user defaults
defaultlanguage = locale.getdefaultlocale()[0]
except:
Modified: trunk/docutils/docutils/writers/odf_odt/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/odf_odt/__init__.py 2022-01-11 17:39:37 UTC (rev 8940)
+++ trunk/docutils/docutils/writers/odf_odt/__init__.py 2022-01-11 17:39:49 UTC (rev 8941)
@@ -16,6 +16,7 @@
import copy
from io import StringIO
import itertools
+import locale
import os
import os.path
import re
@@ -30,11 +31,6 @@
from xml.dom import minidom
import zipfile
-try:
- import locale # module missing in Jython
-except ImportError:
- pass
-
import docutils
from docutils import frontend, nodes, utils, writers, languages
from docutils.parsers.rst.directives.images import PIL # optional
@@ -41,8 +37,6 @@
from docutils.readers import standalone
from docutils.transforms import references
-
-
# Import pygments and odtwriter pygments formatters if possible.
try:
import pygments
Modified: trunk/docutils/test/test_command_line.py
===================================================================
--- trunk/docutils/test/test_command_line.py 2022-01-11 17:39:37 UTC (rev 8940)
+++ trunk/docutils/test/test_command_line.py 2022-01-11 17:39:49 UTC (rev 8941)
@@ -7,14 +7,16 @@
Test module for the command line.
"""
+import codecs
+import locale
+import sys
import unittest
-import sys, codecs
+
import DocutilsTestSupport # must be imported before docutils
import docutils.core
# determine/guess the encoding of the standard input:
try:
- import locale # module missing in Jython
locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
except ImportError:
locale_encoding = None
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-11 17:40:03
|
Revision: 8942
http://sourceforge.net/p/docutils/code/8942
Author: milde
Date: 2022-01-11 17:40:00 +0000 (Tue, 11 Jan 2022)
Log Message:
-----------
Refer to the "pycmark" CommonMark parser and other documentation fixes.
Modified Paths:
--------------
trunk/docutils/docs/user/config.txt
trunk/docutils/docutils/transforms/frontmatter.py
trunk/docutils/test/test_writers/test_docutils_xml.py
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2022-01-11 17:39:49 UTC (rev 8941)
+++ trunk/docutils/docs/user/config.txt 2022-01-11 17:40:00 UTC (rev 8942)
@@ -348,6 +348,8 @@
exceptions, halting execution immediately. If `traceback`_ is set, the
exception will propagate; otherwise, Docutils will exit.
+See also report_level_.
+
Default: severe (4). Options: ``--halt, --strict``.
id_prefix
@@ -485,6 +487,8 @@
4 severe
5 none
+See also halt_level_.
+
Default: warning (2).
Options: ``--report, -r, --verbose, -v, --quiet, -q``.
@@ -818,17 +822,6 @@
and it is left if the reference style is "brackets".
-.. _recommonmark:
-
-[recommonmark parser]
----------------------
-
-Experimental, based on recommonmark__.
-Currently no configuration settings.
-
-__ https://pypi.org/project/recommonmark/
-
-
.. _myst:
[myst parser]
@@ -845,6 +838,29 @@
https://myst-parser.readthedocs.io/en/latest/sphinx/reference.html#sphinx-config-options
+.. _pycmark:
+
+[pycmark parser]
+----------------
+
+Provided by the 3rd party package `pycmark`__.
+Currently no configuration settings.
+
+__ https://pypi.org/project/pycmark/
+
+
+
+.. _recommonmark:
+
+[recommonmark parser]
+---------------------
+
+Provisional, depends on (deprecated) 3rd-party package recommonmark__.
+Currently no configuration settings.
+
+__ https://pypi.org/project/recommonmark/
+
+
[readers]
=========
@@ -2166,9 +2182,11 @@
parser
~~~~~~
Parser component name.
-One of "rst", "markdown", "recommonmark_", "myst_",
-or the import name of a drop-in parser module.
+Either "rst" (default) or the import name of a drop-in parser module.
+Parsers for CommonMark_ known to work with Docutils include "pycmark_",
+"myst_", and "recommonmark_".
+
Default: "rst".
Option: ``--parser``
@@ -2184,7 +2202,9 @@
Default: "html5".
Option: ``--writer``
+.. _CommonMark: https://spec.commonmark.org/0.30/
+
Other Settings
==============
Modified: trunk/docutils/docutils/transforms/frontmatter.py
===================================================================
--- trunk/docutils/docutils/transforms/frontmatter.py 2022-01-11 17:39:49 UTC (rev 8941)
+++ trunk/docutils/docutils/transforms/frontmatter.py 2022-01-11 17:40:00 UTC (rev 8942)
@@ -503,9 +503,10 @@
raise
def authors_from_one_paragraph(self, field):
- """Return list of Text nodes for authornames.
-
- The set of separators is locale dependent (default: ";"- or ",").
+ """Return list of Text nodes with author names in `field`.
+
+ Author names must be separated by one of the "autor separators"
+ defined for the document language (default: ";" or ",").
"""
# @@ keep original formatting? (e.g. ``:authors: A. Test, *et-al*``)
text = ''.join(str(node)
Modified: trunk/docutils/test/test_writers/test_docutils_xml.py
===================================================================
--- trunk/docutils/test/test_writers/test_docutils_xml.py 2022-01-11 17:39:49 UTC (rev 8941)
+++ trunk/docutils/test/test_writers/test_docutils_xml.py 2022-01-11 17:40:00 UTC (rev 8942)
@@ -194,8 +194,7 @@
u'<string>:10: '
u'(WARNING/2) Invalid raw XML in column 30, line offset 1:\n',
u'<test>inline raw XML</test>\n'])
- # abort with SystemMessage if halt_level is "info":
- settings['halt_level'] = 2
+ settings['halt_level'] = 2 # convert info messages to exceptions
settings['warning_stream'] = ''
self.assertRaises(docutils.utils.SystemMessage,
publish_xml, settings, invalid_raw_xml_source)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-11 17:40:17
|
Revision: 8943
http://sourceforge.net/p/docutils/code/8943
Author: milde
Date: 2022-01-11 17:40:14 +0000 (Tue, 11 Jan 2022)
Log Message:
-----------
Update recommonmark wrapper and tests.
Adapt to and test with "recommonmark" versions 0.6.0 and 0.7.1.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/parsers/recommonmark_wrapper.py
trunk/docutils/test/DocutilsTestSupport.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_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_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 2022-01-11 17:40:00 UTC (rev 8942)
+++ trunk/docutils/HISTORY.txt 2022-01-11 17:40:14 UTC (rev 8943)
@@ -32,8 +32,9 @@
- Raise ImportError, if import of the upstream parser module fails.
If called from an `"include" directive`_,
the system-message now has source/line info.
+ - Adapt to and test with "recommonmark" versions 0.6.0 and 0.7.1.
- .. _"include" directive: docs/ref/rst/directives.html#include
+ .. _"include" directive: docs/ref/rst/directives.html#include
* docutils/parsers/rst/directives/__init__.py
Modified: trunk/docutils/docutils/parsers/recommonmark_wrapper.py
===================================================================
--- trunk/docutils/docutils/parsers/recommonmark_wrapper.py 2022-01-11 17:40:00 UTC (rev 8942)
+++ trunk/docutils/docutils/parsers/recommonmark_wrapper.py 2022-01-11 17:40:14 UTC (rev 8943)
@@ -70,6 +70,8 @@
try:
CommonMarkParser.parse(self, inputstring, document)
except Exception as err:
+ if document.settings.traceback:
+ raise err
error = document.reporter.error('Parsing with "recommonmark" '
'returned the error:\n%s'%err)
document.append(error)
@@ -92,7 +94,8 @@
# 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')
+ if 'code' not in node['classes']:
+ node['classes'].append('code')
# move "language" argument to classes
for node in document.findall(nodes.literal_block):
if 'language' in node.attributes:
@@ -99,14 +102,6 @@
node['classes'].append(node['language'])
del node['language']
- # 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)
-
# replace raw nodes if raw is not allowed
if not document.settings.raw_enabled:
for node in document.findall(nodes.raw):
@@ -113,24 +108,6 @@
warning = document.reporter.warning('Raw content disabled.')
node.parent.replace(node, warning)
- # 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]
@@ -139,16 +116,6 @@
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 visit_document(self, node):
"""Dummy function to prevent spurious warnings.
Modified: trunk/docutils/test/DocutilsTestSupport.py
===================================================================
--- trunk/docutils/test/DocutilsTestSupport.py 2022-01-11 17:40:00 UTC (rev 8942)
+++ trunk/docutils/test/DocutilsTestSupport.py 2022-01-11 17:40:14 UTC (rev 8943)
@@ -164,8 +164,7 @@
self.run_in_debugger = run_in_debugger
self.suite_settings = suite_settings.copy() or {}
- # Ring your mother.
- unittest.TestCase.__init__(self, method_name)
+ super().__init__(method_name)
def __str__(self):
"""
@@ -508,37 +507,41 @@
class RecommonmarkParserTestCase(ParserTestCase):
- """Recommonmark-specific parser test case."""
+ """Test case for 3rd-party CommonMark parsers."""
+ # TODO: test with alternative CommonMark parsers?
+ parser_name = 'recommonmark'
+ # parser_name = 'pycmark'
+ # parser_name = 'myst'
try:
- parser_class = docutils.parsers.get_parser_class('recommonmark')
- parser = parser_class()
+ parser_class = docutils.parsers.get_parser_class(parser_name)
except ImportError:
parser_class = None
- # recommonmark_wrapper.Parser
- """Parser shared by all RecommonmarkParserTestCases."""
+ if parser_class and parser_name == 'recommonmark':
+ import recommonmark
+ if recommonmark.__version__ < '0.6.0':
+ # print(f'Skip Markdown tests, "{parser_name}" parser too old')
+ parser_class = None
+ if parser_class:
+ parser = parser_class()
+ option_parser = frontend.OptionParser(components=(parser_class,))
+ settings = option_parser.get_default_values()
+ settings.report_level = 5
+ settings.halt_level = 5
+ settings.debug = package_unittest.debug
- option_parser = frontend.OptionParser(components=(parser_class,))
- settings = option_parser.get_default_values()
- settings.report_level = 5
- settings.halt_level = 5
- settings.debug = package_unittest.debug
-
class RecommonmarkParserTestSuite(ParserTestSuite):
"""A collection of RecommonmarkParserTestCases."""
test_case_class = RecommonmarkParserTestCase
-
- def generateTests(self, dict, dictname='totest'):
- if not RecommonmarkParserTestCase.parser_class:
+
+ if not test_case_class.parser_class:
+ # print('No compatible CommonMark parser found.'
+ # ' Skipping all CommonMark/recommonmark tests.')
+ def generateTests(self, dict, dictname='totest'):
return
- # TODO: currently the tests are too version-specific
- import recommonmark
- if recommonmark.__version__ != '0.4.0':
- return
- ParserTestSuite.generateTests(self, dict, dictname='totest')
class GridTableParserTestCase(CustomTestCase):
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-11 17:40:00 UTC (rev 8942)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_html_blocks.py 2022-01-11 17:40:14 UTC (rev 8943)
@@ -63,26 +63,28 @@
""",
"""\
<document source="test data">
- <paragraph>
- <raw format="html" xml:space="preserve">
- <a href="foo">
- \n\
- <emphasis>
- bar
- \n\
- <raw format="html" xml:space="preserve">
- </a>
-"""],
-["""\
-<!-- foo -->*bar*
-*baz*
-""",
-"""\
-<document source="test data">
<raw format="html" xml:space="preserve">
- <!-- foo -->*bar*
- *baz*
+ <a href="foo">
+ *bar*
+ </a>
"""],
+# In recommonmark 0.7.0, some raw blocks at paragraph start make the
+# paragraph a raw block :(
+# ["""\
+# <!-- foo -->*bar* (raw because of the comment tag at start of paragraph)
+# *baz*
+# """,
+# """\
+# <document source="test data">
+# <paragraph>
+# <raw format="html" xml:space="preserve">
+# <!-- foo -->
+# <emphasis>
+# bar
+# <paragraph>
+# <emphasis>
+# baz
+# """],
]
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-11 17:40:00 UTC (rev 8942)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_inline_markup.py 2022-01-11 17:40:14 UTC (rev 8943)
@@ -263,7 +263,7 @@
<document source="test data">
<paragraph>
<literal classes="code">
- literal
+ literal \n\
no literal
<paragraph>
No warning for `standalone TeX quotes\' or other \n\
@@ -323,21 +323,22 @@
<reference name="ref" refuri="/uri">
ref
"""],
+# Fails with recommonmark 0.6.0:
+# ["""\
+# Inline image ![foo *bar*]
+# in a paragraph.
+#
+# [foo *bar*]: train.jpg "train & tracks"
+# """,
+# """\
+# <document source="test data">
+# <paragraph>
+# Inline image \n\
+# <image alt="foo " title="train & tracks" uri="train.jpg">
+# \n\
+# in a paragraph.
+# """],
["""\
-Inline image ![foo *bar*][foobar]
-in a paragraph.
-
-[FOOBAR]: train.jpg "train & tracks"
-""",
-"""\
-<document source="test data">
- <paragraph>
- Inline image \n\
- <image alt="foo " title="train & tracks" uri="train.jpg">
- \n\
- in a paragraph.
-"""],
-["""\
[phrase reference]
[phrase reference]: /uri
@@ -370,7 +371,7 @@
"""\
<document source="test data">
<paragraph>
- <reference name="phrase referenceacross lines" refuri="/uri">
+ <reference name="phrase reference across lines" refuri="/uri">
phrase reference
across lines
"""],
@@ -383,7 +384,7 @@
"""\
<document source="test data">
<paragraph>
- <reference name="anonymous reference" refuri="http://example.com">
+ <reference refuri="http://example.com">
anonymous reference
"""],
["""\
@@ -396,17 +397,18 @@
<image alt="a train" uri="train.jpg">
more text.
"""],
+# recommonmark 0.6.0 drops the "title"
+# ["""\
+# Inline image  more text.
+# """,
+# """\
+# <document source="test data">
+# <paragraph>
+# Inline image \n\
+# <image alt="foo" title="title" uri="/url">
+# more text.
+# """],
["""\
-Inline image  more text.
-""",
-"""\
-<document source="test data">
- <paragraph>
- Inline image \n\
- <image alt="foo" title="title" uri="/url">
- more text.
-"""],
-["""\
[URI must follow immediately]
(http://example.com)
""",
@@ -441,7 +443,7 @@
<paragraph>
CommonMark calls standalone hyperlinks
like \n\
- <reference name="http://example.com" refuri="http://example.com">
+ <reference refuri="http://example.com">
http://example.com
"autolinks".
"""],
@@ -478,17 +480,21 @@
"""],
["""\
Hard line breaks are not supported by Docutils.
-Not the soft line break preceded by two or more spaces, \n\
-nor the more visible alternative,\\
-a backslash before the line ending.
+"recommonmark 0.6.0" converts both, invisible \n\
+(two or more trailing spaces) nor visible\\
+(trailing backslash) to raw HTML.
""",
"""\
<document source="test data">
<paragraph>
Hard line breaks are not supported by Docutils.
- Not the soft line break preceded by two or more spaces,\
-nor the more visible alternative,\
-a backslash before the line ending.
+ "recommonmark 0.6.0" converts both, invisible
+ <raw format="html" xml:space="preserve">
+ <br />
+ (two or more trailing spaces) nor visible
+ <raw format="html" xml:space="preserve">
+ <br />
+ (trailing backslash) to raw HTML.
"""],
]
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py 2022-01-11 17:40:00 UTC (rev 8942)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py 2022-01-11 17:40:14 UTC (rev 8943)
@@ -36,12 +36,12 @@
Final paragraph.
"""
-parser_class = DocutilsTestSupport.RecommonmarkParserTestCase.parser_class
+parser = DocutilsTestSupport.RecommonmarkParserTestCase.parser
skip_msg = 'optional module "recommonmark" not found'
-class reCommonMarkParserTests(unittest.TestCase):
+class RecommonmarkParserTests(unittest.TestCase):
- @unittest.skipUnless(parser_class, skip_msg)
+ @unittest.skipUnless(parser, skip_msg)
def test_raw_disabled(self):
output = publish_string(sample_with_html, parser_name='recommonmark',
settings_overrides={'warning_stream': '',
@@ -50,7 +50,7 @@
self.assertIn(b'<system_message', output)
self.assertIn(b'Raw content disabled.', output)
- @unittest.skipUnless(parser_class, skip_msg)
+ @unittest.skipUnless(parser, skip_msg)
def test_raw_disabled_inline(self):
output = publish_string('foo <a href="uri">', parser_name='recommonmark',
settings_overrides={'warning_stream': '',
@@ -61,7 +61,7 @@
self.assertIn(b'Raw content disabled.', output)
- @unittest.skipUnless(parser_class, skip_msg)
+ @unittest.skipUnless(parser, skip_msg)
def test_raw_disabled(self):
# silence Warnings in recommonmark (unmaintained 3rd party module):
warnings.filterwarnings('ignore', category=DeprecationWarning,
@@ -74,7 +74,7 @@
self.assertNotIn(b'<raw>', output)
self.assertNotIn(b'<system_message', output)
- @unittest.skipIf(parser_class,
+ @unittest.skipIf(parser,
'recommonmark_wrapper: parser found, fallback not used')
def test_missing_parser(self):
try:
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-11 17:40:00 UTC (rev 8942)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_section_headers.py 2022-01-11 17:40:14 UTC (rev 8943)
@@ -122,22 +122,22 @@
<document source="test data">
<paragraph>
Test return to existing, highest-level section (Title 3).
- <section ids="title-1" names="title\\ 1">
+ <section ids="title-1" names="title\ 1">
<title>
Title 1
<paragraph>
Paragraph 1.
- <section ids="title-2" names="title\\ 2">
+ <section ids="title-2" names="title\ 2">
<title>
Title 2
<paragraph>
Paragraph 2.
- <section ids="title-3" names="title\\ 3">
+ <section ids="title-3" names="title\ 3">
<title>
Title 3
<paragraph>
Paragraph 3.
- <section ids="title-4" names="title\\ 4">
+ <section ids="title-4" names="title\ 4">
<title>
Title 4
<paragraph>
@@ -156,45 +156,25 @@
### Title 5
""",
-r"""
+"""\
<document source="test data">
<paragraph>
Test bad subsection order.
- <section ids="title-1" names="title\\ 1">
+ <section ids="title-1" names="title\ 1">
<title>
Title 1
- <system_message level="2" source="test data" type="WARNING">
- <paragraph>
- Title level inconsistent. Changing from 2 to 1.
- <literal_block xml:space="preserve">
- Title 1
- <section ids="title-2" names="title\\ 2">
+ <section ids="title-2" names="title\ 2">
<title>
Title 2
- <system_message level="2" source="test data" type="WARNING">
- <paragraph>
- Title level inconsistent. Changing from 2 to 1.
- <literal_block xml:space="preserve">
- Title 2
- <section ids="title-3" names="title\\ 3">
+ <section ids="title-3" names="title\ 3">
<title>
Title 3
<section ids="title-4" names="title\ 4">
<title>
Title 4
- <system_message level="2" source="test data" type="WARNING">
- <paragraph>
- Title level inconsistent. Changing from 4 to 2.
- <literal_block xml:space="preserve">
- Title 4
<section ids="title-5" names="title\ 5">
<title>
Title 5
- <system_message level="2" source="test data" type="WARNING">
- <paragraph>
- Title level inconsistent. Changing from 3 to 2.
- <literal_block xml:space="preserve">
- Title 5
"""],
["""\
Title containing *inline* ``markup``
@@ -204,7 +184,7 @@
""",
"""\
<document source="test data">
- <section ids="title-containing-inline-markup" names="title\\ containing\\ inline\\ markup">
+ <section ids="title-containing-inline-markup" names="title\ containing\ inline\ markup">
<title>
Title containing \n\
<emphasis>
@@ -251,7 +231,7 @@
""",
"""\
<document source="test data">
- <section ids="empty-section" names="empty\\ section">
+ <section ids="empty-section" names="empty\ section">
<title>
Empty Section
"""],
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_targets.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_targets.py 2022-01-11 17:40:00 UTC (rev 8942)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_targets.py 2022-01-11 17:40:14 UTC (rev 8943)
@@ -35,7 +35,7 @@
<document source="test data">
<paragraph>
External hyperlink \n\
- <reference name="target" refuri="http://www.python.org/">
+ <reference refuri="http://www.python.org/">
target
s:
"""],
@@ -64,7 +64,7 @@
<document source="test data">
<paragraph>
Duplicate external \n\
- <reference name="targets" refuri="first wins">
+ <reference name="targets" refuri="first%20wins">
targets
(different URIs):
"""],
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 2022-01-11 17:40:00 UTC (rev 8942)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test__init__.py 2022-01-11 17:40:14 UTC (rev 8943)
@@ -51,16 +51,10 @@
directives.parser_name('null'))
self.assertEqual(docutils.parsers.rst.Parser,
directives.parser_name('rst'))
+ self.assertEqual(directives.parser_name('recommonmark'),
+ docutils.parsers.recommonmark_wrapper.Parser)
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 2022-01-11 17:40:00 UTC (rev 8942)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py 2022-01-11 17:40:14 UTC (rev 8943)
@@ -18,8 +18,11 @@
def suite():
s = DocutilsTestSupport.ParserTestSuite()
+ # eventually skip optional parts:
if not with_pygments:
del(totest['include-code'])
+ if not DocutilsTestSupport.RecommonmarkParserTestCase.parser:
+ del(totest['include-recommonmark'])
s.generateTests(totest)
return s
@@ -64,36 +67,6 @@
InputError: [Errno 2] No such file or directory: '\u043c\u0438\u0440.txt'.\
"""
-# Parsing with Markdown (recommonmark) is an optional feature depending
-# on 3rd-party modules:
-if DocutilsTestSupport.RecommonmarkParserTestCase.parser_class:
- markdown_parsing_result = """\
- <section ids="title-1" names="title\\ 1">
- <title>
- Title 1
- <paragraph>
- <emphasis>
- emphasis
- and \n\
- <emphasis>
- also emphasis
- <paragraph>
- No whitespace required around a
- <reference name="phrase reference" refuri="/uri">
- phrase reference
- ."""
-else:
- markdown_parsing_result = """\
- <system_message level="3" line="3" source="test data" type="ERROR">
- <paragraph>
- Error in "include" directive:
- invalid option value: (option: "parser"; value: \'markdown\')
- Parser "markdown" missing. No module named 'recommonmark'.
- 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'] = [
@@ -214,21 +187,28 @@
This file is used by ``test_include.py``.
""" % reldir(include1)],
["""\
-Include markdown (recommonmark).
+Include with unknown parser.
.. include:: %s
- :parser: markdown
+ :parser: sillyformat
A paragraph.
-""" % include_md,
+""" % include1,
"""\
<document source="test data">
<paragraph>
- Include markdown (recommonmark).
-%s
+ Include with unknown parser.
+ <system_message level="3" line="3" source="test data" type="ERROR">
+ <paragraph>
+ Error in "include" directive:
+ invalid option value: (option: "parser"; value: \'sillyformat\')
+ Parser "sillyformat" missing. No module named 'sillyformat'.
+ <literal_block xml:space="preserve">
+ .. include:: test_parsers/test_rst/test_directives/include1.txt
+ :parser: sillyformat
<paragraph>
A paragraph.
-""" % markdown_parsing_result],
+"""],
["""\
Let's test the parse context.
@@ -1310,6 +1290,41 @@
Some include text."""],
]
+# Parsing with Markdown (recommonmark) is an optional feature depending
+# on 3rd-party modules:
+totest['include-recommonmark'] = [
+["""\
+Include markdown (recommonmark).
+
+.. include:: %s
+ :parser: markdown
+
+A paragraph.
+""" % include_md,
+"""\
+<document source="test data">
+ <paragraph>
+ Include markdown (recommonmark).
+ <section ids="title-1" names="title\\ 1">
+ <title>
+ Title 1
+ <paragraph>
+ <emphasis>
+ emphasis
+ and \n\
+ <emphasis>
+ also emphasis
+ <paragraph>
+ No whitespace required around a
+ <reference name="phrase reference" refuri="/uri">
+ phrase reference
+ .
+ <paragraph>
+ A paragraph.
+"""],
+]
+
+
if __name__ == '__main__':
import unittest
unittest.main(defaultTest='suite')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-12 15:57:22
|
Revision: 8945
http://sourceforge.net/p/docutils/code/8945
Author: milde
Date: 2022-01-12 15:57:19 +0000 (Wed, 12 Jan 2022)
Log Message:
-----------
Document incompatibility with "pytest" and "nosetest". Update.
Triggered by [feature-request:#81].
Use PEP 3102 syntax instead of reading/deleting "**kwargs" items
for "required keyword arguments".
Modified Paths:
--------------
trunk/docutils/docs/dev/testing.txt
trunk/docutils/test/DocutilsTestSupport.py
trunk/docutils/test/test_functional.py
trunk/docutils/test/test_language.py
Modified: trunk/docutils/docs/dev/testing.txt
===================================================================
--- trunk/docutils/docs/dev/testing.txt 2022-01-12 15:57:09 UTC (rev 8944)
+++ trunk/docutils/docs/dev/testing.txt 2022-01-12 15:57:19 UTC (rev 8945)
@@ -34,6 +34,19 @@
all `supported Python versions`_ (see below for details).
In a pinch, the edge cases should cover most of it.
+__ policies.html#check-ins
+
+.. note::
+ Due to incompatible customization of the standard unittest_
+ framework, the test suite does not work with popular test frameworks
+ like pytest_ or nose_.
+
+ .. _unittest: https://docs.python.org/3/library/unittest.html
+ .. _pytest: https://pypi.org/project/pytest/
+ .. _nose: https://pypi.org/project/nose3/
+
+ .. cf. https://sourceforge.net/p/docutils/feature-requests/81/
+
.. [#] 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.
@@ -42,9 +55,7 @@
.. cf. https://sourceforge.net/p/docutils/bugs/434/
-__ policies.html#check-ins
-
.. _Python versions:
Testing across multiple Python versions
Modified: trunk/docutils/test/DocutilsTestSupport.py
===================================================================
--- trunk/docutils/test/DocutilsTestSupport.py 2022-01-12 15:57:09 UTC (rev 8944)
+++ trunk/docutils/test/DocutilsTestSupport.py 2022-01-12 15:57:19 UTC (rev 8945)
@@ -103,6 +103,9 @@
"""
Helper class, providing the same interface as unittest.TestCase,
but with useful setUp and comparison methods.
+
+ The methods assertEqual and assertNotEqual have been overwritten
+ to provide better support for multi-line strings.
"""
def setUp(self):
@@ -136,11 +139,12 @@
"""
Helper class, providing extended functionality over unittest.TestCase.
- The methods assertEqual and assertNotEqual have been overwritten
- to provide better support for multi-line strings. Furthermore,
- see the compare_output method and the parameter list of __init__.
- """
+ See the compare_output method and the parameter list of __init__.
+ Note: the modified signature is incompatible with
+ the "pytest" and "nose" frameworks.
+ """ # cf. feature-request #81
+
compare = difflib.Differ().compare
"""Comparison method shared by all subclasses."""
@@ -162,7 +166,7 @@
self.input = input
self.expected = expected
self.run_in_debugger = run_in_debugger
- self.suite_settings = suite_settings.copy() or {}
+ self.suite_settings = suite_settings.copy() if suite_settings else {}
super().__init__(method_name)
@@ -316,18 +320,19 @@
settings.warning_stream = DevNull()
unknown_reference_resolvers = ()
- def __init__(self, *args, **kwargs):
- self.transforms = kwargs['transforms']
+ def __init__(self, *args, parser=None, transforms=None, **kwargs):
+ assert transforms is not None, 'required argument'
+ self.transforms = transforms
"""List of transforms to perform for this test case."""
- self.parser = kwargs['parser']
+ assert parser is not None, 'required argument'
+ self.parser = parser
"""Input parser for this test case."""
- del kwargs['transforms'], kwargs['parser'] # only wanted here
CustomTestCase.__init__(self, *args, **kwargs)
def supports(self, format):
- return 1
+ return True
def test_transforms(self):
if self.run_in_debugger:
@@ -536,7 +541,7 @@
"""A collection of RecommonmarkParserTestCases."""
test_case_class = RecommonmarkParserTestCase
-
+
if not test_case_class.parser_class:
# print('No compatible CommonMark parser found.'
# ' Skipping all CommonMark/recommonmark tests.')
@@ -660,11 +665,10 @@
'strict_visitor': True}
writer_name = '' # set in subclasses or constructor
- def __init__(self, *args, **kwargs):
- if 'writer_name' in kwargs:
- self.writer_name = kwargs['writer_name']
- del kwargs['writer_name']
- CustomTestCase.__init__(self, *args, **kwargs)
+ def __init__(self, *args, writer_name='', **kwargs):
+ if writer_name:
+ self.writer_name = writer_name
+ super().__init__(*args, **kwargs)
def test_publish(self):
if self.run_in_debugger:
Modified: trunk/docutils/test/test_functional.py
===================================================================
--- trunk/docutils/test/test_functional.py 2022-01-12 15:57:09 UTC (rev 8944)
+++ trunk/docutils/test/test_functional.py 2022-01-12 15:57:19 UTC (rev 8945)
@@ -88,12 +88,20 @@
svn add %(exp)s
svn commit -m "<comment>" %(exp)s"""
- def __init__(self, *args, **kwargs):
- """Set self.configfile, pass arguments to parent __init__."""
- self.configfile = kwargs['configfile']
- del kwargs['configfile']
- DocutilsTestSupport.CustomTestCase.__init__(self, *args, **kwargs)
+ def __init__(self, *args, configfile=None, **kwargs):
+ """
+ Set self.configfile, pass remaining arguments to parent.
+ Requires keyword argument `configfile`.
+
+ Note: the modified signature is incompatible with
+ the "pytest" and "nose" frameworks.
+ """ # cf. feature-request #81
+
+ assert configfile is not None, 'required argument'
+ self.configfile = configfile
+ super().__init__(*args, **kwargs)
+
def shortDescription(self):
return 'test_functional.py: ' + self.configfile
Modified: trunk/docutils/test/test_language.py
===================================================================
--- trunk/docutils/test/test_language.py 2022-01-12 15:57:09 UTC (rev 8944)
+++ trunk/docutils/test/test_language.py 2022-01-12 15:57:19 UTC (rev 8945)
@@ -72,12 +72,22 @@
'test_directives', 'test_roles']
"""Names of methods used to test each language."""
- def __init__(self, *args, **kwargs):
+ def __init__(self, *args, language=None, **kwargs):
+ """
+ Set self.ref (from module variable) and self.language.
+
+ Requires keyword argument `language`.
+ Pass remaining arguments to parent __init__.
+
+ Note: the modified signature is incompatible with
+ the "pytest" and "nose" frameworks.
+ """ # cf. feature-request #81
+
self.ref = docutils.languages.get_language(reference_language,
_reporter)
- self.language = kwargs['language']
- del kwargs['language'] # only wanted here
- DocutilsTestSupport.CustomTestCase.__init__(self, *args, **kwargs)
+ assert language is not None, 'required argument'
+ self.language = language
+ super().__init__(*args, **kwargs)
def _xor(self, ref_dict, l_dict):
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-14 11:32:48
|
Revision: 8949
http://sourceforge.net/p/docutils/code/8949
Author: milde
Date: 2022-01-14 11:32:45 +0000 (Fri, 14 Jan 2022)
Log Message:
-----------
Change removal warnings to "minor + 2" where appropriate.
The version number of the next release(s) may be
"1.0, 1.1, ...", "0.19, 1.0, ...", or "0.19, 0.20, ...".
Lower announced removal version to "0.21 or later" for
DeprecationWarnings that did not include a removal version in
the last release and for DeprecationWarnings that
were added after the last release.
Modified Paths:
--------------
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/frontend.py
trunk/docutils/docutils/nodes.py
trunk/docutils/docutils/parsers/rst/directives/tables.py
trunk/docutils/docutils/parsers/rst/roles.py
trunk/docutils/docutils/transforms/writer_aux.py
trunk/docutils/docutils/utils/__init__.py
trunk/docutils/docutils/utils/error_reporting.py
trunk/docutils/docutils/writers/latex2e/__init__.py
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/RELEASE-NOTES.txt 2022-01-14 11:32:45 UTC (rev 8949)
@@ -56,7 +56,7 @@
(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.
+ in Docutils 0.21 or later. 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/frontend.py
===================================================================
--- trunk/docutils/docutils/frontend.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/frontend.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -747,7 +747,7 @@
old_warning = """
The "[option]" section is deprecated. Support for old-format configuration
-files will be removed in Docutils release 1.2. Please revise your
+files will be removed in Docutils 0.21 or later. Please revise your
configuration files. See <http://docutils.sf.net/docs/user/config.html>,
section "Old-Format Configuration Files".
"""
Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/nodes.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -343,7 +343,7 @@
"""
def __init__(self, s):
warnings.warn('nodes.reprunicode() is not required with Python 3'
- ' and will be removed in Docutils 1.2.',
+ ' and will be removed in Docutils 0.21 or later.',
DeprecationWarning, stacklevel=2)
super().__init__()
@@ -353,7 +353,7 @@
Deprecated backwards compatibility stub returning `s`.
"""
warnings.warn('nodes.ensure_str() is not required with Python 3'
- ' and will be removed in Docutils 1.2.',
+ ' and will be removed in Docutils 0.21 or later.',
DeprecationWarning, stacklevel=2)
return s
@@ -1071,7 +1071,8 @@
def set_class(self, name):
"""Add a new class to the "classes" attribute."""
warnings.warn('docutils.nodes.Element.set_class() is deprecated; '
- "append to Element['classes'] list attribute directly",
+ ' and will be removed in Docutils 0.21 or later.',
+ "Append to Element['classes'] list attribute directly",
DeprecationWarning, stacklevel=2)
assert ' ' not in name
self['classes'].append(name.lower())
Modified: trunk/docutils/docutils/parsers/rst/directives/tables.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/tables.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/parsers/rst/directives/tables.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -361,13 +361,13 @@
def decode_from_csv(s):
warnings.warn('CSVTable.decode_from_csv()'
' is not required with Python 3'
- ' and will be removed in Docutils 1.2.',
+ ' and will be removed in Docutils 0.21 or later.',
DeprecationWarning, stacklevel=2)
return s
def encode_for_csv(s):
warnings.warn('CSVTable.encode_from_csv()'
' is not required with Python 3'
- ' and will be removed in Docutils 1.2.',
+ ' and will be removed in Docutils 0.21 or later.',
DeprecationWarning, stacklevel=2)
return s
decode_from_csv = staticmethod(decode_from_csv)
Modified: trunk/docutils/docutils/parsers/rst/roles.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/roles.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/parsers/rst/roles.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -76,6 +76,8 @@
__docformat__ = 'reStructuredText'
+import warnings
+
from docutils import nodes, utils
from docutils.parsers.rst import directives
from docutils.parsers.rst.languages import en as _fallback_language_module
@@ -392,9 +394,9 @@
def set_classes(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.')
+ # warnings.warn('The auxiliary function roles.set_classes() is obsoleted'
+ # ' by roles.normalized_role_options() and will be removed'
+ # ' in Docutils 0.21 or later', PendingDeprecationWarning, stacklevel=2)
if options and 'class' in options:
assert 'classes' not in options
options['classes'] = options['class']
Modified: trunk/docutils/docutils/transforms/writer_aux.py
===================================================================
--- trunk/docutils/docutils/transforms/writer_aux.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/transforms/writer_aux.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -24,7 +24,7 @@
"""
.. warning:: This transform is not used by Docutils since Dec 2010
- and will be removed in Docutils 1.2 (or later).
+ and will be removed in Docutils 0.21 or later.
Flatten all compound paragraphs. For example, transform ::
@@ -44,7 +44,7 @@
def __init__(self, document, startnode=None):
warnings.warn('docutils.transforms.writer_aux.Compound is deprecated'
- ' and will be removed in Docutils 1.2 or later.',
+ ' and will be removed in Docutils 0.21 or later.',
DeprecationWarning, stacklevel=2)
super(Compound, self).__init__(document, startnode)
Modified: trunk/docutils/docutils/utils/__init__.py
===================================================================
--- trunk/docutils/docutils/utils/__init__.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/utils/__init__.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -125,7 +125,8 @@
def set_conditions(self, category, report_level, halt_level,
stream=None, debug=False):
warnings.warn('docutils.utils.Reporter.set_conditions() deprecated; '
- 'set attributes via configuration settings or directly.',
+ 'Will be removed in Docutils 0.21 or later. '
+ 'Set attributes via configuration settings or directly.',
DeprecationWarning, stacklevel=2)
self.report_level = report_level
self.halt_level = halt_level
Modified: trunk/docutils/docutils/utils/error_reporting.py
===================================================================
--- trunk/docutils/docutils/utils/error_reporting.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/utils/error_reporting.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -15,7 +15,7 @@
.. warning::
This module is deprecated with the end of support for Python 2.7
- and will be removed in Docutils 1.2 or later.
+ and will be removed in Docutils 0.21 or later.
Replacements:
| SafeString -> str
@@ -50,7 +50,7 @@
import warnings
warnings.warn('The `docutils.utils.error_reporting` module is deprecated '
- 'and will be removed in Docutils 1.2.\n'
+ 'and will be removed in Docutils 0.21 or later.\n'
'Details with help("docutils.utils.error_reporting").',
DeprecationWarning, stacklevel=2)
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-14 11:32:27 UTC (rev 8948)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-14 11:32:45 UTC (rev 8949)
@@ -2354,9 +2354,10 @@
"""Convert `length_str` with rst length to LaTeX length
"""
if pxunit is not None:
- warnings.warn('LaTeXTranslator.to_latex_length(): The optional '
- 'argument `pxunit` is ignored and will be removed '
- 'in Docutils 1.1', DeprecationWarning, stacklevel=2)
+ warnings.warn('The optional argument `pxunit` '
+ 'of LaTeXTranslator.to_latex_length() is ignored '
+ 'and will be removed in Docutils 0.21 or later',
+ DeprecationWarning, stacklevel=2)
match = re.match(r'(\d*\.?\d*)\s*(\S*)', length_str)
if not match:
return length_str
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-20 10:10:30
|
Revision: 8954
http://sourceforge.net/p/docutils/code/8954
Author: milde
Date: 2022-01-20 10:10:25 +0000 (Thu, 20 Jan 2022)
Log Message:
-----------
Change http://docutils.sf.net -> https://docutils.sourceforge.io
Patch by Adam Turner.
Modified Paths:
--------------
trunk/docutils/BUGS.txt
trunk/docutils/FAQ.txt
trunk/docutils/docs/dev/enthought-plan.txt
trunk/docutils/docs/dev/enthought-rfp.txt
trunk/docutils/docs/dev/policies.txt
trunk/docutils/docs/dev/rst/alternatives.txt
trunk/docutils/docs/dev/todo.txt
trunk/docutils/docs/dev/website.txt
trunk/docutils/docs/howto/rst-directives.txt
trunk/docutils/docs/user/emacs.txt
trunk/docutils/docs/user/latex.txt
trunk/docutils/docs/user/links.txt
trunk/docutils/docs/user/rst/cheatsheet.txt
trunk/docutils/docs/user/rst/quickref.html
trunk/docutils/docs/user/slide-shows.txt
trunk/docutils/docutils/core.py
trunk/docutils/docutils/frontend.py
trunk/docutils/docutils/languages/__init__.py
trunk/docutils/docutils/languages/af.py
trunk/docutils/docutils/languages/ar.py
trunk/docutils/docutils/languages/ca.py
trunk/docutils/docutils/languages/cs.py
trunk/docutils/docutils/languages/da.py
trunk/docutils/docutils/languages/de.py
trunk/docutils/docutils/languages/en.py
trunk/docutils/docutils/languages/eo.py
trunk/docutils/docutils/languages/es.py
trunk/docutils/docutils/languages/fa.py
trunk/docutils/docutils/languages/fi.py
trunk/docutils/docutils/languages/fr.py
trunk/docutils/docutils/languages/gl.py
trunk/docutils/docutils/languages/he.py
trunk/docutils/docutils/languages/it.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/nl.py
trunk/docutils/docutils/languages/pl.py
trunk/docutils/docutils/languages/pt_br.py
trunk/docutils/docutils/languages/ru.py
trunk/docutils/docutils/languages/sk.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/rst/__init__.py
trunk/docutils/docutils/parsers/rst/directives/tables.py
trunk/docutils/docutils/parsers/rst/include/README.txt
trunk/docutils/docutils/parsers/rst/languages/__init__.py
trunk/docutils/docutils/parsers/rst/languages/af.py
trunk/docutils/docutils/parsers/rst/languages/ar.py
trunk/docutils/docutils/parsers/rst/languages/ca.py
trunk/docutils/docutils/parsers/rst/languages/cs.py
trunk/docutils/docutils/parsers/rst/languages/da.py
trunk/docutils/docutils/parsers/rst/languages/de.py
trunk/docutils/docutils/parsers/rst/languages/en.py
trunk/docutils/docutils/parsers/rst/languages/eo.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/fr.py
trunk/docutils/docutils/parsers/rst/languages/gl.py
trunk/docutils/docutils/parsers/rst/languages/he.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/nl.py
trunk/docutils/docutils/parsers/rst/languages/pl.py
trunk/docutils/docutils/parsers/rst/languages/pt_br.py
trunk/docutils/docutils/parsers/rst/languages/ru.py
trunk/docutils/docutils/parsers/rst/languages/sk.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/frontmatter.py
trunk/docutils/docutils/utils/punctuation_chars.py
trunk/docutils/docutils/utils/smartquotes.py
trunk/docutils/docutils/writers/html4css1/html4css1.css
trunk/docutils/docutils/writers/s5_html/themes/default/slides.js
trunk/docutils/test/functional/expected/ui/default/slides.js
trunk/docutils/test/functional/expected/ui/small-black/slides.js
trunk/docutils/test/local_dummy_lang.py
trunk/docutils/test/test_readers/test_pep/test_inline_markup.py
trunk/docutils/tools/dev/create_unimap.py
trunk/docutils/tools/dev/generate_punctuation_chars.py
trunk/docutils/tools/editors/README.txt
Modified: trunk/docutils/BUGS.txt
===================================================================
--- trunk/docutils/BUGS.txt 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/BUGS.txt 2022-01-20 10:10:25 UTC (rev 8954)
@@ -121,7 +121,7 @@
.. _snapshot: http://docutils.sourceforge.net/#download
.. _documentation: docs/
.. _FAQ: FAQ.html
-.. _mailing list archives: http://docutils.sf.net/#mailing-lists
+.. _mailing list archives: https://docutils.sourceforge.io/#mailing-lists
.. _Docutils-users: docs/user/mailing-lists.html#docutils-users
.. _SourceForge Bug Tracker:
http://sourceforge.net/p/docutils/bugs/
Modified: trunk/docutils/FAQ.txt
===================================================================
--- trunk/docutils/FAQ.txt 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/FAQ.txt 2022-01-20 10:10:25 UTC (rev 8954)
@@ -421,7 +421,7 @@
implied endorsement or recommendation, and in no particular order:
* `Ian Bicking's experimental code
- <http://docutils.sf.net/sandbox/ianb/wiki/Wiki.py>`__
+ <https://docutils.sourceforge.io/sandbox/ianb/wiki/Wiki.py>`__
* `MoinMoin <http://moinmoin.wikiwikiweb.de/>`__ has some support;
`here's a sample <http://moinmoin.wikiwikiweb.de/RestSample>`__
Modified: trunk/docutils/docs/dev/enthought-plan.txt
===================================================================
--- trunk/docutils/docs/dev/enthought-plan.txt 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docs/dev/enthought-plan.txt 2022-01-20 10:10:25 UTC (rev 8954)
@@ -9,7 +9,7 @@
:Copyright: 2004 by `Enthought, Inc. <http://www.enthought.com>`_
:License: `Enthought License`_ (BSD-style)
-.. _Enthought License: http://docutils.sf.net/licenses/enthought.txt
+.. _Enthought License: https://docutils.sourceforge.io/licenses/enthought.txt
This document should be read in conjunction with the `Enthought API
Documentation Tool RFP`__ prepared by Janet Swisher.
@@ -55,7 +55,7 @@
All that's left now is to actually do the work!
.. _PyCon 2004: http://pycon.org/dc2004/
-.. _reStructuredText: http://docutils.sf.net/rst.html
+.. _reStructuredText: https://docutils.sourceforge.io/rst.html
.. _SciPy: http://www.scipy.org/
@@ -72,7 +72,7 @@
.. _Epydoc: http://epydoc.sourceforge.net/
.. _HappyDoc: http://happydoc.sourceforge.net/
.. _PEP 258:
- http://docutils.sf.net/docs/peps/pep-0258.html#python-source-reader
+ https://docutils.sourceforge.io/docs/peps/pep-0258.html#python-source-reader
2. Decide on a base platform. The best way to achieve Enthought's
goals in a reasonable time frame may be to extend Epydoc or
@@ -156,7 +156,7 @@
If another project is chosen as the base project, similar changes
would be made to their files, subject to negotiation.
-__ http://docutils.sf.net/COPYING.html
+__ https://docutils.sourceforge.io/COPYING.html
Proposed Changes to reStructuredText
Modified: trunk/docutils/docs/dev/enthought-rfp.txt
===================================================================
--- trunk/docutils/docs/dev/enthought-rfp.txt 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docs/dev/enthought-rfp.txt 2022-01-20 10:10:25 UTC (rev 8954)
@@ -10,7 +10,7 @@
:Copyright: 2004 by Enthought, Inc.
:License: `Enthought License`_ (BSD Style)
-.. _Enthought License: http://docutils.sf.net/licenses/enthought.txt
+.. _Enthought License: https://docutils.sourceforge.io/licenses/enthought.txt
The following is excerpted from the full RFP, and is published here
with permission from `Enthought, Inc.`_ See the `Plan for Enthought
Modified: trunk/docutils/docs/dev/policies.txt
===================================================================
--- trunk/docutils/docs/dev/policies.txt 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docs/dev/policies.txt 2022-01-20 10:10:25 UTC (rev 8954)
@@ -624,7 +624,7 @@
completed. Others, such as add-ons to Docutils or applications of
Docutils, may graduate to become `parallel projects`_.
-.. _sandbox README: http://docutils.sf.net/sandbox/README.html
+.. _sandbox README: https://docutils.sourceforge.io/sandbox/README.html
.. _sandbox directory:
http://sourceforge.net/p/docutils/code/HEAD/tree/trunk/sandbox/
Modified: trunk/docutils/docs/dev/rst/alternatives.txt
===================================================================
--- trunk/docutils/docs/dev/rst/alternatives.txt 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docs/dev/rst/alternatives.txt 2022-01-20 10:10:25 UTC (rev 8954)
@@ -2191,7 +2191,7 @@
As described in the FAQ__, no special syntax or directive is needed
for this application.
-__ http://docutils.sf.net/FAQ.html
+__ https://docutils.sourceforge.io/FAQ.html
#how-can-i-mark-up-a-faq-or-other-list-of-questions-answers
@@ -3016,9 +3016,9 @@
entity set definition files have been defined`__ (`tarball`__).
There's also `a description and instructions for use`__.
-__ http://docutils.sf.net/tmp/charents/
-__ http://docutils.sf.net/tmp/charents.tgz
-__ http://docutils.sf.net/tmp/charents/README.html
+__ https://docutils.sourceforge.io/tmp/charents/
+__ https://docutils.sourceforge.io/tmp/charents.tgz
+__ https://docutils.sourceforge.io/tmp/charents/README.html
To allow for `character-level inline markup`_, a limited form of
character processing has been added to the spec and parser: escaped
Modified: trunk/docutils/docs/dev/todo.txt
===================================================================
--- trunk/docutils/docs/dev/todo.txt 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docs/dev/todo.txt 2022-01-20 10:10:25 UTC (rev 8954)
@@ -64,7 +64,7 @@
* Plugin support.
* Suitability for `Python module documentation
- <http://docutils.sf.net/sandbox/README.html#documenting-python>`_.
+ <https://docutils.sourceforge.io/sandbox/README.html#documenting-python>`_.
.. _Sphinx: http://www.sphinx-doc.org/
Modified: trunk/docutils/docs/dev/website.txt
===================================================================
--- trunk/docutils/docs/dev/website.txt 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docs/dev/website.txt 2022-01-20 10:10:25 UTC (rev 8954)
@@ -34,13 +34,13 @@
The docutils-update.local__ script is located at
``sandbox/infrastructure/docutils-update.local``.
-__ http://docutils.sf.net/sandbox/infrastructure/docutils-update.local
+__ https://docutils.sourceforge.io/sandbox/infrastructure/docutils-update.local
If you want to share files via the web, you can upload them using the
uploaddocutils.sh__ script
(``sandbox/infrastructure/uploaddocutils.sh``).
-__ http://docutils.sf.net/sandbox/infrastructure/uploaddocutils.sh
+__ https://docutils.sourceforge.io/sandbox/infrastructure/uploaddocutils.sh
Setting Up
Modified: trunk/docutils/docs/howto/rst-directives.txt
===================================================================
--- trunk/docutils/docs/howto/rst-directives.txt 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docs/howto/rst-directives.txt 2022-01-20 10:10:25 UTC (rev 8954)
@@ -427,4 +427,4 @@
docutils.parsers.rst.directives.parts__.
.. _transform: ../ref/transforms.html
-__ http://docutils.sf.net/docutils/parsers/rst/directives/parts.py
+__ https://docutils.sourceforge.io/docutils/parsers/rst/directives/parts.py
Modified: trunk/docutils/docs/user/emacs.txt
===================================================================
--- trunk/docutils/docs/user/emacs.txt 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docs/user/emacs.txt 2022-01-20 10:10:25 UTC (rev 8954)
@@ -940,8 +940,8 @@
Merten who also is the current maintainer of ``rst.el``.
.. _Emacs: http://www.gnu.org/software/emacs/emacs.html
-.. _reStructuredText: http://docutils.sf.net/rst.html
-.. _Docutils: http://docutils.sf.net/
+.. _reStructuredText: https://docutils.sourceforge.io/rst.html
+.. _Docutils: https://docutils.sourceforge.io/
Modified: trunk/docutils/docs/user/latex.txt
===================================================================
--- trunk/docutils/docs/user/latex.txt 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docs/user/latex.txt 2022-01-20 10:10:25 UTC (rev 8954)
@@ -1585,7 +1585,7 @@
\marginpar cannot be used, e.g., inside floats, footnotes, or in frames
made with the framed package (see marginnote_).
-__ http://docutils.sf.net/docutils/docs/ref/rst/directives.html#sidebar
+__ https://docutils.sourceforge.io/docutils/docs/ref/rst/directives.html#sidebar
size of a pixel
---------------
@@ -1842,7 +1842,7 @@
\newcommand*{\DUtransition}{\vspace{2ex}}
-__ http://docutils.sf.net/docutils/docs/ref/rst/restructuredtext.html#transitions
+__ https://docutils.sourceforge.io/docutils/docs/ref/rst/restructuredtext.html#transitions
.. _transition-stars.sty: ../../../sandbox/stylesheets/transition-stars.sty
Modified: trunk/docutils/docs/user/links.txt
===================================================================
--- trunk/docutils/docs/user/links.txt 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docs/user/links.txt 2022-01-20 10:10:25 UTC (rev 8954)
@@ -29,7 +29,7 @@
Advanced text editors with reStructuredText support, IDEs, and docutils GUIs:
-* Emacs `rst mode <http://docutils.sf.net/tools/editors/emacs>`__.
+* Emacs `rst mode <https://docutils.sourceforge.io/tools/editors/emacs>`__.
* `Vim <http://www.vim.org/index.php>`__:
@@ -282,7 +282,7 @@
.. _PySource: https://docutils.sourceforge.io/sandbox/tibs/pysource/
.. _pysource_reader: https://docutils.sourceforge.io/sandbox/davidg/pysource_reader/
- .. _Python Source Reader: http://docutils.sf.net/docs/dev/pysource.html
+ .. _Python Source Reader: https://docutils.sourceforge.io/docs/dev/pysource.html
Extensions
@@ -329,9 +329,9 @@
* `Project Gutenberg`_ uses a customized version of Docutils with it's own
xetex- and nroff-writer and epub generator.
-.. _FAQ entry about Wikis: http://docutils.sf.net/FAQ.html
+.. _FAQ entry about Wikis: https://docutils.sourceforge.io/FAQ.html
#are-there-any-wikis-that-use-restructuredtext-syntax
-.. _FAQ entry about Blogs: http://docutils.sf.net/FAQ.html
+.. _FAQ entry about Blogs: https://docutils.sourceforge.io/FAQ.html
#are-there-any-weblog-blog-projects-that-use-restructuredtext-syntax
.. _Project Gutenberg: http://www.gutenberg.org
Modified: trunk/docutils/docs/user/rst/cheatsheet.txt
===================================================================
--- trunk/docutils/docs/user/rst/cheatsheet.txt 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docs/user/rst/cheatsheet.txt 2022-01-20 10:10:25 UTC (rev 8954)
@@ -1,7 +1,7 @@
=====================================================
The reStructuredText_ Cheat Sheet: Syntax Reminders
=====================================================
-:Info: See <http://docutils.sf.net/rst.html> for introductory docs.
+:Info: See <https://docutils.sourceforge.io/rst.html> for introductory docs.
:Author: David Goodger <go...@py...>
:Date: $Date$
:Revision: $Revision$
@@ -52,10 +52,10 @@
Footnote .. [1] Manually numbered or [#] auto-numbered
(even [#labelled]) or [*] auto-symbol
Citation .. [CIT2002] A citation.
-Hyperlink Target .. _reStructuredText: http://docutils.sf.net/rst.html
+Hyperlink Target .. _reStructuredText: https://docutils.sourceforge.io/rst.html
.. _indirect target: reStructuredText_
.. _internal target:
-Anonymous Target __ http://docutils.sf.net/docs/ref/rst/restructuredtext.html
+Anonymous Target __ https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html
Directive ("::") .. image:: images/biohazard.png
Substitution Def .. |substitution| replace:: like an inline directive
Comment .. is anything else
@@ -73,7 +73,7 @@
Directive Quick Reference
=========================
-See <http://docutils.sf.net/docs/ref/rst/directives.html> for full info.
+See <https://docutils.sourceforge.io/docs/ref/rst/directives.html> for full info.
================ ============================================================
Directive Name Description (Docutils version added to, in [brackets])
@@ -114,7 +114,7 @@
Interpreted Text Role Quick Reference
=====================================
-See <http://docutils.sf.net/docs/ref/rst/roles.html> for full info.
+See <https://docutils.sourceforge.io/docs/ref/rst/roles.html> for full info.
================ ============================================================
Role Name Description
Modified: trunk/docutils/docs/user/rst/quickref.html
===================================================================
--- trunk/docutils/docs/user/rst/quickref.html 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docs/user/rst/quickref.html 2022-01-20 10:10:25 UTC (rev 8954)
@@ -165,8 +165,8 @@
<td>See <a href="#citations">Citations</a>.
<tr valign="top">
- <td nowrap><samp>http://docutils.sf.net/</samp>
- <td><a href="http://docutils.sf.net/">http://docutils.sf.net/</a>
+ <td nowrap><samp>https://docutils.sourceforge.io/</samp>
+ <td><a href="https://docutils.sourceforge.io/">https://docutils.sourceforge.io/</a>
<td>A standalone hyperlink.
</table>
Modified: trunk/docutils/docs/user/slide-shows.txt
===================================================================
--- trunk/docutils/docs/user/slide-shows.txt 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docs/user/slide-shows.txt 2022-01-20 10:10:25 UTC (rev 8954)
@@ -18,7 +18,7 @@
of the s5_html.py writer and the rst2s5.py front end.
To view this document as a slide show see
- http://docutils.sf.net/docs/user/slide-shows.s5.html (or `your
+ https://docutils.sourceforge.io/docs/user/slide-shows.s5.html (or `your
local copy <slide-shows.s5.html>`__).
.. contents::
@@ -986,7 +986,7 @@
.. class:: huge
Further information:
- http://docutils.sf.net
+ https://docutils.sourceforge.io
Docutils users' mailing list:
doc...@li...
Modified: trunk/docutils/docutils/core.py
===================================================================
--- trunk/docutils/docutils/core.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/core.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -9,7 +9,7 @@
custom component objects first, and pass *them* to
``publish_*``/`Publisher`. See `The Docutils Publisher`_.
-.. _The Docutils Publisher: http://docutils.sf.net/docs/api/publisher.html
+.. _The Docutils Publisher: https://docutils.sourceforge.io/docs/api/publisher.html
"""
__docformat__ = 'reStructuredText'
@@ -318,7 +318,7 @@
default_usage = '%prog [options] [<source> [<destination>]]'
default_description = ('Reads from <source> (default is stdin) and writes to '
'<destination> (default is stdout). See '
- '<http://docutils.sf.net/docs/user/config.html> for '
+ '<https://docutils.sourceforge.io/docs/user/config.html> for '
'the full reference.')
def publish_cmdline(reader=None, reader_name='standalone',
@@ -562,7 +562,7 @@
Applications should not need to call this function directly. If it does
seem to be necessary to call this function directly, please write to the
Docutils-develop mailing list
- <http://docutils.sf.net/docs/user/mailing-lists.html#docutils-develop>.
+ <https://docutils.sourceforge.io/docs/user/mailing-lists.html#docutils-develop>.
Parameters:
Modified: trunk/docutils/docutils/frontend.py
===================================================================
--- trunk/docutils/docutils/frontend.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/frontend.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -748,7 +748,7 @@
old_warning = """
The "[option]" section is deprecated. Support for old-format configuration
files will be removed in Docutils 0.21 or later. Please revise your
-configuration files. See <http://docutils.sf.net/docs/user/config.html>,
+configuration files. See <https://docutils.sourceforge.io/docs/user/config.html>,
section "Old-Format Configuration Files".
"""
Modified: trunk/docutils/docutils/languages/__init__.py
===================================================================
--- trunk/docutils/docutils/languages/__init__.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/languages/__init__.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -3,7 +3,7 @@
# Copyright: This module has been placed in the public domain.
# Internationalization details are documented in
-# <http://docutils.sf.net/docs/howto/i18n.html>.
+# <https://docutils.sourceforge.io/docs/howto/i18n.html>.
"""
This package contains modules for language-dependent features of Docutils.
Modified: trunk/docutils/docutils/languages/af.py
===================================================================
--- trunk/docutils/docutils/languages/af.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/languages/af.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -3,7 +3,7 @@
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
-# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
+# read <https://docutils.sourceforge.io/docs/howto/i18n.html>. Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.
Modified: trunk/docutils/docutils/languages/ar.py
===================================================================
--- trunk/docutils/docutils/languages/ar.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/languages/ar.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -3,7 +3,7 @@
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
-# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
+# read <https://docutils.sourceforge.io/docs/howto/i18n.html>. Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.
Modified: trunk/docutils/docutils/languages/ca.py
===================================================================
--- trunk/docutils/docutils/languages/ca.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/languages/ca.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -3,7 +3,7 @@
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
-# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
+# read <https://docutils.sourceforge.io/docs/howto/i18n.html>. Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.
Modified: trunk/docutils/docutils/languages/cs.py
===================================================================
--- trunk/docutils/docutils/languages/cs.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/languages/cs.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -3,7 +3,7 @@
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
-# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
+# read <https://docutils.sourceforge.io/docs/howto/i18n.html>. Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.
Modified: trunk/docutils/docutils/languages/da.py
===================================================================
--- trunk/docutils/docutils/languages/da.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/languages/da.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -3,7 +3,7 @@
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
-# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
+# read <https://docutils.sourceforge.io/docs/howto/i18n.html>. Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.
Modified: trunk/docutils/docutils/languages/de.py
===================================================================
--- trunk/docutils/docutils/languages/de.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/languages/de.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -3,7 +3,7 @@
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
-# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
+# read <https://docutils.sourceforge.io/docs/howto/i18n.html>. Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.
Modified: trunk/docutils/docutils/languages/en.py
===================================================================
--- trunk/docutils/docutils/languages/en.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/languages/en.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -3,7 +3,7 @@
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
-# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
+# read <https://docutils.sourceforge.io/docs/howto/i18n.html>. Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.
Modified: trunk/docutils/docutils/languages/eo.py
===================================================================
--- trunk/docutils/docutils/languages/eo.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/languages/eo.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -3,7 +3,7 @@
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
-# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
+# read <https://docutils.sourceforge.io/docs/howto/i18n.html>. Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.
Modified: trunk/docutils/docutils/languages/es.py
===================================================================
--- trunk/docutils/docutils/languages/es.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/languages/es.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -3,7 +3,7 @@
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
-# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
+# read <https://docutils.sourceforge.io/docs/howto/i18n.html>. Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.
Modified: trunk/docutils/docutils/languages/fa.py
===================================================================
--- trunk/docutils/docutils/languages/fa.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/languages/fa.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -3,7 +3,7 @@
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
-# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
+# read <https://docutils.sourceforge.io/docs/howto/i18n.html>. Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.
Modified: trunk/docutils/docutils/languages/fi.py
===================================================================
--- trunk/docutils/docutils/languages/fi.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/languages/fi.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -3,7 +3,7 @@
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
-# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
+# read <https://docutils.sourceforge.io/docs/howto/i18n.html>. Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.
Modified: trunk/docutils/docutils/languages/fr.py
===================================================================
--- trunk/docutils/docutils/languages/fr.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/languages/fr.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -3,7 +3,7 @@
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
-# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
+# read <https://docutils.sourceforge.io/docs/howto/i18n.html>. Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.
Modified: trunk/docutils/docutils/languages/gl.py
===================================================================
--- trunk/docutils/docutils/languages/gl.py 2022-01-20 10:09:33 UTC (rev 8953)
+++ trunk/docutils/docutils/languages/gl.py 2022-01-20 10:10:25 UTC (rev 8954)
@@ -5,7 +5,7 @@
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
-# read <http://docut...
[truncated message content] |
|
From: <mi...@us...> - 2022-01-20 10:10:47
|
Revision: 8955
http://sourceforge.net/p/docutils/code/8955
Author: milde
Date: 2022-01-20 10:10:45 +0000 (Thu, 20 Jan 2022)
Log Message:
-----------
More changes to https://sourceforge.net
Patch by Adam Turner
Modified Paths:
--------------
trunk/docutils/FAQ.txt
trunk/docutils/HISTORY.txt
trunk/docutils/docs/dev/repository.txt
trunk/docutils/docs/dev/rst/alternatives.txt
trunk/docutils/docs/dev/semantics.txt
trunk/docutils/docs/user/latex.txt
trunk/docutils/docs/user/links.txt
trunk/docutils/docs/user/mailing-lists.txt
trunk/docutils/docs/user/slide-shows.txt
trunk/docutils/docutils/core.py
trunk/docutils/tools/editors/README.txt
Modified: trunk/docutils/FAQ.txt
===================================================================
--- trunk/docutils/FAQ.txt 2022-01-20 10:10:25 UTC (rev 8954)
+++ trunk/docutils/FAQ.txt 2022-01-20 10:10:45 UTC (rev 8955)
@@ -534,7 +534,7 @@
for unambiguous markup. Some other plaintext markup systems do not
require blank lines in nested lists, but they have to compromise
somehow, either accepting ambiguity or requiring extra complexity.
-For example, `Epytext <http://epydoc.sf.net/epytext.html#list>`__ does
+For example, `Epytext <http://epydoc.sourceforge.net/epytext.html#list>`__ does
not require blank lines around lists, but it does require that lists
be indented and that ambiguous cases be escaped.
@@ -802,8 +802,8 @@
incomplete practice_ (this is still a partial implementation - but
sufficient for most needs).
- .. _theory: http://cben-hacks.sf.net/bidi/hibidi.html
- .. _practice: http://cben-hacks.sf.net/bidi/hibidi.html#practice
+ .. _theory: http://cben-hacks.sourceforge.net/bidi/hibidi.html
+ .. _practice: http://cben-hacks.sourceforge.net/bidi/hibidi.html#practice
There is also an explicit way to set directions through CSS and
classes in the HTML:
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2022-01-20 10:10:25 UTC (rev 8954)
+++ trunk/docutils/HISTORY.txt 2022-01-20 10:10:45 UTC (rev 8955)
@@ -3609,7 +3609,7 @@
* docutils/frontend.py: Added to project; support for front-end
(command-line) scripts. Option specifications may be augmented by
- components. Requires Optik (http://optik.sf.net/) for option
+ components. Requires Optik (http://optik.sourceforge.net/) for option
processing (installed locally as docutils/optik.py).
* docutils/io.py: Added to project; uniform API for a variety of input
Modified: trunk/docutils/docs/dev/repository.txt
===================================================================
--- trunk/docutils/docs/dev/repository.txt 2022-01-20 10:10:25 UTC (rev 8954)
+++ trunk/docutils/docs/dev/repository.txt 2022-01-20 10:10:45 UTC (rev 8955)
@@ -15,7 +15,7 @@
To get a checkout of the Docutils source tree (with the
sandboxes) with SVN_, type ::
- svn checkout http://svn.code.sf.net/p/docutils/code/trunk docutils-code
+ svn checkout https://svn.code.sf.net/p/docutils/code/trunk docutils-code
Users of Git_ can clone a mirror of the docutils repository with ::
@@ -75,7 +75,7 @@
on your preferred protocol:
anonymous access: (read only)
- Subversion_: ``http://svn.code.sf.net/p/docutils/code``
+ Subversion_: ``https://svn.code.sf.net/p/docutils/code``
Git_: ``git://repo.or.cz/docutils.git``
Modified: trunk/docutils/docs/dev/rst/alternatives.txt
===================================================================
--- trunk/docutils/docs/dev/rst/alternatives.txt 2022-01-20 10:10:25 UTC (rev 8954)
+++ trunk/docutils/docs/dev/rst/alternatives.txt 2022-01-20 10:10:45 UTC (rev 8955)
@@ -2707,8 +2707,8 @@
__ http://mail.python.org/pipermail/doc-sig/2001-April/001776.html
__ http://mail.python.org/pipermail/doc-sig/2001-April/001789.html
__ http://mail.python.org/pipermail/doc-sig/2001-April/001793.html
-__ http://sourceforge.net/mailarchive/message.php?msg_id=3838913
-__ http://sf.net/mailarchive/forum.php?thread_id=2957175&forum_id=11444
+__ https://sourceforge.net/mailarchive/message.php?msg_id=3838913
+__ https://sf.net/mailarchive/forum.php?thread_id=2957175&forum_id=11444
Sloppy Indentation of List Items
Modified: trunk/docutils/docs/dev/semantics.txt
===================================================================
--- trunk/docutils/docs/dev/semantics.txt 2022-01-20 10:10:25 UTC (rev 8954)
+++ trunk/docutils/docs/dev/semantics.txt 2022-01-20 10:10:45 UTC (rev 8955)
@@ -105,7 +105,7 @@
.. _JavaDoc: http://java.sun.com/j2se/javadoc/
.. _pythondoc: http://starship.python.net/crew/danilo/pythondoc/
.. _Grouch: http://www.mems-exchange.org/software/grouch/
-.. _epydoc: http://epydoc.sf.net/
+.. _epydoc: http://epydoc.sourceforge.net/
.. _iPhrase Python documentation conventions:
http://mail.python.org/pipermail/doc-sig/2001-May/001840.html
Modified: trunk/docutils/docs/user/latex.txt
===================================================================
--- trunk/docutils/docs/user/latex.txt 2022-01-20 10:10:25 UTC (rev 8954)
+++ trunk/docutils/docs/user/latex.txt 2022-01-20 10:10:45 UTC (rev 8955)
@@ -273,11 +273,11 @@
standalone_rst_latex.tex_
.. _standalone_rst_latex.txt:
- https://sf.net/p/docutils/code/HEAD/tree/trunk/docutils/test/functional/input/standalone_rst_latex.txt
+ https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/test/functional/input/standalone_rst_latex.txt
.. _tests/functional/input/data:
- https://sf.net/p/docutils/code/HEAD/tree/trunk/docutils/test/functional/input/data
+ https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/test/functional/input/data
.. _standalone_rst_latex.tex:
- https://sf.net/p/docutils/code/HEAD/tree/trunk/docutils/test/functional/expected/standalone_rst_latex.tex?format=raw
+ https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/test/functional/expected/standalone_rst_latex.tex
.. _style sheet:
Modified: trunk/docutils/docs/user/links.txt
===================================================================
--- trunk/docutils/docs/user/links.txt 2022-01-20 10:10:25 UTC (rev 8954)
+++ trunk/docutils/docs/user/links.txt 2022-01-20 10:10:45 UTC (rev 8955)
@@ -47,11 +47,11 @@
plugin to take notes in reStructured text.
* `JED <http://www.jedsoft.org/jed/>`__ programmers editor with
- `rst mode <http://jedmodes.sf.net/mode/rst/>`__
+ `rst mode <https://jedmodes.sourceforge.io/mode/rst/>`__
* `reStructuredText editor plug-in for Eclipse`__
- __ http://resteditor.sf.net/
+ __ http://http://resteditor.sourceforge.net/
* Gnome's gedit offers syntax highlighting and a reST preview pane.
Modified: trunk/docutils/docs/user/mailing-lists.txt
===================================================================
--- trunk/docutils/docs/user/mailing-lists.txt 2022-01-20 10:10:25 UTC (rev 8954)
+++ trunk/docutils/docs/user/mailing-lists.txt 2022-01-20 10:10:45 UTC (rev 8955)
@@ -122,7 +122,7 @@
__ `Docutils-checkins list`_
__ nntp://news.gmane.org/gmane.text.docutils.cvs
-.. _list options: http://lists.sf.net/lists/options/docutils-checkins
+.. _list options: https://lists.sourceforge.net/lists/options/docutils-checkins
Doc-SIG
-------
Modified: trunk/docutils/docs/user/slide-shows.txt
===================================================================
--- trunk/docutils/docs/user/slide-shows.txt 2022-01-20 10:10:25 UTC (rev 8954)
+++ trunk/docutils/docs/user/slide-shows.txt 2022-01-20 10:10:45 UTC (rev 8955)
@@ -989,7 +989,7 @@
https://docutils.sourceforge.io
Docutils users' mailing list:
- doc...@li...
+ doc...@li...
`Any questions?`
Modified: trunk/docutils/docutils/core.py
===================================================================
--- trunk/docutils/docutils/core.py 2022-01-20 10:10:25 UTC (rev 8954)
+++ trunk/docutils/docutils/core.py 2022-01-20 10:10:45 UTC (rev 8955)
@@ -272,7 +272,7 @@
print(u'%s' % io.error_string(error), file=self._stderr)
print(("""\
Exiting due to error. Use "--traceback" to diagnose.
-Please report errors to <doc...@li...>.
+Please report errors to <doc...@li...>.
Include "--traceback" output, Docutils version (%s%s),
Python version (%s), your OS type & version, and the
command line used.""" % (__version__,
@@ -304,7 +304,7 @@
'\n'
'Exiting due to error. Use "--traceback" to diagnose.\n'
'If the advice above doesn\'t eliminate the error,\n'
- 'please report it to <doc...@li...>.\n'
+ 'please report it to <doc...@li...>.\n'
'Include "--traceback" output, Docutils version (%s),\n'
'Python version (%s), your OS type & version, and the\n'
'command line used.\n'
Modified: trunk/docutils/tools/editors/README.txt
===================================================================
--- trunk/docutils/tools/editors/README.txt 2022-01-20 10:10:25 UTC (rev 8954)
+++ trunk/docutils/tools/editors/README.txt 2022-01-20 10:10:45 UTC (rev 8955)
@@ -18,7 +18,7 @@
* `VST (Vim reStructured Text) is a plugin for Vim7 with folding for
reST <http://www.vim.org/scripts/script.php?script_id=1334>`__
-* `rst mode <http://jedmodes.sf.net/mode/rst/>`__ for the `JED`_
+* `rst mode <https://jedmodes.sourceforge.io/mode/rst/>`__ for the `JED`_
programmers editor
Additions are welcome.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-20 10:11:52
|
Revision: 8956
http://sourceforge.net/p/docutils/code/8956
Author: milde
Date: 2022-01-20 10:11:44 +0000 (Thu, 20 Jan 2022)
Log Message:
-----------
Change http://docutils.sourceforge.net -> https://docutils.sourceforge.io
Patch by Adam Turner.
Modified Paths:
--------------
trunk/docutils/BUGS.txt
trunk/docutils/COPYING.txt
trunk/docutils/HISTORY.txt
trunk/docutils/README.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docs/dev/distributing.txt
trunk/docutils/docs/dev/enthought-plan.txt
trunk/docutils/docs/dev/hacking.txt
trunk/docutils/docs/dev/policies.txt
trunk/docutils/docs/dev/pysource.dtd
trunk/docutils/docs/dev/repository.txt
trunk/docutils/docs/dev/rst/alternatives.txt
trunk/docutils/docs/dev/rst/problems.txt
trunk/docutils/docs/dev/testing.txt
trunk/docutils/docs/dev/todo.txt
trunk/docutils/docs/dev/website.txt
trunk/docutils/docs/howto/html-stylesheets.txt
trunk/docutils/docs/howto/i18n.txt
trunk/docutils/docs/howto/rst-directives.txt
trunk/docutils/docs/index.txt
trunk/docutils/docs/peps/pep-0256.txt
trunk/docutils/docs/peps/pep-0257.txt
trunk/docutils/docs/peps/pep-0258.txt
trunk/docutils/docs/peps/pep-0287.txt
trunk/docutils/docs/ref/doctree.txt
trunk/docutils/docs/ref/docutils.dtd
trunk/docutils/docs/ref/rst/directives.txt
trunk/docutils/docs/ref/rst/introduction.txt
trunk/docutils/docs/ref/rst/restructuredtext.txt
trunk/docutils/docs/user/mailing-lists.txt
trunk/docutils/docs/user/manpage.txt
trunk/docutils/docs/user/odt.txt
trunk/docutils/docs/user/rst/cheatsheet.txt
trunk/docutils/docs/user/rst/demo.txt
trunk/docutils/docs/user/rst/quickref.html
trunk/docutils/docs/user/rst/quickstart.txt
trunk/docutils/docs/user/slide-shows.txt
trunk/docutils/docutils/nodes.py
trunk/docutils/docutils/parsers/rst/include/isoamsa.txt
trunk/docutils/docutils/parsers/rst/include/isoamsb.txt
trunk/docutils/docutils/parsers/rst/include/isoamsc.txt
trunk/docutils/docutils/parsers/rst/include/isoamsn.txt
trunk/docutils/docutils/parsers/rst/include/isoamso.txt
trunk/docutils/docutils/parsers/rst/include/isoamsr.txt
trunk/docutils/docutils/parsers/rst/include/isobox.txt
trunk/docutils/docutils/parsers/rst/include/isocyr1.txt
trunk/docutils/docutils/parsers/rst/include/isocyr2.txt
trunk/docutils/docutils/parsers/rst/include/isodia.txt
trunk/docutils/docutils/parsers/rst/include/isogrk1.txt
trunk/docutils/docutils/parsers/rst/include/isogrk2.txt
trunk/docutils/docutils/parsers/rst/include/isogrk3.txt
trunk/docutils/docutils/parsers/rst/include/isogrk4-wide.txt
trunk/docutils/docutils/parsers/rst/include/isogrk4.txt
trunk/docutils/docutils/parsers/rst/include/isolat1.txt
trunk/docutils/docutils/parsers/rst/include/isolat2.txt
trunk/docutils/docutils/parsers/rst/include/isomfrk-wide.txt
trunk/docutils/docutils/parsers/rst/include/isomfrk.txt
trunk/docutils/docutils/parsers/rst/include/isomopf-wide.txt
trunk/docutils/docutils/parsers/rst/include/isomopf.txt
trunk/docutils/docutils/parsers/rst/include/isomscr-wide.txt
trunk/docutils/docutils/parsers/rst/include/isomscr.txt
trunk/docutils/docutils/parsers/rst/include/isonum.txt
trunk/docutils/docutils/parsers/rst/include/isopub.txt
trunk/docutils/docutils/parsers/rst/include/isotech.txt
trunk/docutils/docutils/parsers/rst/include/mmlalias.txt
trunk/docutils/docutils/parsers/rst/include/mmlextra-wide.txt
trunk/docutils/docutils/parsers/rst/include/mmlextra.txt
trunk/docutils/docutils/parsers/rst/include/xhtml1-lat1.txt
trunk/docutils/docutils/parsers/rst/include/xhtml1-special.txt
trunk/docutils/docutils/parsers/rst/include/xhtml1-symbol.txt
trunk/docutils/docutils/transforms/universal.py
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/docutils_xml.py
trunk/docutils/docutils/writers/html5_polyglot/plain.css
trunk/docutils/docutils/writers/html5_polyglot/responsive.css
trunk/docutils/docutils/writers/html5_polyglot/tuftig.css
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/docutils/writers/latex2e/default.tex
trunk/docutils/docutils/writers/latex2e/titlepage.tex
trunk/docutils/docutils/writers/latex2e/titlingpage.tex
trunk/docutils/docutils/writers/latex2e/xelatex.tex
trunk/docutils/docutils/writers/pep_html/template.txt
trunk/docutils/setup.py
trunk/docutils/test/DocutilsTestSupport.py
trunk/docutils/test/functional/expected/compact_lists.html
trunk/docutils/test/functional/expected/cyrillic.tex
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/latex_babel.tex
trunk/docutils/test/functional/expected/latex_cornercases.tex
trunk/docutils/test/functional/expected/latex_docinfo.tex
trunk/docutils/test/functional/expected/latex_leavevmode.tex
trunk/docutils/test/functional/expected/latex_literal_block.tex
trunk/docutils/test/functional/expected/latex_literal_block_fancyvrb.tex
trunk/docutils/test/functional/expected/latex_literal_block_listings.tex
trunk/docutils/test/functional/expected/latex_literal_block_verbatim.tex
trunk/docutils/test/functional/expected/latex_literal_block_verbatimtab.tex
trunk/docutils/test/functional/expected/latex_memoir.tex
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_html4css1.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/expected/standalone_rst_latex.tex
trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
trunk/docutils/test/functional/expected/standalone_rst_xetex.tex
trunk/docutils/test/functional/expected/xetex-cyrillic.tex
trunk/docutils/test/functional/input/data/html5-features.txt
trunk/docutils/test/functional/input/data/html5-text-level-tags.txt
trunk/docutils/test/functional/input/data/urls.txt
trunk/docutils/test/functional/input/standalone_rst_manpage.txt
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_writers/test_html4css1_template.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_s5.py
trunk/docutils/tools/dev/unicode2rstsubs.py
trunk/docutils/tools/editors/emacs/README.txt
trunk/docutils/tools/editors/emacs/rst.el
trunk/docutils/tools/rst2latex.py
trunk/docutils/tools/rst2xetex.py
Modified: trunk/docutils/BUGS.txt
===================================================================
--- trunk/docutils/BUGS.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/BUGS.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -8,7 +8,7 @@
:Revision: $Revision$
:Copyright: This document has been placed in the public domain.
-.. _Docutils: http://docutils.sourceforge.net/
+.. _Docutils: https://docutils.sourceforge.io/
Bugs in Docutils?!? Yes, we do have a few. Some are old-timers that
@@ -118,7 +118,7 @@
__ http://svn.collab.net/viewcvs/svn/trunk/BUGS?view=markup
.. _repository: docs/dev/repository.html
-.. _snapshot: http://docutils.sourceforge.net/#download
+.. _snapshot: https://docutils.sourceforge.io/#download
.. _documentation: docs/
.. _FAQ: FAQ.html
.. _mailing list archives: https://docutils.sourceforge.io/#mailing-lists
Modified: trunk/docutils/COPYING.txt
===================================================================
--- trunk/docutils/COPYING.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/COPYING.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -5,7 +5,7 @@
:Author: David Goodger
:Contact: go...@py...
:Date: $Date$
-:Web site: http://docutils.sourceforge.net/
+:Web site: https://docutils.sourceforge.io/
:Copyright: This document has been placed in the public domain.
Most of the files included in this project have been placed in the
@@ -26,7 +26,7 @@
below (the "Work") to the public domain.
The primary repository for the Work is the Internet World Wide Web
-site <http://docutils.sourceforge.net/>. The Work consists of the
+site <https://docutils.sourceforge.io/>. The Work consists of the
files within the "docutils" module of the Docutils project Subversion
repository (Internet host docutils.svn.sourceforge.net, filesystem path
/svnroot/docutils), whose Internet web interface is located at
@@ -141,7 +141,7 @@
Plaintext versions of all the linked-to licenses are provided in the
licenses_ directory.
-.. _sandbox: http://docutils.sourceforge.net/sandbox/README.html
+.. _sandbox: https://docutils.sourceforge.io/sandbox/README.html
.. _licenses: licenses/
.. _Python 2.1.1 license: http://www.python.org/2.1.1/license.html
.. _GNU General Public License: http://www.gnu.org/copyleft/gpl.html
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/HISTORY.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -546,7 +546,7 @@
Doctree nodes and removed in the writing stage by the node's
astext() method.
- __ http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#escaping-mechanism
+ __ https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#escaping-mechanism
* docutils/io.py
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/README.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -5,7 +5,7 @@
:Author: David Goodger
:Contact: go...@py...
:Date: $Date$
-:Web site: http://docutils.sourceforge.net/
+:Web site: https://docutils.sourceforge.io/
:Copyright: This document has been placed in the public domain.
.. contents::
@@ -366,7 +366,7 @@
python quicktest.py --version
-.. _Docutils Testing: http://docutils.sourceforge.net/docs/dev/testing.html
+.. _Docutils Testing: https://docutils.sourceforge.io/docs/dev/testing.html
.. _open a bug report:
http://sourceforge.net/p/docutils/bugs/
.. _send an email: mailto:doc...@li...
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/RELEASE-NOTES.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -310,7 +310,7 @@
- Keep `backslash escapes`__ in the document tree. This allows, e.g.,
escaping of author-separators in `bibliographic fields`__.
- __ http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#escaping-mechanism
+ __ https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#escaping-mechanism
__ docs/ref/rst/restructuredtext.html#bibliographic-fields
* LaTeX writer:
@@ -727,7 +727,7 @@
The recommended way to generate PDF output is to use either the
LaTeX2e writer or one of the alternatives listed at
- http://docutils.sourceforge.net/docs/user/links.html#pdf.
+ https://docutils.sourceforge.io/docs/user/links.html#pdf.
* reStructuredText:
Modified: trunk/docutils/docs/dev/distributing.txt
===================================================================
--- trunk/docutils/docs/dev/distributing.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/dev/distributing.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -8,7 +8,7 @@
:Date: $Date$
:Copyright: This document has been placed in the public domain.
-.. _Docutils: http://docutils.sourceforge.net/
+.. _Docutils: https://docutils.sourceforge.io/
.. contents::
@@ -20,7 +20,7 @@
it.
.. _Docutils-develop: ../user/mailing-lists.html#docutils-develop
-.. _release tarball: http://docutils.sourceforge.net/#download
+.. _release tarball: https://docutils.sourceforge.io/#download
Dependencies
@@ -146,4 +146,4 @@
For more information on testing, view the `Docutils Testing`_ page.
-.. _Docutils Testing: http://docutils.sourceforge.net/docs/dev/testing.html
+.. _Docutils Testing: https://docutils.sourceforge.io/docs/dev/testing.html
Modified: trunk/docutils/docs/dev/enthought-plan.txt
===================================================================
--- trunk/docutils/docs/dev/enthought-plan.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/dev/enthought-plan.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -118,7 +118,7 @@
This is in conjunction with the "Public Domain Dedication" section of
COPYING.txt__.
-__ http://docutils.sourceforge.net/COPYING.html
+__ https://docutils.sourceforge.io/COPYING.html
The code and documentation originating from Enthought funding will
have Enthought's copyright and license declaration. While I will try
Modified: trunk/docutils/docs/dev/hacking.txt
===================================================================
--- trunk/docutils/docs/dev/hacking.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/dev/hacking.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -15,8 +15,8 @@
knowledge is certainly helpful (though not necessary, strictly
speaking).
-.. _Docutils: http://docutils.sourceforge.net/
-.. _reStructuredText: http://docutils.sourceforge.net/rst.html
+.. _Docutils: https://docutils.sourceforge.io/
+.. _reStructuredText: https://docutils.sourceforge.io/rst.html
.. _Docutils front-end tools: ../user/tools.html
.. contents::
@@ -164,7 +164,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.3.10: http://docutils.sourceforge.net/" />
+ <meta name="generator" content="Docutils 0.3.10: https://docutils.sourceforge.io/" />
<title></title>
<link rel="stylesheet" href="../docutils/writers/html4css1/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/docs/dev/policies.txt
===================================================================
--- trunk/docutils/docs/dev/policies.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/dev/policies.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -642,7 +642,7 @@
An official parallel project will have its own directory beside (or
parallel to) the main ``docutils`` directory in the Subversion
repository. It can have its own web page in the
-docutils.sourceforge.net domain, its own file releases and
+docutils.sourceforge.io domain, its own file releases and
downloadable snapshots, and even a mailing list if that proves useful.
However, an official parallel project has implications: it is expected
to be maintained and continue to work with changes to the core
@@ -673,7 +673,7 @@
`link list`_. If you want your project to appear there, drop a note at
the Docutils-develop_ mailing list.
-.. _link list: http://docutils.sourceforge.net/docs/user/links.html
+.. _link list: https://docutils.sourceforge.io/docs/user/links.html
.. _docutils-develop: docs/user/mailing-lists.html#docutils-develop
Modified: trunk/docutils/docs/dev/pysource.dtd
===================================================================
--- trunk/docutils/docs/dev/pysource.dtd 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/dev/pysource.dtd 2022-01-20 10:11:44 UTC (rev 8956)
@@ -13,9 +13,9 @@
below).
More information about this DTD and the Docutils project can be found
-at http://docutils.sourceforge.net/. The latest version of this DTD
+at https://docutils.sourceforge.io/. The latest version of this DTD
is available from
-http://docutils.sourceforge.net/docs/dev/pysource.dtd.
+https://docutils.sourceforge.io/docs/dev/pysource.dtd.
The formal public identifier for this DTD is::
@@ -46,7 +46,7 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This DTD extends the Docutils Generic DTD, available from
-http://docutils.sourceforge.net/docs/ref/docutils.dtd.
+https://docutils.sourceforge.io/docs/ref/docutils.dtd.
-->
<!ENTITY % docutils PUBLIC
Modified: trunk/docutils/docs/dev/repository.txt
===================================================================
--- trunk/docutils/docs/dev/repository.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/dev/repository.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -8,7 +8,7 @@
:Date: $Date$
:Copyright: This document has been placed in the public domain.
-.. _Docutils: http://docutils.sourceforge.net/
+.. _Docutils: https://docutils.sourceforge.io/
.. admonition:: Quick Instructions
Modified: trunk/docutils/docs/dev/rst/alternatives.txt
===================================================================
--- trunk/docutils/docs/dev/rst/alternatives.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/dev/rst/alternatives.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -30,7 +30,7 @@
* `... Or Not To Do?`_: possible but questionable. These probably
won't be implemented, but you never know.
-.. _Setext: http://docutils.sourceforge.net/mirror/setext.html
+.. _Setext: https://docutils.sourceforge.io/mirror/setext.html
.. _StructuredText:
http://www.zope.org/DevHome/Members/jim/StructuredTextWiki/FrontPage
.. _Problems with StructuredText: problems.html
@@ -2015,7 +2015,7 @@
_[DJG2002]
Docutils: Python Documentation Utilities project; Goodger
- et al.; http://docutils.sourceforge.net/
+ et al.; https://docutils.sourceforge.io/
Without the ".. " marker, subsequent lines would either have to
align as in one of the above, or we'd have to allow loose
Modified: trunk/docutils/docs/dev/rst/problems.txt
===================================================================
--- trunk/docutils/docs/dev/rst/problems.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/dev/rst/problems.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -849,8 +849,8 @@
.. _StructuredText:
http://www.zope.org/DevHome/Members/jim/StructuredTextWiki/FrontPage
-.. _Setext: http://docutils.sourceforge.net/mirror/setext.html
-.. _reStructuredText: http://docutils.sourceforge.net/rst.html
+.. _Setext: https://docutils.sourceforge.io/mirror/setext.html
+.. _reStructuredText: https://docutils.sourceforge.io/rst.html
.. _detailed description:
http://homepage.ntlworld.com/tibsnjoan/docutils/STNG-format.html
.. _STMinus: http://www.cis.upenn.edu/~edloper/pydoc/stminus.html
Modified: trunk/docutils/docs/dev/testing.txt
===================================================================
--- trunk/docutils/docs/dev/testing.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/dev/testing.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -9,7 +9,7 @@
:Date: $Date$
:Copyright: This document has been placed in the public domain.
-.. _Docutils: http://docutils.sourceforge.net/
+.. _Docutils: https://docutils.sourceforge.io/
.. contents::
Modified: trunk/docutils/docs/dev/todo.txt
===================================================================
--- trunk/docutils/docs/dev/todo.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/dev/todo.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -9,7 +9,7 @@
:Revision: $Revision$
:Copyright: This document has been placed in the public domain.
-.. _Docutils: http://docutils.sourceforge.net/
+.. _Docutils: https://docutils.sourceforge.io/
.. contents::
Modified: trunk/docutils/docs/dev/website.txt
===================================================================
--- trunk/docutils/docs/dev/website.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/dev/website.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -8,7 +8,7 @@
:Revision: $Revision$
:Copyright: This document has been placed in the public domain.
-The Docutils web site, <http://docutils.sourceforge.net/>, is
+The Docutils web site, <https://docutils.sourceforge.io/>, is
maintained by the ``docutils-update.local`` script, run by project
maintainers on their local machines. The script
will process any .txt file which is newer than the corresponding .html
@@ -17,7 +17,7 @@
.. .. old instructions, for cron job:
- The Docutils web site, <http://docutils.sourceforge.net/>, is
+ The Docutils web site, <https://docutils.sourceforge.io/>, is
maintained automatically by the ``docutils-update`` script, run as an
hourly cron job on shell.berlios.de (by user "wiemann"). The script
will process any .txt file which is newer than the corresponding .html
Modified: trunk/docutils/docs/howto/html-stylesheets.txt
===================================================================
--- trunk/docutils/docs/howto/html-stylesheets.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/howto/html-stylesheets.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -8,7 +8,7 @@
:Revision: $Revision$
:Copyright: This document has been placed in the public domain.
-.. _Docutils: http://docutils.sourceforge.net/
+.. _Docutils: https://docutils.sourceforge.io/
The look of Docutils' HTML output is customizable via CSS stylesheets.
Modified: trunk/docutils/docs/howto/i18n.txt
===================================================================
--- trunk/docutils/docs/howto/i18n.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/howto/i18n.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -37,7 +37,7 @@
project bug tracker on SourceForge at
http://sourceforge.net/p/docutils/bugs/
-.. _Docutils: http://docutils.sourceforge.net/
+.. _Docutils: https://docutils.sourceforge.io/
.. _Introduction to i18n:
http://www.debian.org/doc/manuals/intro-i18n/
Modified: trunk/docutils/docs/howto/rst-directives.txt
===================================================================
--- trunk/docutils/docs/howto/rst-directives.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/howto/rst-directives.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -8,7 +8,7 @@
:Revision: $Revision$
:Copyright: This document has been placed in the public domain.
-.. _reStructuredText: http://docutils.sourceforge.net/rst.html
+.. _reStructuredText: https://docutils.sourceforge.io/rst.html
Directives are the primary extension mechanism of reStructuredText.
Modified: trunk/docutils/docs/index.txt
===================================================================
--- trunk/docutils/docs/index.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/index.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -11,8 +11,8 @@
The latest working documents may be accessed individually below, or
from the ``docs`` directory of the `Docutils distribution`_.
-.. _Docutils: http://docutils.sourceforge.net/
-.. _Docutils distribution: http://docutils.sourceforge.net/#download
+.. _Docutils: https://docutils.sourceforge.io/
+.. _Docutils distribution: https://docutils.sourceforge.io/#download
.. contents::
@@ -93,7 +93,7 @@
* `Docutils LaTeX Writer <user/latex.html>`__
* `Docutils ODF/OpenOffice/odt Writer <user/odt.html>`__
-`reStructuredText <http://docutils.sourceforge.net/rst.html>`_:
+`reStructuredText <https://docutils.sourceforge.io/rst.html>`_:
* `A ReStructuredText Primer <user/rst/quickstart.html>`__
(see also the `text source <user/rst/quickstart.txt>`__)
@@ -145,7 +145,7 @@
Prehistoric:
* `Setext Documents Mirror
- <http://docutils.sourceforge.net/mirror/setext.html>`__
+ <https://docutils.sourceforge.io/mirror/setext.html>`__
.. _peps:
Modified: trunk/docutils/docs/peps/pep-0256.txt
===================================================================
--- trunk/docutils/docs/peps/pep-0256.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/peps/pep-0256.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -235,7 +235,7 @@
================
A SourceForge project has been set up for this work at
-http://docutils.sourceforge.net/.
+https://docutils.sourceforge.io/.
References and Footnotes
@@ -273,7 +273,7 @@
.. _docutils: http://www.tibsnjoan.co.uk/docutils.html
-.. _Docutils project: http://docutils.sourceforge.net/
+.. _Docutils project: https://docutils.sourceforge.io/
.. _STMinus: http://www.cis.upenn.edu/~edloper/pydoc/
Modified: trunk/docutils/docs/peps/pep-0257.txt
===================================================================
--- trunk/docutils/docs/peps/pep-0257.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/peps/pep-0257.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -294,7 +294,7 @@
.. [3] Guido van Rossum, Python's creator and Benevolent Dictator For
Life.
-.. _Docutils: http://docutils.sourceforge.net/
+.. _Docutils: https://docutils.sourceforge.io/
.. _Python Style Guide:
http://www.python.org/doc/essays/styleguide.html
Modified: trunk/docutils/docs/peps/pep-0258.txt
===================================================================
--- trunk/docutils/docs/peps/pep-0258.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/peps/pep-0258.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -497,7 +497,7 @@
Docutils processing. See `Docutils Front-End Tools`_ for details.
.. _Docutils Front-End Tools:
- http://docutils.sourceforge.net/docs/user/tools.html
+ https://docutils.sourceforge.io/docs/user/tools.html
Document Tree
@@ -978,13 +978,13 @@
(http://www.python.org/peps/pep-0216.html)
.. _docutils.dtd:
- http://docutils.sourceforge.net/docs/ref/docutils.dtd
+ https://docutils.sourceforge.io/docs/ref/docutils.dtd
.. _soextbl.dtd:
- http://docutils.sourceforge.net/docs/ref/soextblx.dtd
+ https://docutils.sourceforge.io/docs/ref/soextblx.dtd
.. _The Docutils Document Tree:
- http://docutils.sourceforge.net/docs/ref/doctree.html
+ https://docutils.sourceforge.io/docs/ref/doctree.html
.. _VMS error condition severity levels:
http://www.openvms.compaq.com:8000/73final/5841/841pro_027.html
@@ -993,7 +993,7 @@
.. _log4j project: http://logging.apache.org/log4j/docs/index.html
.. _Docutils Python Source DTD:
- http://docutils.sourceforge.net/docs/dev/pysource.dtd
+ https://docutils.sourceforge.io/docs/dev/pysource.dtd
.. _ISO 639: http://www.loc.gov/standards/iso639-2/englangn.html
@@ -1006,7 +1006,7 @@
==================
A SourceForge project has been set up for this work at
-http://docutils.sourceforge.net/.
+https://docutils.sourceforge.io/.
===========
Modified: trunk/docutils/docs/peps/pep-0287.txt
===================================================================
--- trunk/docutils/docs/peps/pep-0287.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/peps/pep-0287.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -513,7 +513,7 @@
See `Section Structure via Indentation`__ in `Problems With
StructuredText`_ for further elaboration.
- __ http://docutils.sourceforge.net/docs/dev/rst/problems.html
+ __ https://docutils.sourceforge.io/docs/dev/rst/problems.html
#section-structure-via-indentation
4. Why use reStructuredText for PEPs? What's wrong with the existing
@@ -741,7 +741,7 @@
.. [#PEP-216] PEP 216, Docstring Format, Zadka
(http://www.python.org/peps/pep-0216.html)
-.. _reStructuredText markup: http://docutils.sourceforge.net/rst.html
+.. _reStructuredText markup: https://docutils.sourceforge.io/rst.html
.. _Doc-SIG: http://www.python.org/sigs/doc-sig/
@@ -761,33 +761,33 @@
.. _JavaDoc: http://java.sun.com/j2se/javadoc/
-.. _Setext: http://docutils.sourceforge.net/mirror/setext.html
+.. _Setext: https://docutils.sourceforge.io/mirror/setext.html
.. _StructuredText:
http://www.zope.org/DevHome/Members/jim/StructuredTextWiki/FrontPage
.. _A ReStructuredText Primer:
- http://docutils.sourceforge.net/docs/user/rst/quickstart.html
+ https://docutils.sourceforge.io/docs/user/rst/quickstart.html
.. _Quick reStructuredText:
- http://docutils.sourceforge.net/docs/user/rst/quickref.html
+ https://docutils.sourceforge.io/docs/user/rst/quickref.html
.. _An Introduction to reStructuredText:
- http://docutils.sourceforge.net/docs/ref/rst/introduction.html
+ https://docutils.sourceforge.io/docs/ref/rst/introduction.html
.. _reStructuredText Markup Specification:
- http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html
+ https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html
.. _reStructuredText Directives:
- http://docutils.sourceforge.net/docs/ref/rst/directives.html
+ https://docutils.sourceforge.io/docs/ref/rst/directives.html
.. _Problems with StructuredText:
- http://docutils.sourceforge.net/docs/dev/rst/problems.html
+ https://docutils.sourceforge.io/docs/dev/rst/problems.html
.. _A Record of reStructuredText Syntax Alternatives:
- http://docutils.sourceforge.net/docs/dev/rst/alternatives.html
+ https://docutils.sourceforge.io/docs/dev/rst/alternatives.html
-.. _Docutils: http://docutils.sourceforge.net/
+.. _Docutils: https://docutils.sourceforge.io/
Copyright
Modified: trunk/docutils/docs/ref/doctree.txt
===================================================================
--- trunk/docutils/docs/ref/doctree.txt 2022-01-20 10:10:45 UTC (rev 8955)
+++ trunk/docutils/docs/ref/doctree.txt 2022-01-20 10:11:44 UTC (rev 8956)
@@ -36,13 +36,13 @@
ReStructuredText Primer`_. For complete technical details, see the
`reStructuredText Markup Specification`_.
-.. _Docutils: http://docutils.sourceforge.ne...
[truncated message content] |
|
From: <mi...@us...> - 2022-01-20 10:12:12
|
Revision: 8957
http://sourceforge.net/p/docutils/code/8957
Author: milde
Date: 2022-01-20 10:12:09 +0000 (Thu, 20 Jan 2022)
Log Message:
-----------
Use short contact mail address
for Gunter Milde at all places.
Modified Paths:
--------------
trunk/docutils/docutils/writers/xetex/__init__.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_parsers/test_rst/test_directives/test__init__.py
Modified: trunk/docutils/docutils/writers/xetex/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/xetex/__init__.py 2022-01-20 10:11:44 UTC (rev 8956)
+++ trunk/docutils/docutils/writers/xetex/__init__.py 2022-01-20 10:12:09 UTC (rev 8957)
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# :Author: Günter Milde <mi...@us...>
+# :Author: Günter Milde <mi...@us...>
# :Revision: $Revision$
# :Date: $Date$
# :Copyright: © 2010 Günter Milde.
Modified: trunk/docutils/test/test__init__.py
===================================================================
--- trunk/docutils/test/test__init__.py 2022-01-20 10:11:44 UTC (rev 8956)
+++ trunk/docutils/test/test__init__.py 2022-01-20 10:12:09 UTC (rev 8957)
@@ -1,6 +1,6 @@
#! /usr/bin/env python3
# $Id$
-# Authors: Günter Milde <mi...@us...>,
+# Authors: Günter Milde <mi...@us...>,
# David Goodger <go...@py...>
# Copyright: This module has been placed in the public domain.
Modified: trunk/docutils/test/test_command_line.py
===================================================================
--- trunk/docutils/test/test_command_line.py 2022-01-20 10:11:44 UTC (rev 8956)
+++ trunk/docutils/test/test_command_line.py 2022-01-20 10:12:09 UTC (rev 8957)
@@ -1,6 +1,6 @@
#! /usr/bin/env python3
# $Id$
-# Author: Günter Milde <mi...@us...>
+# 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-20 10:11:44 UTC (rev 8956)
+++ trunk/docutils/test/test_error_reporting.py 2022-01-20 10:12:09 UTC (rev 8957)
@@ -1,6 +1,6 @@
#! /usr/bin/env python3
# $Id$
-# Author: Günter Milde <mi...@us...>
+# Author: Günter Milde <mi...@us...>
# Copyright: This module has been placed in the public domain.
"""
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 2022-01-20 10:11:44 UTC (rev 8956)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test__init__.py 2022-01-20 10:12:09 UTC (rev 8957)
@@ -1,6 +1,6 @@
#! /usr/bin/env python3
# $Id$
-# Author: Günter Milde <mi...@us...>,
+# Author: Günter Milde <mi...@us...>,
# :License: Released under the terms of the `2-Clause BSD license`_, in short:
#
# Copying and distribution of this file, with or without modification,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-21 13:45:46
|
Revision: 8959
http://sourceforge.net/p/docutils/code/8959
Author: milde
Date: 2022-01-21 13:45:42 +0000 (Fri, 21 Jan 2022)
Log Message:
-----------
Update URLs in the docs.
Mostly http: -> https:, based on a patch by Adam Turner
Remove/update some dead links.
Modified Paths:
--------------
trunk/docutils/BUGS.txt
trunk/docutils/COPYING.txt
trunk/docutils/FAQ.txt
trunk/docutils/HISTORY.txt
trunk/docutils/README.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/THANKS.txt
trunk/docutils/docs/dev/distributing.txt
trunk/docutils/docs/dev/hacking.txt
trunk/docutils/docs/dev/policies.txt
trunk/docutils/docs/dev/release.txt
trunk/docutils/docs/dev/repository.txt
trunk/docutils/docs/dev/rst/alternatives.txt
trunk/docutils/docs/dev/rst/problems.txt
trunk/docutils/docs/dev/semantics.txt
trunk/docutils/docs/dev/todo.txt
trunk/docutils/docs/howto/i18n.txt
trunk/docutils/docs/ref/doctree.txt
trunk/docutils/docs/ref/rst/definitions.txt
trunk/docutils/docs/ref/rst/directives.txt
trunk/docutils/docs/ref/rst/introduction.txt
trunk/docutils/docs/ref/rst/mathematics.txt
trunk/docutils/docs/ref/rst/restructuredtext.txt
trunk/docutils/docs/ref/rst/roles.txt
trunk/docutils/docs/user/config.txt
trunk/docutils/docs/user/emacs.txt
trunk/docutils/docs/user/html.txt
trunk/docutils/docs/user/latex.txt
trunk/docutils/docs/user/links.txt
trunk/docutils/docs/user/mailing-lists.txt
trunk/docutils/docs/user/odt.txt
trunk/docutils/docs/user/rst/demo.txt
trunk/docutils/docs/user/rst/quickref.html
trunk/docutils/docs/user/slide-shows.txt
trunk/docutils/docs/user/smartquotes.txt
trunk/docutils/docs/user/tools.txt
trunk/docutils/docutils/io.py
trunk/docutils/docutils/nodes.py
trunk/docutils/docutils/utils/__init__.py
trunk/docutils/docutils/utils/smartquotes.py
trunk/docutils/docutils/utils/urischemes.py
trunk/docutils/docutils/writers/html5_polyglot/plain.css
trunk/docutils/docutils/writers/html5_polyglot/responsive.css
trunk/docutils/docutils/writers/html5_polyglot/tuftig.css
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/licenses/gpl-3-0.txt
trunk/docutils/licenses/python-2-1-1.txt
trunk/docutils/tools/dev/create_unimap.py
trunk/docutils/tools/dev/generate_punctuation_chars.py
trunk/docutils/tools/dev/unicode2rstsubs.py
Modified: trunk/docutils/BUGS.txt
===================================================================
--- trunk/docutils/BUGS.txt 2022-01-21 09:58:00 UTC (rev 8958)
+++ trunk/docutils/BUGS.txt 2022-01-21 13:45:42 UTC (rev 8959)
@@ -124,7 +124,7 @@
.. _mailing list archives: https://docutils.sourceforge.io/#mailing-lists
.. _Docutils-users: docs/user/mailing-lists.html#docutils-users
.. _SourceForge Bug Tracker:
- http://sourceforge.net/p/docutils/bugs/
+ https://sourceforge.net/p/docutils/bugs/
Known Bugs
Modified: trunk/docutils/COPYING.txt
===================================================================
--- trunk/docutils/COPYING.txt 2022-01-21 09:58:00 UTC (rev 8958)
+++ trunk/docutils/COPYING.txt 2022-01-21 13:45:42 UTC (rev 8959)
@@ -28,9 +28,9 @@
The primary repository for the Work is the Internet World Wide Web
site <https://docutils.sourceforge.io/>. The Work consists of the
files within the "docutils" module of the Docutils project Subversion
-repository (Internet host docutils.svn.sourceforge.net, filesystem path
-/svnroot/docutils), whose Internet web interface is located at
-<http://docutils.svn.sourceforge.net/viewvc/docutils/>. Files dedicated to the
+repository (http://svn.code.sf.net/p/docutils/code/),
+whose Internet web interface is located at
+<https://sourceforge.net/p/docutils/code>. Files dedicated to the
public domain may be identified by the inclusion, near the beginning
of each file, of a declaration of the form::
@@ -143,10 +143,10 @@
.. _sandbox: https://docutils.sourceforge.io/sandbox/README.html
.. _licenses: licenses/
-.. _Python 2.1.1 license: http://www.python.org/2.1.1/license.html
-.. _GNU General Public License: http://www.gnu.org/copyleft/gpl.html
+.. _Python 2.1.1 license: https://docs.python.org/3/license.html
+.. _GNU General Public License: https://www.gnu.org/copyleft/gpl.html
.. _BSD 2-Clause License: http://opensource.org/licenses/BSD-2-Clause
.. _BSD 3-Clause License: https://opensource.org/licenses/BSD-3-Clause
.. _OSI-approved: http://opensource.org/licenses/
.. _license-list:
-.. _GPL-compatible: http://www.gnu.org/licenses/license-list.html
+.. _GPL-compatible: https://www.gnu.org/licenses/license-list.html
Modified: trunk/docutils/FAQ.txt
===================================================================
--- trunk/docutils/FAQ.txt 2022-01-21 09:58:00 UTC (rev 8958)
+++ trunk/docutils/FAQ.txt 2022-01-21 13:45:42 UTC (rev 8959)
@@ -61,13 +61,13 @@
.. _Docutils: https://docutils.sourceforge.io/
.. _PEPs (Python Enhancement Proposals):
- http://www.python.org/peps/pep-0012.html
+ https://www.python.org/dev/peps/pep-0012
.. _can be used by client code: docs/api/publisher.html
.. _front-end tools: docs/user/tools.html
.. _test suite: docs/dev/testing.html
.. _documentation: docs/index.html
-.. _PEP 258: http://www.python.org/peps/pep-0258.html
-.. _Python: http://www.python.org/
+.. _PEP 258: https://www.python.org/dev/peps/pep-0258
+.. _Python: https://www.python.org/
Why is it called "Docutils"?
@@ -99,9 +99,9 @@
UTILitieS", with emphasis on the first syllable.
.. _An Introduction to reStructuredText: docs/ref/rst/introduction.html
-__ http://mail.python.org/pipermail/doc-sig/1999-December/000878.html
-__ http://mail.python.org/pipermail/doc-sig/2000-November/001252.html
-__ http://mail.python.org/pipermail/doc-sig/2000-November/001239.html
+__ https://mail.python.org/pipermail/doc-sig/1999-December/000878.html
+__ https://mail.python.org/pipermail/doc-sig/2000-November/001252.html
+__ https://mail.python.org/pipermail/doc-sig/2000-November/001239.html
__ http://homepage.ntlworld.com/tibsnjoan/docutils/STpy.html
@@ -154,7 +154,7 @@
.. _extensions and related projects:
docs/dev/policies.html#extensions-and-related-projects
.. _feature request tracker:
- http://sourceforge.net/p/docutils/feature-requests/
+ https://sourceforge.net/p/docutils/feature-requests/
reStructuredText
@@ -210,7 +210,7 @@
they overemphasize reStructuredText's predecessor, Zope's
StructuredText.
-__ http://en.wikipedia.org/wiki/Representational_State_Transfer
+__ https://en.wikipedia.org/wiki/Representational_State_Transfer
What's the standard filename extension for a reStructuredText file?
@@ -456,7 +456,7 @@
order:
* `Firedrop <http://www.voidspace.org.uk/python/firedrop2/>`__
-* `PyBloxsom <http://pyblosxom.sourceforge.net/>`__
+* `PyBloxsom <http://pyblosxom.github.io/>`__
* `Lino WebMan <http://lino.sourceforge.net/webman.html>`__
* `Pelican <http://blog.getpelican.com/>`__
(also listed `on PyPi <http://pypi.python.org/pypi/pelican>`__)
@@ -571,7 +571,7 @@
Here is an |emphasized hyperlink|_.
.. |emphasized hyperlink| replace:: *emphasized hyperlink*
- .. _emphasized hyperlink: http://example.org
+ .. _emphasized hyperlink: https://example.org
It is not possible for just a portion of the replacement text to be
a hyperlink; it's the entire replacement text or nothing.
@@ -588,7 +588,7 @@
.. |stuff| raw:: html
<em>emphasized text containing a
- <a href="http://example.org">hyperlink</a> and
+ <a href="https://example.org">hyperlink</a> and
<tt>inline literals</tt></em>
Raw LaTeX is supported for LaTeX output, etc.
@@ -781,7 +781,7 @@
a single base direction for the whole document (like Notepad, Vim and
text boxes in Firefox).
-.. _Unicode Bidi Algorithm: http://www.unicode.org/reports/tr9/
+.. _Unicode Bidi Algorithm: https://www.unicode.org/reports/tr9/
.. _geresh: http://www.typo.co.il/~mooffie/geresh/
.. _translate: docs/howto/i18n.html
@@ -1157,7 +1157,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xht ml1/DTD/xhtml1-transitional.dtd">
+ "https://www.w3.org/TR/xht ml1/DTD/xhtml1-transitional.dtd">
But this is followed by::
@@ -1268,7 +1268,7 @@
.. _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/
+.. _bug tracker: https://sourceforge.net/p/docutils/bugs/
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2022-01-21 09:58:00 UTC (rev 8958)
+++ trunk/docutils/HISTORY.txt 2022-01-21 13:45:42 UTC (rev 8959)
@@ -945,9 +945,9 @@
To use, install the ``tox`` package via pip or easy_install and use
tox from the project root directory.
-.. _polyglot: http://www.w3.org/TR/html-polyglot/
-.. _HTML 5: http://www.w3.org/TR/html5/
-.. _XHTML 1.0: http://www.w3.org/TR/xhtml1/
+.. _polyglot: https://www.w3.org/TR/html-polyglot/
+.. _HTML 5: https://www.w3.org/TR/html5/
+.. _XHTML 1.0: https://www.w3.org/TR/xhtml1/
Release 0.12 (2014-07-06)
@@ -1180,8 +1180,8 @@
via ``import PIL`` as starting with PIL 1.2,
"PIL lives in the PIL namespace only" (announcement__).
-.. _Pygments: http://pygments.org/
-__ http://mail.python.org/pipermail/image-sig/2011-January/006650.html
+.. _Pygments: https://pygments.org/
+__ https://mail.python.org/pipermail/image-sig/2011-January/006650.html
* setup.py
@@ -1298,7 +1298,7 @@
- Some additions to the Docutils core are released under the 2-Clause BSD
license, see COPYING_ for details.
- .. _BCP 47: http://www.rfc-editor.org/rfc/bcp/bcp47.txt
+ .. _BCP 47: https://www.rfc-editor.org/rfc/bcp/bcp47.txt
.. _COPYING: COPYING.html
* reStructuredText:
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2022-01-21 09:58:00 UTC (rev 8958)
+++ trunk/docutils/README.txt 2022-01-21 13:45:42 UTC (rev 8959)
@@ -17,7 +17,7 @@
This is for those who want to get up & running quickly.
1. Docutils requires **Python**, available from
- http://www.python.org/.
+ https://www.python.org/.
See Dependencies_ below for details.
2. Install the latest stable release from PyPi with pip_::
@@ -62,7 +62,7 @@
* And others as discovered.
.. _PEPs (Python Enhancement Proposals):
- http://www.python.org/peps/pep-0012.html
+ https://www.python.org/dev/peps/pep-0012
Dependencies
@@ -75,7 +75,7 @@
* 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.
-.. _Python: http://www.python.org/.
+.. _Python: https://www.python.org/.
Optional Dependencies
@@ -193,7 +193,7 @@
required version. The last installed version will be used in the
`shebang line`_ of the `front-end scripts`_.
- .. _shebang line: http://en.wikipedia.org/wiki/Shebang_%28Unix%29
+ .. _shebang line: https://en.wikipedia.org/wiki/Shebang_%28Unix%29
Windows
-------
@@ -368,7 +368,7 @@
.. _Docutils Testing: https://docutils.sourceforge.io/docs/dev/testing.html
.. _open a bug report:
- http://sourceforge.net/p/docutils/bugs/
+ https://sourceforge.net/p/docutils/bugs/
.. _send an email: mailto:doc...@li...
?subject=Test%20suite%20failure
.. _web interface: https://sourceforge.net/p/docutils/mailman/
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2022-01-21 09:58:00 UTC (rev 8958)
+++ trunk/docutils/RELEASE-NOTES.txt 2022-01-21 13:45:42 UTC (rev 8959)
@@ -422,7 +422,7 @@
- New HTML writer generating `HTML 5`_.
- .. _HTML 5: http://www.w3.org/TR/html5/
+ .. _HTML 5: https://www.w3.org/TR/html5/
* tools/
@@ -567,7 +567,7 @@
by Pygments_.
- "code" option of the "include" directive.
- .. _Pygments: http://pygments.org/
+ .. _Pygments: https://pygments.org/
- Fix [ 3402314 ] allow non-ASCII whitespace, punctuation
characters and "international" quotes around inline markup.
@@ -625,7 +625,7 @@
``math`` and ``math_block`` doctree elements.
- Orphaned "python" reader and "newlatex2e" writer moved to the sandbox.
- .. _BCP 47: http://www.rfc-editor.org/rfc/bcp/bcp47.txt
+ .. _BCP 47: https://www.rfc-editor.org/rfc/bcp/bcp47.txt
* reStructuredText:
Modified: trunk/docutils/THANKS.txt
===================================================================
--- trunk/docutils/THANKS.txt 2022-01-21 09:58:00 UTC (rev 8958)
+++ trunk/docutils/THANKS.txt 2022-01-21 13:45:42 UTC (rev 8959)
@@ -162,8 +162,8 @@
Thank you!
-Special thanks to `SourceForge <http://sourceforge.net>`__ and the
-`Python Software Foundation <http://www.python.org/psf/>`__.
+Special thanks to `SourceForge <https://sourceforge.net>`__ and the
+`Python Software Foundation <https://www.python.org/psf/>`__.
Hopefully I haven't forgotten anyone or misspelled any names;
apologies (and please let me know!) if I have.
Modified: trunk/docutils/docs/dev/distributing.txt
===================================================================
--- trunk/docutils/docs/dev/distributing.txt 2022-01-21 09:58:00 UTC (rev 8958)
+++ trunk/docutils/docs/dev/distributing.txt 2022-01-21 13:45:42 UTC (rev 8959)
@@ -46,7 +46,7 @@
.. _Python Imaging Library:
https://en.wikipedia.org/wiki/Python_Imaging_Library
.. _Pillow: https://pypi.org/project/Pillow/
-.. _Pygments: http://pygments.org/
+.. _Pygments: https://pygments.org/
.. _recommonmark: https://pypi.org/project/recommonmark/
.. _code directives: ../ref/rst/directives.html#code
Modified: trunk/docutils/docs/dev/hacking.txt
===================================================================
--- trunk/docutils/docs/dev/hacking.txt 2022-01-21 09:58:00 UTC (rev 8958)
+++ trunk/docutils/docs/dev/hacking.txt 2022-01-21 13:45:42 UTC (rev 8959)
@@ -32,7 +32,7 @@
My *favorite* language is Python_.
- .. _Python: http://www.python.org/
+ .. _Python: https://www.python.org/
Using the ``rst2html.py`` front-end tool, you would get an HTML output
which looks like this::
@@ -40,7 +40,7 @@
[uninteresting HTML code removed]
<body>
<div class="document">
- <p>My <em>favorite</em> language is <a class="reference" href="http://www.python.org/">Python</a>.</p>
+ <p>My <em>favorite</em> language is <a class="reference" href="https://www.python.org/">Python</a>.</p>
</div>
</body>
</html>
@@ -84,7 +84,7 @@
<reference name="Python" refname="python">
Python
.
- <target ids="python" names="python" refuri="http://www.python.org/">
+ <target ids="python" names="python" refuri="https://www.python.org/">
Let us now examine the node tree:
@@ -106,7 +106,7 @@
-------------------------
In the node tree above, the ``reference`` node does not contain the
-target URI (``http://www.python.org/``) yet.
+target URI (``https://www.python.org/``) yet.
Assigning the target URI (from the ``target`` node) to the
``reference`` node is *not* done by the parser (the parser only
@@ -133,10 +133,10 @@
<emphasis>
favorite
language is
- <reference name="Python" **refuri="http://www.python.org/"**>
+ <reference name="Python" **refuri="https://www.python.org/"**>
Python
.
- <target ids="python" names="python" ``refuri="http://www.python.org/"``>
+ <target ids="python" names="python" ``refuri="https://www.python.org/"``>
For our small test document, the only change is that the ``refname``
attribute of the reference has been replaced by a ``refuri``
@@ -160,8 +160,8 @@
$ rst2html.py --link-stylesheet test.txt
<?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html xmlns="https://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.3.10: https://docutils.sourceforge.io/" />
@@ -170,7 +170,7 @@
</head>
<body>
<div class="document">
- <p>My <em>favorite</em> language is <a class="reference" href="http://www.python.org/">Python</a>.</p>
+ <p>My <em>favorite</em> language is <a class="reference" href="https://www.python.org/">Python</a>.</p>
</div>
</body>
</html>
Modified: trunk/docutils/docs/dev/policies.txt
===================================================================
--- trunk/docutils/docs/dev/policies.txt 2022-01-21 09:58:00 UTC (rev 8958)
+++ trunk/docutils/docs/dev/policies.txt 2022-01-21 13:45:42 UTC (rev 8959)
@@ -98,8 +98,8 @@
quotes""" for docstrings.
.. _Style Guide for Python Code:
- http://www.python.org/peps/pep-0008.html
-.. _Docstring Conventions: http://www.python.org/peps/pep-0257.html
+ https://www.python.org/dev/peps/pep-0008
+.. _Docstring Conventions: https://www.python.org/dev/peps/pep-0257
.. _Docutils Internationalization: ../howto/i18n.html#python-code
@@ -230,7 +230,7 @@
being merged into the core.
.. _docutils-develop mailing list:
- http://lists.sourceforge.net/lists/listinfo/docutils-develop
+ https://lists.sourceforge.net/lists/listinfo/docutils-develop
Review Criteria
@@ -534,15 +534,15 @@
TODO: do we have active maintenance branches?
(the only branch looking like a maintenance branch is
- http://sourceforge.net/p/docutils/code/HEAD/tree/branches/docutils-0.4)
+ https://sourceforge.net/p/docutils/code/HEAD/tree/branches/docutils-0.4)
* `development branches`_, representing ongoing development efforts to bring
new features into Docutils.
.. _Docutils core:
- http://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils
+ https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils
.. _development branches:
- http://sourceforge.net/p/docutils/code/HEAD/tree/branches/
+ https://sourceforge.net/p/docutils/code/HEAD/tree/branches/
Setting Up For Docutils Development
@@ -626,7 +626,7 @@
.. _sandbox README: https://docutils.sourceforge.io/sandbox/README.html
.. _sandbox directory:
- http://sourceforge.net/p/docutils/code/HEAD/tree/trunk/sandbox/
+ https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/sandbox/
.. _parallel project:
Modified: trunk/docutils/docs/dev/release.txt
===================================================================
--- trunk/docutils/docs/dev/release.txt 2022-01-21 09:58:00 UTC (rev 8958)
+++ trunk/docutils/docs/dev/release.txt 2022-01-21 13:45:42 UTC (rev 8959)
@@ -8,7 +8,7 @@
:Revision: $Revision$
:Copyright: This document has been placed in the public domain.
-.. _Docutils: http://docutils.sourceforge.io/
+.. _Docutils: https://docutils.sourceforge.io/
Releasing (post 2020)
---------------------
Modified: trunk/docutils/docs/dev/repository.txt
===================================================================
--- trunk/docutils/docs/dev/repository.txt 2022-01-21 09:58:00 UTC (rev 8958)
+++ trunk/docutils/docs/dev/repository.txt 2022-01-21 13:45:42 UTC (rev 8959)
@@ -45,7 +45,7 @@
.. _SVN:
.. _Subversion: https://subversion.apache.org/
.. _TortoiseSVN: https://tortoisesvn.net/
-.. _SourceForge.net: http://sourceforge.net/
+.. _SourceForge.net: https://sourceforge.net/
.. _Git: http://git-scm.com/
.. contents::
@@ -58,7 +58,7 @@
----------
The repository can be browsed and examined via the web at
-http://sourceforge.net/p/docutils/code.
+https://sourceforge.net/p/docutils/code.
Alternatively, use the web interface at http://repo.or.cz/docutils.git.
[#github-mirrors]_
@@ -237,7 +237,7 @@
Sourceforge SVN access is documented `here`__
-__ http://sourceforge.net/p/forge/documentation/svn/
+__ https://sourceforge.net/p/forge/documentation/svn/
Ensure any changes comply with the `Docutils Project Policies`_
Modified: trunk/docutils/docs/dev/rst/alternatives.txt
===================================================================
--- trunk/docutils/docs/dev/rst/alternatives.txt 2022-01-21 09:58:00 UTC (rev 8958)
+++ trunk/docutils/docs/dev/rst/alternatives.txt 2022-01-21 13:45:42 UTC (rev 8959)
@@ -31,8 +31,7 @@
won't be implemented, but you never know.
.. _Setext: https://docutils.sourceforge.io/mirror/setext.html
-.. _StructuredText:
- http://www.zope.org/DevHome/Members/jim/StructuredTextWiki/FrontPage
+.. _StructuredText: https://zopestructuredtext.readthedocs.org/
.. _Problems with StructuredText: problems.html
.. _reStructuredText Markup Specification:
../../ref/rst/restructuredtext.html
@@ -155,7 +154,7 @@
would be no need for such a transformation for an XML-based markup
syntax.
-.. _RFC822: http://www.rfc-editor.org/rfc/rfc822.txt
+.. _RFC822: https://www.rfc-editor.org/rfc/rfc822.txt
Interpreted Text "Roles"
@@ -287,7 +286,7 @@
Search the `Python DOC-SIG mailing list archives`{}_.
- .. _: http://mail.python.org/pipermail/doc-sig/
+ .. _: https://mail.python.org/pipermail/doc-sig/
The idea is sound and useful. I suggested a "double underscore"
syntax::
@@ -294,7 +293,7 @@
Search the `Python DOC-SIG mailing list archives`__.
- .. __: http://mail.python.org/pipermail/doc-sig/
+ .. __: https://mail.python.org/pipermail/doc-sig/
But perhaps single underscores are okay? The syntax looks better, but
the hyperlink itself doesn't explicitly say "anonymous"::
@@ -301,7 +300,7 @@
Search the `Python DOC-SIG mailing list archives`_.
- .. _: http://mail.python.org/pipermail/doc-sig/
+ .. _: https://mail.python.org/pipermail/doc-sig/
Mixing anonymous and named hyperlinks becomes confusing. The order of
targets is not significant for named hyperlinks, but it is for
@@ -696,7 +695,7 @@
I had lunch with Jonathan_ today. We talked about Zope_.
.. _Jonathan: lj [user=jhl]
- .. _Zope: http://www.zope.org/
+ .. _Zope: https://www.zope.dev/
A problem with the proposed syntax is that URIs which look like
simple reference names (alphanum plus ".", "-", "_") would be
@@ -706,7 +705,7 @@
I had lunch with Jonathan_ today. We talked about Zope_.
.. _Jonathan: lj:: user=jhl
- .. _Zope: http://www.zope.org/
+ .. _Zope: https://www.zope.dev/
(``::`` after ``.. _Jonathan: lj``.)
@@ -748,7 +747,7 @@
.. |biohazard| image:: biohazard.png
[height=20 width=20]
- .. _biohazard: http://www.cdc.gov/
+ .. _biohazard: https://www.cdc.gov/
There have been several suggestions for the naming of these
constructs, originally called "substitution references" and
@@ -829,9 +828,9 @@
a `phrase reference`_. Phrase references may even cross `line
boundaries`_.
- .. _reference: http://www.example.org/reference/
- .. _phrase reference: http://www.example.org/phrase_reference/
- .. _line boundaries: http://www.example.org/line_boundaries/
+ .. _reference: https://www.example.org/reference/
+ .. _phrase reference: https://www.example.org/phrase_reference/
+ .. _line boundaries: https://www.example.org/line_boundaries/
+ Advantages:
@@ -853,9 +852,9 @@
`phrase reference`__. Phrase references may even cross `line
boundaries`__.
- __ http://www.example.org/reference/
- __ http://www.example.org/phrase_reference/
- __ http://www.example.org/line_boundaries/
+ __ https://www.example.org/reference/
+ __ https://www.example.org/phrase_reference/
+ __ https://www.example.org/line_boundaries/
+ Advantages:
@@ -873,15 +872,15 @@
* First, ``"reference text":URL``::
- This is a "reference":http://www.example.org/reference/
+ This is a "reference":https://www.example.org/reference/
of one word ("reference"). Here is a "phrase
- reference":http://www.example.org/phrase_reference/.
+ reference":https://www.example.org/phrase_reference/.
-* Second, ``"reference text", http://example.com/absolute_URL``::
+* Second, ``"reference text", https://example.org/absolute_URL``::
- This is a "reference", http://www.example.org/reference/
+ This is a "reference", https://www.example.org/reference/
of one word ("reference"). Here is a "phrase reference",
- http://www.example.org/phrase_reference/.
+ https://www.example.org/phrase_reference/.
Both syntaxes share advantages and disadvantages:
@@ -905,14 +904,14 @@
1. On 2002-06-28, Simon Budig proposed__ a new syntax for
reStructuredText hyperlinks::
- This is a reference_(http://www.example.org/reference/) of one
+ This is a reference_(https://www.example.org/reference/) of one
word ("reference"). Here is a `phrase
- reference`_(http://www.example.org/phrase_reference/). Are
+ reference`_(https://www.example.org/phrase_reference/). Are
these examples, (single-underscore), named? If so, `anonymous
- references`__(http://www.example.org/anonymous/) using two
+ references`__(https://www.example.org/anonymous/) using two
underscores would probably be preferable.
- __ http://mail.python.org/pipermail/doc-sig/2002-June/002648.html
+ __ https://mail.python.org/pipermail/doc-sig/2002-June/002648.html
The syntax, advantages, and disadvantages are similar to those of
StructuredText.
@@ -953,13 +952,13 @@
following compromise syntax::
This is an anonymous reference__
- __<http://www.example.org/reference/> of one word
+ __<https://www.example.org/reference/> of one word
("reference"). Here is a `phrase reference`__
- __<http://www.example.org/phrase_reference/>. `Named
- references`_ _<http://www.example.org/anonymous/> use single
+ __<https://www.example.org/phrase_reference/>. `Named
+ references`_ _<https://www.example.org/anonymous/> use single
underscores.
- __ http://mail.python.org/pipermail/doc-sig/2002-July/002670.html
+ __ https://mail.python.org/pipermail/doc-sig/2002-July/002670.html
The syntax builds on that of the existing "inline internal
targets": ``an _`inline internal target`.``
@@ -989,8 +988,8 @@
target to appear later, such as after the end of the sentence::
This is a named reference__ of one word ("reference").
- __<http://www.example.org/reference/> Here is a `phrase
- reference`__. __<http://www.example.org/phrase_reference/>
+ __<https://www.example.org/reference/> Here is a `phrase
+ reference`__. __<https://www.example.org/phrase_reference/>
Problem: this could only work for one reference at a time
(reference/target pairs must be proximate [refA trgA refB trgB],
@@ -1030,9 +1029,9 @@
Here's an alternative syntax embedding the target URL in the
reference::
- This is an anonymous `reference <http://www.example.org
+ This is an anonymous `reference <https://www.example.org
/reference/>`__ of one word ("reference"). Here is a `phrase
- reference <http://www.example.org/phrase_reference/>`__.
+ reference <https://www.example.org/phrase_reference/>`__.
Advantages and disadvantages are similar to those in (2).
Readability is still an issue, but the syntax is a bit less
@@ -1045,7 +1044,7 @@
Problem: how to refer to a title like "HTML Anchors: <a>" (which
ends with an HTML/SGML/XML tag)? We could either require more
syntax on the target (like ``"`reference text
- __<http://example.com/>`__"``), or require the odd conflicting
+ __<https://example.org/>`__"``), or require the odd conflicting
title to be escaped (like ``"`HTML Anchors: \<a>`__"``). The
latter seems preferable, and not too onerous.
@@ -1058,17 +1057,17 @@
Other syntax variations have been proposed (by Brett Cannon and Benja
Fallenstein)::
- `phrase reference`->http://www.example.com
+ `phrase reference`->https://www.example.org
- `phrase reference`@http://www.example.com
+ `phrase reference`@https://www.example.org
- `phrase reference`__ ->http://www.example.com
+ `phrase reference`__ ->https://www.example.org
- `phrase reference` [-> http://www.example.com]
+ `phrase reference` [-> https://www.example.org]
- `phrase reference`__ [-> http://www.example.com]
+ `phrase reference`__ [-> https://www.example.org]
- `phrase reference` <http://www.example.com>_
+ `phrase reference` <https://www.example.org>_
None of these variations are clearly superior to #3 above. Some have
problems that exclude their use.
@@ -1239,7 +1238,7 @@
Solution 3 was chosen for incorporation into the document tree model.
-.. _HTML: http://www.w3.org/MarkUp/
+.. _HTML: https://www.w3.org/MarkUp/
Syntax for Line Blocks
@@ -1288,7 +1287,7 @@
| President, SuperDuper Corp.
| jd...@ex...
- __ http://thread.gmane.org/gmane.text.docutils.devel/1187
+ __ https://thread.gmane.org/gmane.text.docutils.devel/1187
This syntax is very natural. However, these "plain lists" seem very
similar to line blocks, and I see so little intrinsic "list-ness"
@@ -1807,7 +1806,7 @@
auto-numbered lists be limited to begin with ordinal-1 ("1", "A",
"a", "I", or "i")?
- __ http://sourceforge.net/tracker/index.php?func=detail&aid=548802
+ __ https://sourceforge.net/tracker/index.php?func=detail&aid=548802
&group_id=38414&atid=422032
4. Alternative proposed by Tony Ibbs::
@@ -1886,7 +1885,7 @@
.. _Inline markup recognition rules:
../../ref/rst/restructuredtext.html#inline-markup-recognition-rules
.. _Unicode cate...
[truncated message content] |
|
From: <mi...@us...> - 2022-01-21 13:46:08
|
Revision: 8960
http://sourceforge.net/p/docutils/code/8960
Author: milde
Date: 2022-01-21 13:46:05 +0000 (Fri, 21 Jan 2022)
Log Message:
-----------
Update base URL config settings defaults.
The default values for the "pep-references", "rfc-base-url", and
"python-home" `configuration settings`_ now uses the "https:" scheme.
Based on a patch by Adam Turner.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/parsers/rst/__init__.py
trunk/docutils/docutils/writers/pep_html/__init__.py
trunk/docutils/test/functional/expected/latex_literal_block.tex
trunk/docutils/test/functional/expected/latex_literal_block_fancyvrb.tex
trunk/docutils/test/functional/expected/latex_literal_block_listings.tex
trunk/docutils/test/functional/expected/latex_literal_block_verbatim.tex
trunk/docutils/test/functional/expected/latex_literal_block_verbatimtab.tex
trunk/docutils/test/functional/expected/latex_memoir.tex
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_latex.tex
trunk/docutils/test/functional/expected/standalone_rst_pseudoxml.txt
trunk/docutils/test/functional/expected/standalone_rst_xetex.tex
trunk/docutils/test/test_parsers/test_rst/test_interpreted.py
trunk/docutils/test/test_readers/test_pep/test_inline_markup.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/HISTORY.txt 2022-01-21 13:46:05 UTC (rev 8960)
@@ -36,6 +36,10 @@
.. _"include" directive: docs/ref/rst/directives.html#include
+* docutils/parsers/rst/__init__.py
+
+ - use "https:" scheme in PEP and RFC base link defaults.
+
* docutils/parsers/rst/directives/__init__.py
- parser_name() keeps details if converting ImportError to ValueError.
@@ -54,6 +58,10 @@
- Add deprecation warning.
+* docutils/writers/pep_html/:
+
+ - use "https:" scheme in "python_home" URL default.
+
* 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-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/RELEASE-NOTES.txt 2022-01-21 13:46:05 UTC (rev 8960)
@@ -91,6 +91,11 @@
* Support calling the "myst" parser (https://pypi.org/project/myst-docutils)
from docutils-cli.py_.
+* The default values for the "pep-references", "rfc-base-url",
+ and "python-home" `configuration settings`_ now uses the "https:" scheme.
+
+.. _configuration settings: docs/user/config.html
+
Release 0.18.1 (2021-12-23)
===========================
Modified: trunk/docutils/docutils/parsers/rst/__init__.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/__init__.py 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/docutils/parsers/rst/__init__.py 2022-01-21 13:46:05 UTC (rev 8960)
@@ -91,9 +91,9 @@
['--pep-references'],
{'action': 'store_true', 'validator': frontend.validate_boolean}),
('Base URL for PEP references '
- '(default "http://www.python.org/dev/peps/").',
+ '(default "https://www.python.org/dev/peps/").',
['--pep-base-url'],
- {'metavar': '<URL>', 'default': 'http://www.python.org/dev/peps/',
+ {'metavar': '<URL>', 'default': 'https://www.python.org/dev/peps/',
'validator': frontend.validate_url_trailing_slash}),
('Template for PEP file part of URL. (default "pep-%04d")',
['--pep-file-url-template'],
@@ -101,9 +101,9 @@
('Recognize and link to standalone RFC references (like "RFC 822").',
['--rfc-references'],
{'action': 'store_true', 'validator': frontend.validate_boolean}),
- ('Base URL for RFC references (default "http://tools.ietf.org/html/").',
+ ('Base URL for RFC references (default "https://tools.ietf.org/html/").',
['--rfc-base-url'],
- {'metavar': '<URL>', 'default': 'http://tools.ietf.org/html/',
+ {'metavar': '<URL>', 'default': 'https://tools.ietf.org/html/',
'validator': frontend.validate_url_trailing_slash}),
('Set number of spaces for tab expansion (default 8).',
['--tab-width'],
Modified: trunk/docutils/docutils/writers/pep_html/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/pep_html/__init__.py 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/docutils/writers/pep_html/__init__.py 2022-01-21 13:46:05 UTC (rev 8960)
@@ -37,9 +37,9 @@
'option is "%s", and the default value for --template is "%s". '
'See HTML Writer Options above.'
% (default_stylesheet_path, default_template_path),
- (('Python\'s home URL. Default is "http://www.python.org".',
+ (('Python\'s home URL. Default is "https://www.python.org".',
['--python-home'],
- {'default': 'http://www.python.org', 'metavar': '<URL>'}),
+ {'default': 'https://www.python.org', 'metavar': '<URL>'}),
('Home URL prefix for PEPs. Default is "." (current directory).',
['--pep-home'],
{'default': '.', 'metavar': '<URL>'}),
Modified: trunk/docutils/test/functional/expected/latex_literal_block.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_literal_block.tex 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/test/functional/expected/latex_literal_block.tex 2022-01-21 13:46:05 UTC (rev 8960)
@@ -137,8 +137,8 @@
citation~references~(\hyperlink{cit2002}{[CIT2002]}),~and~more.\\
~\\
~~~Here~are~some~explicit~interpreted~text~roles:\\
-a~PEP~reference~(\href{http://www.python.org/dev/peps/pep-0287}{PEP~287}),\\
-an~RFC~reference~(\href{http://tools.ietf.org/html/rfc2822.html}{RFC~2822}),\\
+a~PEP~reference~(\href{https://www.python.org/dev/peps/pep-0287}{PEP~287}),\\
+an~RFC~reference~(\href{https://tools.ietf.org/html/rfc2822.html}{RFC~2822}),\\
an~abbreviation~(\DUrole{abbreviation}{abb.}),~an~acronym~(\DUrole{acronym}{reST}),\\
code~(\texttt{\DUrole{code}{print~\textquotedbl{}hello~world\textquotedbl{}}}),\\
maths~$\sin^2(x)$,\\
Modified: trunk/docutils/test/functional/expected/latex_literal_block_fancyvrb.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_literal_block_fancyvrb.tex 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/test/functional/expected/latex_literal_block_fancyvrb.tex 2022-01-21 13:46:05 UTC (rev 8960)
@@ -137,8 +137,8 @@
citation~references~(\hyperlink{cit2002}{[CIT2002]}),~and~more.\\
~\\
~~~Here~are~some~explicit~interpreted~text~roles:\\
-a~PEP~reference~(\href{http://www.python.org/dev/peps/pep-0287}{PEP~287}),\\
-an~RFC~reference~(\href{http://tools.ietf.org/html/rfc2822.html}{RFC~2822}),\\
+a~PEP~reference~(\href{https://www.python.org/dev/peps/pep-0287}{PEP~287}),\\
+an~RFC~reference~(\href{https://tools.ietf.org/html/rfc2822.html}{RFC~2822}),\\
an~abbreviation~(\DUrole{abbreviation}{abb.}),~an~acronym~(\DUrole{acronym}{reST}),\\
code~(\texttt{\DUrole{code}{print~\textquotedbl{}hello~world\textquotedbl{}}}),\\
maths~$\sin^2(x)$,\\
Modified: trunk/docutils/test/functional/expected/latex_literal_block_listings.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_literal_block_listings.tex 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/test/functional/expected/latex_literal_block_listings.tex 2022-01-21 13:46:05 UTC (rev 8960)
@@ -140,8 +140,8 @@
citation~references~(\hyperlink{cit2002}{[CIT2002]}),~and~more.\\
~\\
~~~Here~are~some~explicit~interpreted~text~roles:\\
-a~PEP~reference~(\href{http://www.python.org/dev/peps/pep-0287}{PEP~287}),\\
-an~RFC~reference~(\href{http://tools.ietf.org/html/rfc2822.html}{RFC~2822}),\\
+a~PEP~reference~(\href{https://www.python.org/dev/peps/pep-0287}{PEP~287}),\\
+an~RFC~reference~(\href{https://tools.ietf.org/html/rfc2822.html}{RFC~2822}),\\
an~abbreviation~(\DUrole{abbreviation}{abb.}),~an~acronym~(\DUrole{acronym}{reST}),\\
code~(\texttt{\DUrole{code}{print~\textquotedbl{}hello~world\textquotedbl{}}}),\\
maths~$\sin^2(x)$,\\
Modified: trunk/docutils/test/functional/expected/latex_literal_block_verbatim.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_literal_block_verbatim.tex 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/test/functional/expected/latex_literal_block_verbatim.tex 2022-01-21 13:46:05 UTC (rev 8960)
@@ -136,8 +136,8 @@
citation~references~(\hyperlink{cit2002}{[CIT2002]}),~and~more.\\
~\\
~~~Here~are~some~explicit~interpreted~text~roles:\\
-a~PEP~reference~(\href{http://www.python.org/dev/peps/pep-0287}{PEP~287}),\\
-an~RFC~reference~(\href{http://tools.ietf.org/html/rfc2822.html}{RFC~2822}),\\
+a~PEP~reference~(\href{https://www.python.org/dev/peps/pep-0287}{PEP~287}),\\
+an~RFC~reference~(\href{https://tools.ietf.org/html/rfc2822.html}{RFC~2822}),\\
an~abbreviation~(\DUrole{abbreviation}{abb.}),~an~acronym~(\DUrole{acronym}{reST}),\\
code~(\texttt{\DUrole{code}{print~\textquotedbl{}hello~world\textquotedbl{}}}),\\
maths~$\sin^2(x)$,\\
Modified: trunk/docutils/test/functional/expected/latex_literal_block_verbatimtab.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_literal_block_verbatimtab.tex 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/test/functional/expected/latex_literal_block_verbatimtab.tex 2022-01-21 13:46:05 UTC (rev 8960)
@@ -137,8 +137,8 @@
citation~references~(\hyperlink{cit2002}{[CIT2002]}),~and~more.\\
~\\
~~~Here~are~some~explicit~interpreted~text~roles:\\
-a~PEP~reference~(\href{http://www.python.org/dev/peps/pep-0287}{PEP~287}),\\
-an~RFC~reference~(\href{http://tools.ietf.org/html/rfc2822.html}{RFC~2822}),\\
+a~PEP~reference~(\href{https://www.python.org/dev/peps/pep-0287}{PEP~287}),\\
+an~RFC~reference~(\href{https://tools.ietf.org/html/rfc2822.html}{RFC~2822}),\\
an~abbreviation~(\DUrole{abbreviation}{abb.}),~an~acronym~(\DUrole{acronym}{reST}),\\
code~(\texttt{\DUrole{code}{print~\textquotedbl{}hello~world\textquotedbl{}}}),\\
maths~$\sin^2(x)$,\\
Modified: trunk/docutils/test/functional/expected/latex_memoir.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_memoir.tex 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/test/functional/expected/latex_memoir.tex 2022-01-21 13:46:05 UTC (rev 8960)
@@ -345,8 +345,8 @@
reference to the \hyperref[doctitle]{doctitle} and the \hyperref[subtitle]{subtitle}.
The default role for interpreted text is \DUroletitlereference{Title Reference}. Here are
-some explicit interpreted text roles: a PEP reference (\href{http://www.python.org/dev/peps/pep-0287}{PEP 287}); an
-RFC reference (\href{http://tools.ietf.org/html/rfc2822.html}{RFC 2822}); an abbreviation (\DUrole{abbreviation}{abb.}), an acronym
+some explicit interpreted text roles: a PEP reference (\href{https://www.python.org/dev/peps/pep-0287}{PEP 287}); an
+RFC reference (\href{https://tools.ietf.org/html/rfc2822.html}{RFC 2822}); an abbreviation (\DUrole{abbreviation}{abb.}), an acronym
(\DUrole{acronym}{reST}), code (\texttt{\DUrole{code}{print \textquotedbl{}hello world\textquotedbl{}}}); a \textsubscript{subscript};
a \textsuperscript{superscript} and explicit roles for \DUroletitlereference{Docutils}'
\emph{standard} \textbf{inline} \texttt{markup}.
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/test/functional/expected/pep_html.html 2022-01-21 13:46:05 UTC (rev 8960)
@@ -45,7 +45,7 @@
</tr>
<tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td>
</tr>
-<tr class="field"><th class="field-name">Content-Type:</th><td class="field-body"><a class="reference external" href="http://www.python.org/dev/peps/pep-0012">text/x-rst</a></td>
+<tr class="field"><th class="field-name">Content-Type:</th><td class="field-body"><a class="reference external" href="https://www.python.org/dev/peps/pep-0012">text/x-rst</a></td>
</tr>
<tr class="field"><th class="field-name">Created:</th><td class="field-body">01-Jun-2001</td>
</tr>
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2022-01-21 13:46:05 UTC (rev 8960)
@@ -255,8 +255,8 @@
<target anonymous="1" ids="target-1" refuri="http://www.python.org/"></target>
<target anonymous="1" ids="target-2" refuri="https://docutils.sourceforge.io/"></target>
<paragraph>The default role for interpreted text is <title_reference>Title Reference</title_reference>. Here are
- some explicit interpreted text roles: a PEP reference (<reference refuri="http://www.python.org/dev/peps/pep-0287">PEP 287</reference>); an
- RFC reference (<reference refuri="http://tools.ietf.org/html/rfc2822.html">RFC 2822</reference>); an abbreviation (<abbreviation>abb.</abbreviation>), an acronym
+ some explicit interpreted text roles: a PEP reference (<reference refuri="https://www.python.org/dev/peps/pep-0287">PEP 287</reference>); an
+ RFC reference (<reference refuri="https://tools.ietf.org/html/rfc2822.html">RFC 2822</reference>); an abbreviation (<abbreviation>abb.</abbreviation>), an acronym
(<acronym>reST</acronym>), code (<literal classes="code">print "hello world"</literal>); a <subscript>subscript</subscript>;
a <superscript>superscript</superscript> and explicit roles for <title_reference>Docutils</title_reference>'
<emphasis>standard</emphasis> <strong>inline</strong> <literal>markup</literal>.</paragraph>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2022-01-21 13:46:05 UTC (rev 8960)
@@ -185,8 +185,8 @@
(generated by processing errors; this one is intentional). Here is a
reference to the <a class="reference internal" href="#doctitle">doctitle</a> and the <a class="reference internal" href="#subtitle">subtitle</a>.</p>
<p>The default role for interpreted text is <cite>Title Reference</cite>. Here are
-some explicit interpreted text roles: a PEP reference (<a class="reference external" href="http://www.python.org/dev/peps/pep-0287">PEP 287</a>); an
-RFC reference (<a class="reference external" href="http://tools.ietf.org/html/rfc2822.html">RFC 2822</a>); an abbreviation (<abbr>abb.</abbr>), an acronym
+some explicit interpreted text roles: a PEP reference (<a class="reference external" href="https://www.python.org/dev/peps/pep-0287">PEP 287</a>); an
+RFC reference (<a class="reference external" href="https://tools.ietf.org/html/rfc2822.html">RFC 2822</a>); an abbreviation (<abbr>abb.</abbr>), an acronym
(<acronym>reST</acronym>), code (<code>print "hello world"</code>); a <sub>subscript</sub>;
a <sup>superscript</sup> and explicit roles for <cite>Docutils</cite>'
<em>standard</em> <strong>inline</strong> <tt class="docutils literal">markup</tt>.</p>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2022-01-21 13:46:05 UTC (rev 8960)
@@ -203,8 +203,8 @@
(generated by processing errors; this one is intentional). Here is a
reference to the <a class="reference internal" href="#doctitle">doctitle</a> and the <a class="reference internal" href="#subtitle">subtitle</a>.</p>
<p>The default role for interpreted text is <cite>Title Reference</cite>. Here are
-some explicit interpreted text roles: a PEP reference (<a class="reference external" href="http://www.python.org/dev/peps/pep-0287">PEP 287</a>); an
-RFC reference (<a class="reference external" href="http://tools.ietf.org/html/rfc2822.html">RFC 2822</a>); an abbreviation (<abbr>abb.</abbr>), an acronym
+some explicit interpreted text roles: a PEP reference (<a class="reference external" href="https://www.python.org/dev/peps/pep-0287">PEP 287</a>); an
+RFC reference (<a class="reference external" href="https://tools.ietf.org/html/rfc2822.html">RFC 2822</a>); an abbreviation (<abbr>abb.</abbr>), an acronym
(<abbr>reST</abbr>), code (<code>print "hello world"</code>); a <sub>subscript</sub>;
a <sup>superscript</sup> and explicit roles for <cite>Docutils</cite>'
<em>standard</em> <strong>inline</strong> <span class="docutils literal">markup</span>.</p>
Modified: trunk/docutils/test/functional/expected/standalone_rst_latex.tex
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_latex.tex 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/test/functional/expected/standalone_rst_latex.tex 2022-01-21 13:46:05 UTC (rev 8960)
@@ -346,8 +346,8 @@
reference to the \hyperref[doctitle]{doctitle} and the \hyperref[subtitle]{subtitle}.
The default role for interpreted text is \DUroletitlereference{Title Reference}. Here are
-some explicit interpreted text roles: a PEP reference (\href{http://www.python.org/dev/peps/pep-0287}{PEP 287}); an
-RFC reference (\href{http://tools.ietf.org/html/rfc2822.html}{RFC 2822}); an abbreviation (\DUrole{abbreviation}{abb.}), an acronym
+some explicit interpreted text roles: a PEP reference (\href{https://www.python.org/dev/peps/pep-0287}{PEP 287}); an
+RFC reference (\href{https://tools.ietf.org/html/rfc2822.html}{RFC 2822}); an abbreviation (\DUrole{abbreviation}{abb.}), an acronym
(\DUrole{acronym}{reST}), code (\texttt{\DUrole{code}{print \textquotedbl{}hello world\textquotedbl{}}}); a \textsubscript{subscript};
a \textsuperscript{superscript} and explicit roles for \DUroletitlereference{Docutils}’
\emph{standard} \textbf{inline} \texttt{markup}.
Modified: trunk/docutils/test/functional/expected/standalone_rst_pseudoxml.txt
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_pseudoxml.txt 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/test/functional/expected/standalone_rst_pseudoxml.txt 2022-01-21 13:46:05 UTC (rev 8960)
@@ -505,11 +505,11 @@
Title Reference
. Here are
some explicit interpreted text roles: a PEP reference (
- <reference refuri="http://www.python.org/dev/peps/pep-0287">
+ <reference refuri="https://www.python.org/dev/peps/pep-0287">
PEP 287
); an
RFC reference (
- <reference refuri="http://tools.ietf.org/html/rfc2822.html">
+ <reference refuri="https://tools.ietf.org/html/rfc2822.html">
RFC 2822
); an abbreviation (
<abbreviation>
Modified: trunk/docutils/test/functional/expected/standalone_rst_xetex.tex
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_xetex.tex 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/test/functional/expected/standalone_rst_xetex.tex 2022-01-21 13:46:05 UTC (rev 8960)
@@ -347,8 +347,8 @@
reference to the \hyperref[doctitle]{doctitle} and the \hyperref[subtitle]{subtitle}.
The default role for interpreted text is \DUroletitlereference{Title Reference}. Here are
-some explicit interpreted text roles: a PEP reference (\href{http://www.python.org/dev/peps/pep-0287}{PEP 287}); an
-RFC reference (\href{http://tools.ietf.org/html/rfc2822.html}{RFC 2822}); an abbreviation (\DUrole{abbreviation}{abb.}), an acronym
+some explicit interpreted text roles: a PEP reference (\href{https://www.python.org/dev/peps/pep-0287}{PEP 287}); an
+RFC reference (\href{https://tools.ietf.org/html/rfc2822.html}{RFC 2822}); an abbreviation (\DUrole{abbreviation}{abb.}), an acronym
(\DUrole{acronym}{reST}), code (\texttt{\DUrole{code}{print \textquotedbl{}hello world\textquotedbl{}}}); a \textsubscript{subscript};
a \textsuperscript{superscript} and explicit roles for \DUroletitlereference{Docutils}’
\emph{standard} \textbf{inline} \texttt{markup}.
Modified: trunk/docutils/test/test_parsers/test_rst/test_interpreted.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_interpreted.py 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/test/test_parsers/test_rst/test_interpreted.py 2022-01-21 13:46:05 UTC (rev 8960)
@@ -301,7 +301,7 @@
"""\
<document source="test data">
<paragraph>
- <reference refuri="http://www.python.org/dev/peps/pep-0000">
+ <reference refuri="https://www.python.org/dev/peps/pep-0000">
PEP 0
"""],
["""\
@@ -322,7 +322,7 @@
"""\
<document source="test data">
<paragraph>
- <reference refuri="http://tools.ietf.org/html/rfc2822.html">
+ <reference refuri="https://tools.ietf.org/html/rfc2822.html">
RFC 2822
"""],
["""\
@@ -343,7 +343,7 @@
"""\
<document source="test data">
<paragraph>
- <reference refuri="http://tools.ietf.org/html/rfc2822.html#section1">
+ <reference refuri="https://tools.ietf.org/html/rfc2822.html#section1">
RFC 2822
"""],
]
Modified: trunk/docutils/test/test_readers/test_pep/test_inline_markup.py
===================================================================
--- trunk/docutils/test/test_readers/test_pep/test_inline_markup.py 2022-01-21 13:45:42 UTC (rev 8959)
+++ trunk/docutils/test/test_readers/test_pep/test_inline_markup.py 2022-01-21 13:46:05 UTC (rev 8960)
@@ -30,20 +30,20 @@
<document source="test data">
<paragraph>
See \n\
- <reference refuri="http://www.python.org/dev/peps/pep-0287">
+ <reference refuri="https://www.python.org/dev/peps/pep-0287">
PEP 287
(
- <reference refuri="http://www.python.org/dev/peps/pep-0287">
+ <reference refuri="https://www.python.org/dev/peps/pep-0287">
pep-0287.txt
),
and \n\
- <reference refuri="http://tools.ietf.org/html/rfc2822.html">
+ <reference refuri="https://tools.ietf.org/html/rfc2822.html">
RFC 2822
(which obsoletes \n\
- <reference refuri="http://tools.ietf.org/html/rfc822.html">
+ <reference refuri="https://tools.ietf.org/html/rfc822.html">
RFC822
and \n\
- <reference refuri="http://tools.ietf.org/html/rfc733.html">
+ <reference refuri="https://tools.ietf.org/html/rfc733.html">
RFC-733
).
"""],
@@ -61,11 +61,11 @@
<paragraph>
References split across lines:
<paragraph>
- <reference refuri="http://www.python.org/dev/peps/pep-0287">
+ <reference refuri="https://www.python.org/dev/peps/pep-0287">
PEP
287
<paragraph>
- <reference refuri="http://tools.ietf.org/html/rfc2822.html">
+ <reference refuri="https://tools.ietf.org/html/rfc2822.html">
RFC
2822
"""],
@@ -72,7 +72,7 @@
["""\
Test PEP-specific implicit references before a URL:
-PEP 287 (http://www.python.org/dev/peps/pep-0287), RFC 2822.
+PEP 287 (https://www.python.org/dev/peps/pep-0287), RFC 2822.
""",
"""\
<document source="test data">
@@ -79,13 +79,13 @@
<paragraph>
Test PEP-specific implicit references before a URL:
<paragraph>
- <reference refuri="http://www.python.org/dev/peps/pep-0287">
+ <reference refuri="https://www.python.org/dev/peps/pep-0287">
PEP 287
(
- <reference refuri="http://www.python.org/dev/peps/pep-0287">
- http://www.python.org/dev/peps/pep-0287
+ <reference refuri="https://www.python.org/dev/peps/pep-0287">
+ https://www.python.org/dev/peps/pep-0287
), \n\
- <reference refuri="http://tools.ietf.org/html/rfc2822.html">
+ <reference refuri="https://tools.ietf.org/html/rfc2822.html">
RFC 2822
.
"""],
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-25 16:39:18
|
Revision: 8966
http://sourceforge.net/p/docutils/code/8966
Author: milde
Date: 2022-01-25 16:39:15 +0000 (Tue, 25 Jan 2022)
Log Message:
-----------
Suppress help output for deprecated command line options.
Modified Paths:
--------------
trunk/docutils/docutils/writers/html5_polyglot/__init__.py
trunk/docutils/tools/buildhtml.py
Modified: trunk/docutils/docutils/writers/html5_polyglot/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2022-01-25 16:39:07 UTC (rev 8965)
+++ trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2022-01-25 16:39:15 UTC (rev 8966)
@@ -83,11 +83,11 @@
settings_spec = settings_spec + (
'HTML5 Writer Options',
'',
- (('Obsoleted by "--image-loading".',
+ ((frontend.SUPPRESS_HELP, # Obsoleted by "--image-loading"
['--embed-images'],
{'action': 'store_true',
'validator': frontend.validate_boolean}),
- ('Obsoleted by "--image-loading".',
+ (frontend.SUPPRESS_HELP, # Obsoleted by "--image-loading"
['--link-images'],
{'dest': 'embed_images', 'action': 'store_false'}),
('Suggest at which point images should be loaded: '
Modified: trunk/docutils/tools/buildhtml.py
===================================================================
--- trunk/docutils/tools/buildhtml.py 2022-01-25 16:39:07 UTC (rev 8965)
+++ trunk/docutils/tools/buildhtml.py 2022-01-25 16:39:15 UTC (rev 8966)
@@ -83,7 +83,7 @@
'choices': ['html', 'html4', 'html5'],
# 'default': 'html' (set below)
}),
- ('Obsoleted by "--writer".',
+ (frontend.SUPPRESS_HELP, # Obsoleted by "--writer"
['--html-writer'],
{'metavar': '<writer>',
'choices': ['html', 'html4', 'html5'],}),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-26 09:32:44
|
Revision: 8967
http://sourceforge.net/p/docutils/code/8967
Author: milde
Date: 2022-01-26 09:32:41 +0000 (Wed, 26 Jan 2022)
Log Message:
-----------
Fix [bug:#443].
Add "html writers" to
`docutils.writers._html_base.Writer.config_section_dependencies`.
Now, it works "out of the box" for writers inheriting from `_html_base`.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/html4css1/__init__.py
trunk/docutils/docutils/writers/html5_polyglot/__init__.py
trunk/docutils/docutils/writers/xetex/__init__.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2022-01-25 16:39:15 UTC (rev 8966)
+++ trunk/docutils/HISTORY.txt 2022-01-26 09:32:41 UTC (rev 8967)
@@ -58,8 +58,12 @@
- Add deprecation warning.
-* docutils/writers/pep_html/:
+* docutils/writers/_html_base.py
+ - Add 'html writers' to `config_section_dependencies`. Fixes bug #443.
+
+* docutils/writers/pep_html/
+
- use "https:" scheme in "python_home" URL default.
* test/DocutilsTestSupport.py
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2022-01-25 16:39:15 UTC (rev 8966)
+++ trunk/docutils/docutils/writers/_html_base.py 2022-01-26 09:32:41 UTC (rev 8967)
@@ -130,8 +130,8 @@
settings_defaults = {'output_encoding_error_handler': 'xmlcharrefreplace'}
- config_section = 'html writers'
- config_section_dependencies = ('writers', )
+ config_section = 'html base writer' # overwrite in subclass
+ config_section_dependencies = ('writers', 'html writers')
visitor_attributes = (
'head_prefix', 'head', 'stylesheet', 'body_prefix',
Modified: trunk/docutils/docutils/writers/html4css1/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html4css1/__init__.py 2022-01-25 16:39:15 UTC (rev 8966)
+++ trunk/docutils/docutils/writers/html4css1/__init__.py 2022-01-26 09:32:41 UTC (rev 8967)
@@ -38,9 +38,9 @@
default_template = os.path.join(
os.path.dirname(os.path.abspath(__file__)), 'template.txt')
+ # use a copy of the parent spec with some modifications
settings_spec = frontend.filter_settings_spec(
writers._html_base.Writer.settings_spec,
- # update specs with changed defaults or help string
template =
('Template file. (UTF-8 encoded, default: "%s")' % default_template,
['--template'],
@@ -95,7 +95,6 @@
))
config_section = 'html4css1 writer'
- config_section_dependencies = ('writers', 'html writers')
def __init__(self):
self.parts = {}
Modified: trunk/docutils/docutils/writers/html5_polyglot/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2022-01-25 16:39:15 UTC (rev 8966)
+++ trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2022-01-26 09:32:41 UTC (rev 8967)
@@ -44,9 +44,9 @@
default_template = os.path.join(
os.path.dirname(os.path.abspath(__file__)), 'template.txt')
+ # use a copy of the parent spec with some modifications
settings_spec = frontend.filter_settings_spec(
writers._html_base.Writer.settings_spec,
- # update specs with changed defaults or help string
template =
('Template file. (UTF-8 encoded, default: "%s")' % default_template,
['--template'],
Modified: trunk/docutils/docutils/writers/xetex/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/xetex/__init__.py 2022-01-25 16:39:15 UTC (rev 8966)
+++ trunk/docutils/docutils/writers/xetex/__init__.py 2022-01-26 09:32:41 UTC (rev 8967)
@@ -48,9 +48,11 @@
config_section_dependencies = ('writers', 'latex writers',
'latex2e writer') # TODO: remove dependency on `latex2e writer`.
+ # use a copy of the parent spec with some modifications:
settings_spec = frontend.filter_settings_spec(
latex2e.Writer.settings_spec,
- 'font_encoding', # removed settings
+ # removed settings
+ 'font_encoding',
# changed settings:
template=('Template file. Default: "%s".' % default_template,
['--template'],
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-26 19:02:31
|
Revision: 8969
http://sourceforge.net/p/docutils/code/8969
Author: milde
Date: 2022-01-26 19:02:28 +0000 (Wed, 26 Jan 2022)
Log Message:
-----------
Code modernisation. Use literals.
Merger of 2 patches by Adam Turner.
Modified Paths:
--------------
trunk/docutils/docutils/transforms/universal.py
trunk/docutils/docutils/utils/math/math2html.py
trunk/docutils/docutils/writers/html5_polyglot/__init__.py
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/docutils/writers/xetex/__init__.py
trunk/docutils/test/local-parser.py
Modified: trunk/docutils/docutils/transforms/universal.py
===================================================================
--- trunk/docutils/docutils/transforms/universal.py 2022-01-26 19:02:15 UTC (rev 8968)
+++ trunk/docutils/docutils/transforms/universal.py 2022-01-26 19:02:28 UTC (rev 8969)
@@ -198,8 +198,8 @@
def apply(self):
if self.document.settings.strip_elements_with_classes:
- self.strip_elements = set(
- self.document.settings.strip_elements_with_classes)
+ self.strip_elements = {*self.document.settings
+ .strip_elements_with_classes}
# Iterate over a tuple as removing the current node
# corrupts the iterator returned by `iter`:
for node in tuple(self.document.findall(self.check_classes)):
Modified: trunk/docutils/docutils/utils/math/math2html.py
===================================================================
--- trunk/docutils/docutils/utils/math/math2html.py 2022-01-26 19:02:15 UTC (rev 8968)
+++ trunk/docutils/docutils/utils/math/math2html.py 2022-01-26 19:02:28 UTC (rev 8969)
@@ -625,7 +625,7 @@
simplemath = False
showlines = True
- branches = dict()
+ branches = {}
def parseoptions(self, args):
"Parse command line options"
@@ -734,7 +734,7 @@
def __init__(self):
self.begin = 0
- self.parameters = dict()
+ self.parameters = {}
def parseheader(self, reader):
"Parse the header"
@@ -2042,7 +2042,7 @@
def __init__(self):
"Initialize the map of instances."
- self.instances = dict()
+ self.instances = {}
def detecttype(self, type, pos):
"Detect a bit of a given type."
@@ -2933,7 +2933,7 @@
def readparams(self, readtemplate, pos):
"Read the params according to the template."
- self.params = dict()
+ self.params = {}
for paramdef in self.paramdefs(readtemplate):
paramdef.read(pos, self)
self.params['$' + paramdef.name] = paramdef
Modified: trunk/docutils/docutils/writers/html5_polyglot/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2022-01-26 19:02:15 UTC (rev 8968)
+++ trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2022-01-26 19:02:28 UTC (rev 8969)
@@ -155,7 +155,7 @@
# <figcaption> is closed in depart_figure(), as legend may follow.
# use HTML block-level tags if matching class value found
- supported_block_tags = set(('ins', 'del'))
+ supported_block_tags = {'ins', 'del'}
def visit_container(self, node):
# If there is exactly one of the "supported block tags" in
# the list of class values, use it as tag name:
@@ -301,9 +301,9 @@
pass
# use HTML text-level tags if matching class value found
- supported_inline_tags = set(('code', 'kbd', 'dfn', 'samp', 'var',
- 'bdi', 'del', 'ins', 'mark', 'small',
- 'b', 'i', 'q', 's', 'u'))
+ supported_inline_tags = {'code', 'kbd', 'dfn', 'samp', 'var',
+ 'bdi', 'del', 'ins', 'mark', 'small',
+ 'b', 'i', 'q', 's', 'u'}
def visit_inline(self, node):
# Use `supported_inline_tags` if found in class values
classes = node['classes']
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-26 19:02:15 UTC (rev 8968)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-26 19:02:28 UTC (rev 8969)
@@ -388,7 +388,7 @@
# zh-Latn: Chinese Pinyin
}
# normalize (downcase) keys
- language_codes = dict([(k.lower(), v) for (k, v) in language_codes.items()])
+ language_codes = {k.lower(): v for k, v in language_codes.items()}
warn_msg = 'Language "%s" not supported by LaTeX (babel)'
Modified: trunk/docutils/docutils/writers/xetex/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/xetex/__init__.py 2022-01-26 19:02:15 UTC (rev 8968)
+++ trunk/docutils/docutils/writers/xetex/__init__.py 2022-01-26 19:02:28 UTC (rev 8969)
@@ -96,7 +96,7 @@
# zh-Latn: ??? # Chinese Pinyin
})
# normalize (downcase) keys
- language_codes = dict([(k.lower(), v) for (k, v) in language_codes.items()])
+ language_codes = {k.lower(): v for k, v in language_codes.items()}
# Languages without Polyglossia support:
for key in ('af', # 'afrikaans',
Modified: trunk/docutils/test/local-parser.py
===================================================================
--- trunk/docutils/test/local-parser.py 2022-01-26 19:02:15 UTC (rev 8968)
+++ trunk/docutils/test/local-parser.py 2022-01-26 19:02:28 UTC (rev 8969)
@@ -16,5 +16,4 @@
def parser(self, inputstring, document):
self.setup_parse(inputstring, document)
- document = dict()
self.finish_parse()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-26 19:02:48
|
Revision: 8970
http://sourceforge.net/p/docutils/code/8970
Author: milde
Date: 2022-01-26 19:02:44 +0000 (Wed, 26 Jan 2022)
Log Message:
-----------
Use generator expressions with functions expecting a sequence.
Based on patches by Adam Turner
Modified Paths:
--------------
trunk/docutils/docutils/io.py
trunk/docutils/docutils/nodes.py
trunk/docutils/docutils/parsers/rst/directives/__init__.py
trunk/docutils/docutils/parsers/rst/states.py
trunk/docutils/docutils/utils/__init__.py
trunk/docutils/docutils/utils/math/__init__.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/smartquotes.py
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/docutils/writers/odf_odt/__init__.py
trunk/docutils/docutils/writers/s5_html/__init__.py
trunk/docutils/test/test_parsers/test_rst/test_tables.py
trunk/docutils/tools/dev/unicode2rstsubs.py
trunk/docutils/tools/quicktest.py
Modified: trunk/docutils/docutils/io.py
===================================================================
--- trunk/docutils/docutils/io.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/docutils/io.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -145,7 +145,7 @@
error = err
raise UnicodeError(
'Unable to decode input data. Tried the following encodings: '
- '%s.\n(%s)' % (', '.join([repr(enc) for enc in encodings]),
+ '%s.\n(%s)' % (', '.join(repr(enc) for enc in encodings),
error_string(error)))
coding_slug = re.compile(br"coding[:=]\s*([-\w.]+)")
Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/docutils/nodes.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -553,7 +553,7 @@
element = domroot.createElement(self.tagname)
for attribute, value in self.attlist():
if isinstance(value, list):
- value = ' '.join([serial_escape('%s' % (v,)) for v in value])
+ value = ' '.join(serial_escape('%s' % (v,)) for v in value)
element.setAttribute(attribute, '%s' % value)
for child in self.children:
element.appendChild(child._dom_node(domroot))
@@ -581,9 +581,9 @@
def __str__(self):
if self.children:
- return u'%s%s%s' % (self.starttag(),
- ''.join([str(c) for c in self.children]),
- self.endtag())
+ return '%s%s%s' % (self.starttag(),
+ ''.join(str(c) for c in self.children),
+ self.endtag())
else:
return self.emptytag()
@@ -1867,8 +1867,8 @@
else:
internals.append('%7s%s: %r' % ('', key, value))
return (Element.pformat(self, indent, level)
- + ''.join([(' %s%s\n' % (indent * level, line))
- for line in internals]))
+ + ''.join((' %s%s\n' % (indent * level, line))
+ for line in internals))
def copy(self):
obj = self.__class__(self.transform, self.details, self.rawsource,
Modified: trunk/docutils/docutils/parsers/rst/directives/__init__.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/__init__.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/docutils/parsers/rst/directives/__init__.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -184,7 +184,7 @@
if argument is None:
raise ValueError('argument required but none supplied')
else:
- path = ''.join([s.strip() for s in argument.splitlines()])
+ path = ''.join(s.strip() for s in argument.splitlines())
return path
def uri(argument):
@@ -239,7 +239,7 @@
except (AttributeError, ValueError):
raise ValueError(
'not a positive measure of one of the following units:\n%s'
- % ' '.join(['"%s"' % i for i in units]))
+ % ' '.join('"%s"' % i for i in units))
return match.group(1) + match.group(2)
def length_or_unitless(argument):
@@ -404,7 +404,7 @@
% (argument, format_values(values)))
def format_values(values):
- return '%s, or "%s"' % (', '.join(['"%s"' % s for s in values[:-1]]),
+ return '%s, or "%s"' % (', '.join('"%s"' % s for s in values[:-1]),
values[-1])
def value_or(values, other):
Modified: trunk/docutils/docutils/parsers/rst/states.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/states.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/docutils/parsers/rst/states.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -1980,7 +1980,7 @@
- 'malformed' and a system_message node
"""
if block and block[-1].strip()[-1:] == '_': # possible indirect target
- reference = ' '.join([line.strip() for line in block])
+ reference = ' '.join(line.strip() for line in block)
refname = self.is_reference(reference)
if refname:
return 'refname', refname
Modified: trunk/docutils/docutils/utils/__init__.py
===================================================================
--- trunk/docutils/docutils/utils/__init__.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/docutils/utils/__init__.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -597,7 +597,7 @@
return list(itertools.chain(*strings))
def strip_combining_chars(text):
- return u''.join([c for c in text if not unicodedata.combining(c)])
+ return ''.join(c for c in text if not unicodedata.combining(c))
def find_combining_chars(text):
"""Return indices of all combining chars in Unicode string `text`.
@@ -639,8 +639,8 @@
Correct ``len(text)`` for wide East Asian and combining Unicode chars.
"""
- width = sum([east_asian_widths[unicodedata.east_asian_width(c)]
- for c in text])
+ width = sum(east_asian_widths[unicodedata.east_asian_width(c)]
+ for c in text)
# correction for combining chars:
width -= len(find_combining_chars(text))
return width
Modified: trunk/docutils/docutils/utils/math/__init__.py
===================================================================
--- trunk/docutils/docutils/utils/math/__init__.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/docutils/utils/math/__init__.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -28,8 +28,8 @@
def toplevel_code(code):
"""Return string (LaTeX math) `code` with environments stripped out."""
chunks = code.split(r'\begin{')
- return r'\begin{'.join([chunk.split(r'\end{')[-1]
- for chunk in chunks])
+ return r'\begin{'.join(chunk.split(r'\end{')[-1]
+ for chunk in chunks)
def pick_math_environment(code, numbered=False):
"""Return the right math environment to display `code`.
Modified: trunk/docutils/docutils/utils/math/latex2mathml.py
===================================================================
--- trunk/docutils/docutils/utils/math/latex2mathml.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/docutils/utils/math/latex2mathml.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -412,10 +412,10 @@
+ ['</%s>' % self.__class__.__name__])
def xml_starttag(self):
- attrs = ['%s="%s"' % (k, str(v).replace('True', 'true').replace('False', 'false'))
+ attrs = ('%s="%s"' % (k, str(v).replace('True', 'true').replace('False', 'false'))
for k, v in self.attributes.items()
- if v is not None]
- return '<%s>' % ' '.join([self.__class__.__name__] + attrs)
+ if v is not None)
+ return '<%s>' % ' '.join((self.__class__.__name__, *attrs))
def _xml_body(self, level=0):
xml = []
Modified: trunk/docutils/docutils/utils/math/math2html.py
===================================================================
--- trunk/docutils/docutils/utils/math/math2html.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/docutils/utils/math/math2html.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -1653,7 +1653,7 @@
"Compute the size of the bit as the max of the sizes of all contents."
if len(self.contents) == 0:
return 1
- self.size = max([element.size for element in self.contents])
+ self.size = max(element.size for element in self.contents)
return self.size
def clone(self):
@@ -2848,7 +2848,7 @@
def findmax(self, contents, leftindex, rightindex):
"Find the max size of the contents between the two given indices."
sliced = contents[leftindex:rightindex]
- return max([element.size for element in sliced])
+ return max(element.size for element in sliced)
def resize(self, command, size):
"Resize a bracket command to the given size."
Modified: trunk/docutils/docutils/utils/math/tex2mathml_extern.py
===================================================================
--- trunk/docutils/docutils/utils/math/tex2mathml_extern.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/docutils/utils/math/tex2mathml_extern.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -90,8 +90,8 @@
result = p.stdout.read()
err = p.stderr.read().decode('utf8')
if err.find('**** Unknown') >= 0:
- msg = '\n'.join([line for line in err.splitlines()
- if line.startswith('****')])
+ msg = '\n'.join(line for line in err.splitlines()
+ if line.startswith('****'))
raise SyntaxError('\nMessage from external converter TtM:\n'+ msg)
if reporter and err.find('**** Error') >= 0 or not result:
reporter.error(err)
Modified: trunk/docutils/docutils/utils/smartquotes.py
===================================================================
--- trunk/docutils/docutils/utils/smartquotes.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/docutils/utils/smartquotes.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -502,8 +502,8 @@
def smartyPants(text, attr=default_smartypants_attr, language='en'):
"""Main function for "traditional" use."""
- return "".join([t for t in educate_tokens(tokenize(text),
- attr, language)])
+ return "".join(t for t in educate_tokens(tokenize(text),
+ attr, language))
def educate_tokens(text_tokens, attr=default_smartypants_attr, language='en'):
@@ -926,7 +926,7 @@
# find all combinations of subtags
for n in range(len(_subtags), 0, -1):
for tags in itertools.combinations(_subtags, n):
- _tag = '-'.join((_basetag,)+tags)
+ _tag = '-'.join((_basetag, *tags))
if _tag in smartchars.quotes:
defaultlanguage = _tag
break
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -428,7 +428,7 @@
self.setup = [r'\usepackage[%s]{babel}' % ','.join(languages)]
# Deactivate "active characters"
shorthands = []
- for c in ''.join([self.active_chars.get(l, '') for l in languages]):
+ for c in ''.join(self.active_chars.get(l, '') for l in languages):
if c not in shorthands:
shorthands.append(c)
if shorthands:
@@ -995,9 +995,8 @@
def get_multicolumn_width(self, start, len_):
"""Return sum of columnwidths for multicell."""
try:
- multicol_width = sum([width
- for width in ([self._colwidths[start + co]
- for co in range(len_)])])
+ multicol_width = sum(self._colwidths[start + co]
+ for co in range(len_))
if self.legacy_column_widths:
return 'p{%.2f\\DUtablewidth}' % multicol_width
return 'p{\\DUcolumnwidth{%.3f}}' % multicol_width
@@ -1038,7 +1037,7 @@
n_c = len(self._col_specs)
a.append('\\endhead\n')
# footer on all but last page (if it fits):
- twidth = sum([node['colwidth']+2 for node in self._col_specs])
+ twidth = sum(node['colwidth']+2 for node in self._col_specs)
if twidth > 30 or (twidth > 12 and not self.colwidths_auto):
a.append(r'\multicolumn{%d}{%s}'
% (n_c, self.get_multicolumn_width(0, n_c))
@@ -1566,8 +1565,8 @@
"""Append hypertargets for all ids of `node`"""
# hypertarget places the anchor at the target's baseline,
# so we raise it explicitly
- self.out.append('%\n'.join(['\\raisebox{1em}{\\hypertarget{%s}{}}' %
- id for id in node['ids']]))
+ self.out.append('%\n'.join('\\raisebox{1em}{\\hypertarget{%s}{}}' %
+ id for id in node['ids']))
def ids_to_labels(self, node, set_anchor=True, protect=False,
newline=False):
@@ -2157,9 +2156,9 @@
if self.compound_enumerators:
if (self.section_prefix_for_enumerators and self.section_level
and not self._enumeration_counters):
- prefix = '.'.join([str(n) for n in
- self._section_number[:self.section_level]]
- ) + self.section_enumerator_separator
+ prefix = '.'.join(str(n) for n in
+ self._section_number[:self.section_level]
+ ) + self.section_enumerator_separator
if self._enumeration_counters:
prefix += self._enumeration_counters[-1]
prefix += node.get('prefix', '')
Modified: trunk/docutils/docutils/writers/odf_odt/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/odf_odt/__init__.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/docutils/writers/odf_odt/__init__.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -2873,9 +2873,9 @@
formatlist = formats.split()
if 'odt' in formatlist:
rawstr = node.astext()
- attrstr = ' '.join([
+ attrstr = ' '.join(
'%s="%s"' % (k, v, )
- for k, v in list(CONTENT_NAMESPACE_ATTRIB.items())])
+ for k, v in list(CONTENT_NAMESPACE_ATTRIB.items()))
contentstr = '<stuff %s>%s</stuff>' % (attrstr, rawstr, )
contentstr = contentstr.encode("utf-8")
content = etree.fromstring(contentstr)
Modified: trunk/docutils/docutils/writers/s5_html/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/s5_html/__init__.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/docutils/writers/s5_html/__init__.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -242,7 +242,7 @@
required.remove(f)
raise docutils.ApplicationError(
'Theme files not found: %s'
- % ', '.join(['%r' % f for f in required]))
+ % ', '.join('%r' % f for f in required))
files_to_skip_pattern = re.compile(r'~$|\.bak$|#$|\.cvsignore$')
Modified: trunk/docutils/test/test_parsers/test_rst/test_tables.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_tables.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/test/test_parsers/test_rst/test_tables.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -571,8 +571,8 @@
| (The first cell of this table may expand |
| to accommodate long filesystem paths.) |
+------------------------------------------------------------------------------+
-""") % ('\n'.join(['| %-70s |' % include2[part * 70 : (part + 1) * 70]
- for part in range(len(include2) // 70 + 1)])),
+""") % ('\n'.join('| %-70s |' % include2[part * 70 : (part + 1) * 70]
+ for part in range(len(include2) // 70 + 1))),
"""\
<document source="test data">
<table>
@@ -606,8 +606,8 @@
Something afterwards.
And more.
-""") % ('\n'.join(['| %-70s |' % include2[part * 70 : (part + 1) * 70]
- for part in range(len(include2) // 70 + 1)])),
+""") % ('\n'.join('| %-70s |' % include2[part * 70 : (part + 1) * 70]
+ for part in range(len(include2) // 70 + 1))),
"""\
<document source="test data">
<paragraph>
@@ -1274,8 +1274,8 @@
Note The first row of this table may expand
to accommodate long filesystem paths.
========= =====================================================================
-""" % ('\n'.join([' %-65s' % include2[part * 65 : (part + 1) * 65]
- for part in range(len(include2) // 65 + 1)])),
+""" % ('\n'.join(' %-65s' % include2[part * 65 : (part + 1) * 65]
+ for part in range(len(include2) // 65 + 1))),
"""\
<document source="test data">
<table>
Modified: trunk/docutils/tools/dev/unicode2rstsubs.py
===================================================================
--- trunk/docutils/tools/dev/unicode2rstsubs.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/tools/dev/unicode2rstsubs.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -170,7 +170,7 @@
print('writing file "%s"' % outname)
outfile.write(self.header + '\n')
set = self.sets[set_name]
- entities = sorted([(e.lower(), e) for e in set.keys()])
+ entities = sorted((e.lower(), e) for e in set.keys())
longest = 0
for _, entity_name in entities:
longest = max(longest, len(entity_name))
@@ -188,7 +188,7 @@
for code in charid[1:].split('-'):
if int(code, 16) > 0xFFFF:
return 1 # wide-Unicode character
- codes = ' '.join(['U+%s' % code for code in charid[1:].split('-')])
+ codes = ' '.join('U+%s' % code for code in charid[1:].split('-'))
outfile.write('.. %-*s unicode:: %s .. %s\n'
% (longest + 2, '|' + entity_name + '|',
codes, self.descriptions[charid]))
Modified: trunk/docutils/tools/quicktest.py
===================================================================
--- trunk/docutils/tools/quicktest.py 2022-01-26 19:02:28 UTC (rev 8969)
+++ trunk/docutils/tools/quicktest.py 2022-01-26 19:02:44 UTC (rev 8970)
@@ -128,8 +128,8 @@
def posixGetArgs(argv):
outputFormat = 'pretty'
# convert fancy_getopt style option list to getopt.getopt() arguments
- shortopts = ''.join([option[1] + ':' * (option[0][-1:] == '=')
- for option in options if option[1]])
+ shortopts = ''.join(option[1] + ':' * (option[0][-1:] == '=')
+ for option in options if option[1])
longopts = [option[0] for option in options if option[0]]
try:
opts, args = getopt.getopt(argv, shortopts, longopts)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-26 19:03:23
|
Revision: 8973
http://sourceforge.net/p/docutils/code/8973
Author: milde
Date: 2022-01-26 19:03:19 +0000 (Wed, 26 Jan 2022)
Log Message:
-----------
Small fixes and clean-ups by Adam Turner.
Remove duplicate definitions in language modules.
Import locale_encoding from `docutils.io`
Use decorator for staticmethod
Use True/False over 1/0.
`collections.OrderedDict` no longer required,
all dictionaries are ordered from Python 3.7
Remove obsolete `__cmp__` method
cf. https://docs.python.org/3/whatsnew/3.0.html#ordering-comparisons
Use str instead of type('').
Zero-argument ``super()``
Simplify test support module as
"u" prefix isn't used by repr in Python 3.
Modified Paths:
--------------
trunk/docutils/docutils/__init__.py
trunk/docutils/docutils/parsers/rst/directives/tables.py
trunk/docutils/docutils/parsers/rst/languages/ar.py
trunk/docutils/docutils/parsers/rst/languages/es.py
trunk/docutils/docutils/parsers/rst/states.py
trunk/docutils/docutils/statemachine.py
trunk/docutils/docutils/transforms/writer_aux.py
trunk/docutils/docutils/utils/math/latex2mathml.py
trunk/docutils/docutils/writers/html5_polyglot/__init__.py
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/test/DocutilsTestSupport.py
trunk/docutils/test/test_functional.py
trunk/docutils/test/test_io.py
trunk/docutils/test/test_language.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_date.py
trunk/docutils/test/test_settings.py
trunk/docutils/test/test_utils.py
trunk/docutils/test/test_viewlist.py
trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
trunk/docutils/test/test_writers/test_odt.py
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/docutils/__init__.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -90,8 +90,8 @@
if serial != 0:
raise ValueError('"serial" must be 0 for final releases')
- return super(VersionInfo, cls).__new__(cls, major, minor, micro,
- releaselevel, serial, release)
+ return super().__new__(cls, major, minor, micro,
+ releaselevel, serial, release)
def __lt__(self, other):
if isinstance(other, tuple):
Modified: trunk/docutils/docutils/parsers/rst/directives/tables.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/tables.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/docutils/parsers/rst/directives/tables.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -358,6 +358,7 @@
raise SystemMessagePropagation(error)
return csv_data, source
+ @staticmethod
def decode_from_csv(s):
warnings.warn('CSVTable.decode_from_csv()'
' is not required with Python 3'
@@ -364,6 +365,8 @@
' and will be removed in Docutils 0.21 or later.',
DeprecationWarning, stacklevel=2)
return s
+
+ @staticmethod
def encode_for_csv(s):
warnings.warn('CSVTable.encode_from_csv()'
' is not required with Python 3'
@@ -370,8 +373,6 @@
' and will be removed in Docutils 0.21 or later.',
DeprecationWarning, stacklevel=2)
return s
- decode_from_csv = staticmethod(decode_from_csv)
- encode_for_csv = staticmethod(encode_for_csv)
def parse_csv_data_into_rows(self, csv_data, dialect, source):
csv_reader = csv.reader([line + '\n' for line in csv_data],
Modified: trunk/docutils/docutils/parsers/rst/languages/ar.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/ar.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/docutils/parsers/rst/languages/ar.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -14,14 +14,11 @@
__docformat__ = 'reStructuredText'
-
directives = {
# language-dependent: fixed
u'تنبيه': u'attention',
u'احتیاط': u'caution',
u'كود': u'code',
- u'كود': u'code',
- u'كود': u'code',
u'خطر': u'danger',
u'خطأ': u'error',
u'تلميح': u'hint',
Modified: trunk/docutils/docutils/parsers/rst/languages/es.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/es.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/docutils/parsers/rst/languages/es.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -14,7 +14,6 @@
__docformat__ = 'reStructuredText'
-
directives = {
u'atenci\u00f3n': 'attention',
u'atencion': 'attention',
@@ -85,7 +84,6 @@
u'abreviatura': 'abbreviation',
u'ab': 'abbreviation',
u'acronimo': 'acronym',
- u'acronimo': 'acronym',
u'ac': 'acronym',
u'code (translation required)': 'code',
u'indice': 'index',
Modified: trunk/docutils/docutils/parsers/rst/states.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/states.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/docutils/parsers/rst/states.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -986,7 +986,7 @@
return (string[:matchstart], [referencenode], string[matchend:], [])
def anonymous_reference(self, match, lineno):
- return self.reference(match, lineno, anonymous=1)
+ return self.reference(match, lineno, anonymous=True)
def standalone_uri(self, match, lineno):
if (not match.group('scheme')
Modified: trunk/docutils/docutils/statemachine.py
===================================================================
--- trunk/docutils/docutils/statemachine.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/docutils/statemachine.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -1,4 +1,4 @@
- # $Id$
+# $Id$
# Author: David Goodger <go...@py...>
# Copyright: This module has been placed in the public domain.
@@ -720,11 +720,10 @@
name string, or a 1- or 2-tuple (transition name, optional next state
name).
"""
- stringtype = type('')
names = []
transitions = {}
for namestate in name_list:
- if isinstance(namestate, stringtype):
+ if isinstance(namestate, str):
transitions[namestate] = self.make_transition(namestate)
names.append(namestate)
else:
@@ -1114,12 +1113,6 @@
def __gt__(self, other): return self.data > self.__cast(other)
def __ge__(self, other): return self.data >= self.__cast(other)
- def __cmp__(self, other):
- # from https://docs.python.org/3.0/whatsnew/3.0.html
- mine = self.data
- yours = self.__cast(other)
- return (mine > yours) - (yours < mine)
-
def __cast(self, other):
if isinstance(other, ViewList):
return other.data
Modified: trunk/docutils/docutils/transforms/writer_aux.py
===================================================================
--- trunk/docutils/docutils/transforms/writer_aux.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/docutils/transforms/writer_aux.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -46,7 +46,7 @@
warnings.warn('docutils.transforms.writer_aux.Compound is deprecated'
' and will be removed in Docutils 0.21 or later.',
DeprecationWarning, stacklevel=2)
- super(Compound, self).__init__(document, startnode)
+ super().__init__(document, startnode)
def apply(self):
for compound in self.document.findall(nodes.compound):
Modified: trunk/docutils/docutils/utils/math/latex2mathml.py
===================================================================
--- trunk/docutils/docutils/utils/math/latex2mathml.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/docutils/utils/math/latex2mathml.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -24,7 +24,6 @@
#
# >>> from latex2mathml import *
-import collections
import copy
import re
import sys
@@ -340,7 +339,7 @@
self.children = []
self.extend(children)
- self.attributes = collections.OrderedDict()
+ self.attributes = {}
# sort attributes for predictable functional tests
# as self.attributes.update(attributes) does not keep order in Python < 3.6
for key in sorted(attributes.keys()):
@@ -472,7 +471,7 @@
self.children[0].parent = parent
except (AttributeError, ValueError):
return self.children[0]
- return super(mrow, self).close()
+ return super().close()
# >>> mrow(displaystyle=False)
# mrow(displaystyle=False)
@@ -509,7 +508,7 @@
def __init__(self, data, **attributes):
self.data = data
- super(MathToken, self).__init__(**attributes)
+ super().__init__(**attributes)
def _xml_body(self, level=0):
return [str(self.data).translate(self.xml_entities)]
@@ -538,7 +537,7 @@
math.__init__(self, *children, **kwargs)
def append(self, child):
- current_node = super(MathSchema, self).append(child)
+ current_node = super().append(child)
# normalize order if full
if self.switch and self.full():
self.children[-1], self.children[-2] = self.children[-2], self.children[-1]
Modified: trunk/docutils/docutils/writers/html5_polyglot/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -273,7 +273,7 @@
uri = node['uri']
mimetype = mimetypes.guess_type(uri)[0]
if mimetype not in self.videotypes:
- return super(HTMLTranslator, self).visit_image(node)
+ return super().visit_image(node)
# image size
if 'width' in node:
atts['width'] = node['width'].replace('px', '')
@@ -438,8 +438,7 @@
# append self-link
def section_title_tags(self, node):
- start_tag, close_tag = super(HTMLTranslator,
- self).section_title_tags(node)
+ start_tag, close_tag = super().section_title_tags(node)
ids = node.parent['ids']
if (ids and getattr(self.settings, 'section_self_link', None)
and not isinstance(node.parent, nodes.document)):
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -1154,7 +1154,7 @@
alltt = False # inside `alltt` environment
def __init__(self, document, babel_class=Babel):
- nodes.NodeVisitor.__init__(self, document) # TODO: use super()
+ super().__init__(document)
# Reporter
# ~~~~~~~~
self.warn = self.document.reporter.warning
Modified: trunk/docutils/test/DocutilsTestSupport.py
===================================================================
--- trunk/docutils/test/DocutilsTestSupport.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/test/DocutilsTestSupport.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -210,8 +210,8 @@
print('\n%s\ninput:' % (self,), file=sys.stderr)
print(input, file=sys.stderr)
try:
- comparison = ''.join(self.compare(expected.splitlines(1),
- output.splitlines(1)))
+ comparison = ''.join(self.compare(expected.splitlines(True),
+ output.splitlines(True)))
print('-: expected\n+: output', file=sys.stderr)
print(comparison, file=sys.stderr)
except AttributeError: # expected or output not a string
@@ -841,15 +841,11 @@
return_tuple = []
for i in args:
r = repr(i)
- if ( (isinstance(i, bytes) or isinstance(i, str))
- and '\n' in i):
+ if isinstance(i, (str, bytes)) and '\n' in i:
stripped = ''
- if isinstance(i, str) and r.startswith('u'):
+ if isinstance(i, bytes) and r.startswith('b'):
stripped = r[0]
r = r[1:]
- elif isinstance(i, bytes) and r.startswith('b'):
- stripped = r[0]
- r = r[1:]
# quote_char = "'" or '"'
quote_char = r[0]
assert quote_char in ("'", '"'), quote_char
Modified: trunk/docutils/test/test_functional.py
===================================================================
--- trunk/docutils/test/test_functional.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/test/test_functional.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -34,7 +34,7 @@
def __init__(self):
"""Process all config files in functional/tests/."""
- DocutilsTestSupport.CustomTestSuite.__init__(self)
+ super().__init__()
os.chdir(DocutilsTestSupport.testroot)
self.clear_output_directory()
self.added = 0
Modified: trunk/docutils/test/test_io.py
===================================================================
--- trunk/docutils/test/test_io.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/test/test_io.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -22,7 +22,7 @@
def write(self, data):
if isinstance(data, str):
data.encode('ascii', 'strict')
- super(BBuf, self).write(data)
+ super().write(data)
# Stub: Buffer expecting unicode string:
@@ -31,7 +31,7 @@
# emulate Python 3 handling of stdout, stderr
if isinstance(data, bytes):
raise TypeError('must be unicode, not bytes')
- super(UBuf, self).write(data)
+ super().write(data)
class mock_stdout(UBuf):
@@ -39,7 +39,7 @@
def __init__(self):
self.buffer = BBuf()
- UBuf.__init__(self)
+ super().__init__()
class HelperTests(unittest.TestCase):
Modified: trunk/docutils/test/test_language.py
===================================================================
--- trunk/docutils/test/test_language.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/test/test_language.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -32,7 +32,7 @@
language_module_pattern = re.compile(r'^([a-z]{2,3}(_[a-z]{2,8})*)\.py$')
def __init__(self, languages=None):
- DocutilsTestSupport.CustomTestSuite.__init__(self)
+ super().__init__()
if languages:
self.languages = languages
else:
@@ -170,16 +170,11 @@
self.fail(text)
def test_roles(self):
- try:
- module = docutils.parsers.rst.languages.get_language(
- self.language)
- if not module:
- raise ImportError
- module.roles
- except ImportError:
+ module = docutils.parsers.rst.languages.get_language(self.language)
+ if not module:
self.fail('No docutils.parsers.rst.languages.%s module.'
% self.language)
- except AttributeError:
+ if not hasattr(module, "roles"):
self.fail('No "roles" mapping in docutils.parsers.rst.languages.'
'%s module.' % self.language)
failures = []
Modified: trunk/docutils/test/test_parsers/test_rst/test_directives/test_date.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_directives/test_date.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_date.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -13,7 +13,7 @@
from test_parsers import DocutilsTestSupport
import time
-from docutils.utils.error_reporting import locale_encoding
+from docutils.io import locale_encoding
def suite():
s = DocutilsTestSupport.ParserTestSuite()
Modified: trunk/docutils/test/test_settings.py
===================================================================
--- trunk/docutils/test/test_settings.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/test/test_settings.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -130,8 +130,8 @@
except AssertionError:
print('\n%s\n' % (self,), file=sys.stderr)
print('-: expected\n+: result', file=sys.stderr)
- print(''.join(self.compare(expected.splitlines(1),
- result.splitlines(1))), file=sys.stderr)
+ print(''.join(self.compare(expected.splitlines(True),
+ result.splitlines(True))), file=sys.stderr)
raise
def test_nofiles(self):
Modified: trunk/docutils/test/test_utils.py
===================================================================
--- trunk/docutils/test/test_utils.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/test/test_utils.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -1,5 +1,4 @@
#! /usr/bin/env python3
-# -*- coding: utf-8 -*-
# $Id$
# Author: David Goodger <go...@py...>
Modified: trunk/docutils/test/test_viewlist.py
===================================================================
--- trunk/docutils/test/test_viewlist.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/test/test_viewlist.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -192,7 +192,7 @@
def setUp(self):
- self.a_list = self.text.splitlines(1)
+ self.a_list = self.text.splitlines(True)
self.a = statemachine.StringList(self.a_list, 'a')
def test_trim_left(self):
Modified: trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
===================================================================
--- trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -599,7 +599,6 @@
</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
-])
["""\
.. figure:: dummy.png
@@ -620,6 +619,7 @@
</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
+])
totest['lazy loading'] = ({'image_loading': 'lazy',
Modified: trunk/docutils/test/test_writers/test_odt.py
===================================================================
--- trunk/docutils/test/test_writers/test_odt.py 2022-01-26 19:03:02 UTC (rev 8972)
+++ trunk/docutils/test/test_writers/test_odt.py 2022-01-26 19:03:19 UTC (rev 8973)
@@ -118,8 +118,7 @@
sep, first, sep, second, sep, )
#msg2 = '%s\n%s' % (msg1, msg, )
msg2 = '%s' % (msg, )
- DocutilsTestSupport.StandardTestCase.assertEqual(self,
- first, second, msg2)
+ super().assertEqual(first, second, msg2)
#
# Unit test methods
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-26 19:04:05
|
Revision: 8976
http://sourceforge.net/p/docutils/code/8976
Author: milde
Date: 2022-01-26 19:04:01 +0000 (Wed, 26 Jan 2022)
Log Message:
-----------
Remove redundant parentheses
Patch by Adam Turner.
Modified Paths:
--------------
trunk/docutils/docutils/frontend.py
trunk/docutils/docutils/io.py
trunk/docutils/docutils/parsers/recommonmark_wrapper.py
trunk/docutils/docutils/parsers/rst/directives/misc.py
trunk/docutils/docutils/parsers/rst/states.py
trunk/docutils/docutils/parsers/rst/tableparser.py
trunk/docutils/docutils/statemachine.py
trunk/docutils/docutils/transforms/references.py
trunk/docutils/docutils/transforms/universal.py
trunk/docutils/docutils/utils/code_analyzer.py
trunk/docutils/docutils/utils/error_reporting.py
trunk/docutils/docutils/utils/math/math2html.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/odf_odt/__init__.py
trunk/docutils/test/test_error_reporting.py
trunk/docutils/test/test_io.py
trunk/docutils/test/test_language.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_html5_polyglot_parts.py
trunk/docutils/tools/test/test_buildhtml.py
Modified: trunk/docutils/docutils/frontend.py
===================================================================
--- trunk/docutils/docutils/frontend.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/frontend.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -311,7 +311,7 @@
other_dict = other_dict.__dict__
other_dict = other_dict.copy()
for setting in option_parser.lists.keys():
- if (hasattr(self, setting) and setting in other_dict):
+ if hasattr(self, setting) and setting in other_dict:
value = getattr(self, setting)
if value:
value += other_dict[setting]
Modified: trunk/docutils/docutils/io.py
===================================================================
--- trunk/docutils/docutils/io.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/io.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -337,7 +337,7 @@
raise InputError(error.errno, error.strerror, source_path)
else:
self.source = sys.stdin
- elif (check_encoding(self.source, self.encoding) is False):
+ elif check_encoding(self.source, self.encoding) is False:
# TODO: re-open, warn or raise error?
raise UnicodeError('Encoding clash: encoding given is "%s" '
'but source is opened with encoding "%s".' %
Modified: trunk/docutils/docutils/parsers/recommonmark_wrapper.py
===================================================================
--- trunk/docutils/docutils/parsers/recommonmark_wrapper.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/parsers/recommonmark_wrapper.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -40,7 +40,7 @@
# already cached in `sys.modules` if recommonmark >= 0.5.0
except ImportError:
# stub to prevent errors with recommonmark < 0.5.0
- class addnodes():
+ class addnodes:
pending_xref = nodes.pending
Modified: trunk/docutils/docutils/parsers/rst/directives/misc.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/misc.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/parsers/rst/directives/misc.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -318,7 +318,7 @@
return [
self.state_machine.reporter.error(
'Error in "%s" directive: may contain a single paragraph '
- 'only.' % (self.name), line=self.lineno) ]
+ 'only.' % self.name, line=self.lineno)]
if node:
return messages + node.children
return messages
Modified: trunk/docutils/docutils/parsers/rst/states.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/states.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/parsers/rst/states.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -713,7 +713,7 @@
matchstart = match.start('start')
matchend = match.end('start')
if self.quoted_start(match):
- return (string[:matchend], [], string[matchend:], [], '')
+ return string[:matchend], [], string[matchend:], [], ''
endmatch = end_pattern.search(string[matchend:])
if endmatch and endmatch.start(1): # 1 or more chars
text = endmatch.string[:endmatch.start(1)]
@@ -760,7 +760,7 @@
role = role[1:-1]
position = 'prefix'
elif self.quoted_start(match):
- return (string[:matchend], [], string[matchend:], [])
+ return string[:matchend], [], string[matchend:], []
endmatch = end_pattern.search(string[matchend:])
if endmatch and endmatch.start(1): # 1 or more chars
textend = matchend + endmatch.end()
@@ -966,7 +966,7 @@
self.document.note_footnote_ref(refnode)
if utils.get_trim_footnote_ref_space(self.document.settings):
before = before.rstrip()
- return (before, [refnode], remaining, [])
+ return before, [refnode], remaining, []
def reference(self, match, lineno, anonymous=False):
referencename = match.group('refname')
@@ -983,7 +983,7 @@
string = match.string
matchstart = match.start('whole')
matchend = match.end('whole')
- return (string[:matchstart], [referencenode], string[matchend:], [])
+ return string[:matchstart], [referencenode], string[matchend:], []
def anonymous_reference(self, match, lineno):
return self.reference(match, lineno, anonymous=True)
@@ -1231,7 +1231,7 @@
else:
blank = i
else:
- return (indented, None, None, None, None)
+ return indented, None, None, None, None
def check_attribution(self, indented, attribution_start):
"""
@@ -2206,7 +2206,7 @@
arguments = []
if content and not has_content:
raise MarkupError('no content permitted')
- return (arguments, options, content, content_offset)
+ return arguments, options, content, content_offset
def parse_directive_options(self, option_presets, option_spec, arg_block):
options = option_presets.copy()
@@ -2266,11 +2266,11 @@
try:
options = utils.extract_extension_options(node, option_spec)
except KeyError as detail:
- return 0, ('unknown option: "%s"' % detail.args[0])
+ return 0, 'unknown option: "%s"' % detail.args[0]
except (ValueError, TypeError) as detail:
return 0, ('invalid option value: %s' % ' '.join(detail.args))
except utils.ExtensionOptionError as detail:
- return 0, ('invalid option data: %s' % ' '.join(detail.args))
+ return 0, 'invalid option data: %s' % ' '.join(detail.args)
if blank_finish:
return 1, options
else:
Modified: trunk/docutils/docutils/parsers/rst/tableparser.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/tableparser.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/parsers/rst/tableparser.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -320,7 +320,7 @@
else:
headrows = []
bodyrows = rows
- return (colspecs, headrows, bodyrows)
+ return colspecs, headrows, bodyrows
class SimpleTableParser(TableParser):
Modified: trunk/docutils/docutils/statemachine.py
===================================================================
--- trunk/docutils/docutils/statemachine.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/statemachine.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -371,16 +371,16 @@
try:
src, srcoffset = self.input_lines.info(offset)
srcline = srcoffset + 1
- except (TypeError):
+ except TypeError:
# line is None if index is "Just past the end"
src, srcline = self.get_source_and_line(offset + self.input_offset)
return src, srcline + 1
- except (IndexError): # `offset` is off the list
+ except IndexError: # `offset` is off the list
src, srcline = None, None
# raise AssertionError('cannot find line %d in %s lines' %
# (offset, len(self.input_lines)))
# # list(self.input_lines.lines())))
- return (src, srcline)
+ return src, srcline
def insert_input(self, input_lines, source):
self.input_lines.insert(self.line_offset + 1, '',
@@ -710,7 +710,7 @@
except AttributeError:
raise TransitionMethodNotFound(
'%s.%s' % (self.__class__.__name__, name))
- return (pattern, method, next_state)
+ return pattern, method, next_state
def make_transitions(self, name_list):
"""
@@ -1307,7 +1307,7 @@
def xitems(self):
"""Return iterator yielding (source, offset, value) tuples."""
for (value, (source, offset)) in zip(self.data, self.items):
- yield (source, offset, value)
+ yield source, offset, value
def pprint(self):
"""Print the list in `grep` format (`source:offset:value` lines)"""
Modified: trunk/docutils/docutils/transforms/references.py
===================================================================
--- trunk/docutils/docutils/transforms/references.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/transforms/references.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -688,7 +688,7 @@
if len(subdef.astext()) > line_length_limit:
msg = self.document.reporter.error(
'Substitution definition "%s" exceeds the'
- ' line-length-limit.' % (key))
+ ' line-length-limit.' % key)
if msg:
msgid = self.document.set_id(msg)
prb = nodes.problematic(
Modified: trunk/docutils/docutils/transforms/universal.py
===================================================================
--- trunk/docutils/docutils/transforms/universal.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/transforms/universal.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -259,12 +259,12 @@
for node in txtnodes:
if (isinstance(node.parent, self.literal_nodes)
or isinstance(node.parent.parent, self.literal_nodes)):
- yield ('literal', str(node))
+ yield 'literal', str(node)
else:
# SmartQuotes uses backslash escapes instead of null-escapes
# Insert backslashes before escaped "active" characters.
txt = re.sub('(?<=\x00)([-\\\'".`])', r'\\\1', str(node))
- yield ('plain', txt)
+ yield 'plain', txt
def apply(self):
smart_quotes = self.document.settings.setdefault('smart_quotes',
Modified: trunk/docutils/docutils/utils/code_analyzer.py
===================================================================
--- trunk/docutils/docutils/utils/code_analyzer.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/utils/code_analyzer.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -82,18 +82,18 @@
if ttype is lasttype:
lastval += value
else:
- yield(lasttype, lastval)
+ yield lasttype, lastval
(lasttype, lastval) = (ttype, value)
if lastval.endswith('\n'):
lastval = lastval[:-1]
if lastval:
- yield(lasttype, lastval)
+ yield lasttype, lastval
def __iter__(self):
"""Parse self.code and yield "classified" tokens.
"""
if self.lexer is None:
- yield ([], self.code)
+ yield [], self.code
return
tokens = pygments.lex(self.code, self.lexer)
for tokentype, value in self.merge(tokens):
@@ -102,7 +102,7 @@
else: # short CSS class args
classes = [_get_ttype_class(tokentype)]
classes = [cls for cls in classes if cls not in unstyled_tokens]
- yield (classes, value)
+ yield classes, value
class NumberLines(object):
@@ -126,11 +126,11 @@
def __iter__(self):
lineno = self.startline
- yield (['ln'], self.fmt_str % lineno)
+ yield ['ln'], self.fmt_str % lineno
for ttype, value in self.tokens:
lines = value.split('\n')
for line in lines[:-1]:
- yield (ttype, line + '\n')
+ yield ttype, line + '\n'
lineno += 1
- yield (['ln'], self.fmt_str % lineno)
- yield (ttype, lines[-1])
+ yield ['ln'], self.fmt_str % lineno
+ yield ttype, lines[-1]
Modified: trunk/docutils/docutils/utils/error_reporting.py
===================================================================
--- trunk/docutils/docutils/utils/error_reporting.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/utils/error_reporting.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -183,7 +183,7 @@
"""
if stream is None:
stream = sys.stderr
- elif not(stream):
+ elif not stream:
stream = False
# if `stream` is a file name, open it
elif isinstance(stream, str):
Modified: trunk/docutils/docutils/utils/math/math2html.py
===================================================================
--- trunk/docutils/docutils/utils/math/math2html.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/utils/math/math2html.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -1930,7 +1930,7 @@
"Traverse a formula and yield a flattened structure of (bit, list) pairs."
for element in bit.contents:
if hasattr(element, 'type') and element.type:
- yield (element, bit.contents)
+ yield element, bit.contents
elif isinstance(element, FormulaBit):
yield from self.traverse(element)
Modified: trunk/docutils/docutils/utils/smartquotes.py
===================================================================
--- trunk/docutils/docutils/utils/smartquotes.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/utils/smartquotes.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -895,15 +895,15 @@
previous_end = 0
while token_match is not None:
if token_match.group(1):
- yield ('text', token_match.group(1))
+ yield 'text', token_match.group(1)
- yield ('tag', token_match.group(2))
+ yield 'tag', token_match.group(2)
previous_end = token_match.end()
token_match = tag_soup.search(text, token_match.end())
if previous_end < len(text):
- yield ('text', text[previous_end:])
+ yield 'text', text[previous_end:]
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/writers/_html_base.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -769,7 +769,7 @@
def visit_docinfo(self, node):
self.context.append(len(self.body))
classes = ['docinfo']
- if (self.is_compactable(node)):
+ if self.is_compactable(node):
classes.append('simple')
self.body.append(self.starttag(node, 'dl', classes=classes))
@@ -885,7 +885,7 @@
classes.pop(i)
break
classes.append('field-list')
- if (self.is_compactable(node)):
+ if self.is_compactable(node):
classes.append('simple')
self.body.append(self.starttag(node, 'dl', **atts))
Modified: trunk/docutils/docutils/writers/html5_polyglot/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -328,7 +328,7 @@
if (node.html5tagname == 'small' and node.get('classes') == ['ln']
and isinstance(node.parent, nodes.literal_block)):
self.body.append('<code data-lineno="%s">' % node.astext())
- del(node.html5tagname)
+ del node.html5tagname
# place inside HTML5 <figcaption> element (together with caption)
def visit_legend(self, node):
@@ -434,7 +434,7 @@
def depart_topic(self, node):
self.body.append('</%s>\n'%node.html_tagname)
- del(node.html_tagname)
+ del node.html_tagname
# append self-link
def section_title_tags(self, node):
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -888,7 +888,7 @@
def get_latex_type(self):
if self._latex_type == 'longtable' and not self.caption:
# do not advance the "table" counter (requires "ltcaption" package)
- return('longtable*')
+ return 'longtable*'
return self._latex_type
def set(self, attr, value):
@@ -1060,7 +1060,7 @@
res = [' \\\\\n']
self._cell_in_row = None # remove cell counter
for i in range(len(self._rowspan)):
- if (self._rowspan[i]>0):
+ if self._rowspan[i] > 0:
self._rowspan[i] -= 1
if self.borders == 'standard':
@@ -1664,7 +1664,7 @@
return ''
if isinstance(child, (nodes.container, nodes.compound)):
return self.term_postfix(child)
- if isinstance(child, (nodes.image)):
+ if isinstance(child, nodes.image):
return '\\leavevmode\n' # Images get an additional newline.
if not isinstance(child, (nodes.paragraph, nodes.math_block)):
return '\\leavevmode'
@@ -3113,7 +3113,7 @@
% roman.toRoman(level))
# System messages heading in red:
- if ('system-messages' in node.parent['classes']):
+ if 'system-messages' in node.parent['classes']:
self.requirements['color'] = PreambleCmds.color
section_title = self.encode(node.astext())
self.out.append(r'\%s[%s]{\color{red}' % (
Modified: trunk/docutils/docutils/writers/odf_odt/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/odf_odt/__init__.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/docutils/writers/odf_odt/__init__.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -1433,14 +1433,14 @@
if mo:
pos2 = mo.start()
if pos2 > pos1:
- yield (ODFTranslator.code_text, text[pos1:pos2])
- yield (ODFTranslator.code_field, mo.group(1))
+ yield ODFTranslator.code_text, text[pos1:pos2]
+ yield ODFTranslator.code_field, mo.group(1)
pos1 = mo.end()
else:
break
trailing = text[pos1:]
if trailing:
- yield (ODFTranslator.code_text, trailing)
+ yield ODFTranslator.code_text, trailing
def astext(self):
root = self.content_tree.getroot()
Modified: trunk/docutils/test/test_error_reporting.py
===================================================================
--- trunk/docutils/test/test_error_reporting.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/test/test_error_reporting.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -241,7 +241,7 @@
document = utils.new_document('test data', settings)
def test_include(self):
- source = ('.. include:: bogus.txt')
+ source = '.. include:: bogus.txt'
self.assertRaises(utils.SystemMessage,
self.parser.parse, source, self.document)
Modified: trunk/docutils/test/test_io.py
===================================================================
--- trunk/docutils/test/test_io.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/test/test_io.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -215,7 +215,7 @@
self.udata.encode('latin1'))
def test_encoding_clash_nonresolvable(self):
- del(self.mock_stdout.buffer)
+ del self.mock_stdout.buffer
fo = io.FileOutput(destination=self.mock_stdout,
encoding='latin1', autoclose=False)
self.assertRaises(ValueError, fo.write, self.udata)
Modified: trunk/docutils/test/test_language.py
===================================================================
--- trunk/docutils/test/test_language.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/test/test_language.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -102,7 +102,7 @@
for label in l_dict.keys():
if label not in ref_dict:
too_much.append(label)
- return (missing, too_much)
+ return missing, too_much
def _invert(self, adict):
"""Return an inverted (keys & values swapped) dictionary."""
Modified: trunk/docutils/test/test_writers/test_html4css1_misc.py
===================================================================
--- trunk/docutils/test/test_writers/test_html4css1_misc.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/test/test_writers/test_html4css1_misc.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -143,7 +143,7 @@
mathjax_script = '<script type="text/javascript" src="%s">'
default_mathjax_url = ('file:/usr/share/javascript/mathjax/MathJax.js'
'?config=TeX-AMS_CHTML')
- custom_mathjax_url = ('/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML')
+ custom_mathjax_url = '/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
data = ':math:`42`'
def test_math_output_default(self):
Modified: trunk/docutils/test/test_writers/test_html5_polyglot_misc.py
===================================================================
--- trunk/docutils/test/test_writers/test_html5_polyglot_misc.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/test/test_writers/test_html5_polyglot_misc.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -158,7 +158,7 @@
mathjax_script = '<script type="text/javascript" src="%s">'
default_mathjax_url = ('file:/usr/share/javascript/mathjax/MathJax.js'
'?config=TeX-AMS_CHTML')
- custom_mathjax_url = ('/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML')
+ custom_mathjax_url = '/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
data = ':math:`42`'
def test_math_output_default(self):
Modified: trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
===================================================================
--- trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -27,7 +27,7 @@
settings_default_overrides = HtmlWriterPublishPartsTestCase.settings_default_overrides.copy()
settings_default_overrides['section_self_link'] = True
- standard_content_type_template = ('<meta charset="%s"/>\n')
+ standard_content_type_template = '<meta charset="%s"/>\n'
standard_generator_template = ('<meta name="generator"'
' content="Docutils %s: https://docutils.sourceforge.io/" />\n')
standard_viewport_template = ('<meta name="viewport"'
Modified: trunk/docutils/tools/test/test_buildhtml.py
===================================================================
--- trunk/docutils/tools/test/test_buildhtml.py 2022-01-26 19:03:43 UTC (rev 8975)
+++ trunk/docutils/tools/test/test_buildhtml.py 2022-01-26 19:04:01 UTC (rev 8976)
@@ -54,7 +54,7 @@
cin.close()
cout.close()
p.wait()
- return (dirs, files)
+ return dirs, files
class BuildHtmlTests(unittest.TestCase):
tree = ( "_tmp_test_tree",
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-26 19:04:31
|
Revision: 8978
http://sourceforge.net/p/docutils/code/8978
Author: milde
Date: 2022-01-26 19:04:28 +0000 (Wed, 26 Jan 2022)
Log Message:
-----------
Use "x not in y" over "not x in y"
Modified Paths:
--------------
trunk/docutils/docutils/nodes.py
trunk/docutils/docutils/parsers/rst/directives/admonitions.py
trunk/docutils/docutils/utils/__init__.py
trunk/docutils/docutils/utils/math/math2html.py
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/html4css1/__init__.py
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/docutils/writers/manpage.py
trunk/docutils/docutils/writers/odf_odt/__init__.py
trunk/docutils/tools/test/test_buildhtml.py
Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py 2022-01-26 19:04:14 UTC (rev 8977)
+++ trunk/docutils/docutils/nodes.py 2022-01-26 19:04:28 UTC (rev 8978)
@@ -765,7 +765,7 @@
"""
# List Concatenation
for value in values:
- if not value in self[attr]:
+ if value not in self[attr]:
self[attr].append(value)
def coerce_append_attr_list(self, attr, value):
Modified: trunk/docutils/docutils/parsers/rst/directives/admonitions.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/admonitions.py 2022-01-26 19:04:14 UTC (rev 8977)
+++ trunk/docutils/docutils/parsers/rst/directives/admonitions.py 2022-01-26 19:04:28 UTC (rev 8978)
@@ -40,7 +40,7 @@
self.state_machine.get_source_and_line(self.lineno))
admonition_node += title
admonition_node += messages
- if not 'classes' in self.options:
+ if 'classes' not in self.options:
admonition_node['classes'] += ['admonition-' +
nodes.make_id(title_text)]
self.state.nested_parse(self.content, self.content_offset,
Modified: trunk/docutils/docutils/utils/__init__.py
===================================================================
--- trunk/docutils/docutils/utils/__init__.py 2022-01-26 19:04:14 UTC (rev 8977)
+++ trunk/docutils/docutils/utils/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
@@ -168,7 +168,7 @@
if line is not None:
attributes.setdefault('line', line)
# assert source is not None, "node has line- but no source-argument"
- if not 'source' in attributes: # 'line' is absolute line number
+ if 'source' not in attributes: # 'line' is absolute line number
try: # look up (source, line-in-source)
source, line = self.get_source_and_line(attributes.get('line'))
except AttributeError:
@@ -648,7 +648,7 @@
def uniq(L):
r = []
for item in L:
- if not item in r:
+ if item not in r:
r.append(item)
return r
@@ -727,7 +727,7 @@
is not None.
"""
for filename in filenames:
- if not filename in self.list:
+ if filename not in self.list:
self.list.append(filename)
if self.file is not None:
self.file.write(filename+'\n')
Modified: trunk/docutils/docutils/utils/math/math2html.py
===================================================================
--- trunk/docutils/docutils/utils/math/math2html.py 2022-01-26 19:04:14 UTC (rev 8977)
+++ trunk/docutils/docutils/utils/math/math2html.py 2022-01-26 19:04:28 UTC (rev 8978)
@@ -753,7 +753,7 @@
if len(split) == 1:
self.parameters[key] = True
return
- if not '"' in split[1]:
+ if '"' not in split[1]:
self.parameters[key] = split[1].strip()
return
doublesplit = split[1].split('"')
@@ -1414,7 +1414,7 @@
def getparameter(self, name):
"Get the value of a parameter, if present."
- if not name in self.parameters:
+ if name not in self.parameters:
return None
return self.parameters[name]
@@ -1591,7 +1591,7 @@
def parsesingleliner(self, reader, start, ending):
"Parse a formula in one line"
line = reader.currentline().strip()
- if not start in line:
+ if start not in line:
Trace.error('Line ' + line + ' does not contain formula start ' + start)
return ''
if not line.endswith(ending):
@@ -1606,7 +1606,7 @@
"Parse a formula in multiple lines"
formula = ''
line = reader.currentline()
- if not start in line:
+ if start not in line:
Trace.error('Line ' + line.strip() + ' does not contain formula start ' + start)
return ''
index = line.index(start)
@@ -2051,7 +2051,7 @@
def instance(self, type):
"Get an instance of the given type."
- if not type in self.instances or not self.instances[type]:
+ if type not in self.instances or not self.instances[type]:
self.instances[type] = self.create(type)
return self.instances[type]
@@ -2947,7 +2947,7 @@
def getparam(self, name):
"Get a parameter as parsed."
- if not name in self.params:
+ if name not in self.params:
return None
return self.params[name]
@@ -3018,7 +3018,7 @@
def writeparam(self, pos):
"Write a single param of the form $0, $x..."
name = '$' + pos.skipcurrent()
- if not name in self.params:
+ if name not in self.params:
Trace.error('Unknown parameter ' + name)
return None
if not self.params[name]:
@@ -3055,7 +3055,7 @@
Trace.error('Function f' + str(index) + ' is not defined')
return None
tag = self.translated[2 + index]
- if not '$' in tag:
+ if '$' not in tag:
return tag
for variable in self.params:
if variable in tag:
@@ -3076,7 +3076,7 @@
def computehybridsize(self):
"Compute the size of the hybrid function."
- if not self.command in HybridSize.configsizes:
+ if self.command not in HybridSize.configsizes:
self.computesize()
return
self.size = HybridSize().getsize(self)
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2022-01-26 19:04:14 UTC (rev 8977)
+++ trunk/docutils/docutils/writers/_html_base.py 2022-01-26 19:04:28 UTC (rev 8978)
@@ -996,7 +996,7 @@
if 'height' in node:
atts['height'] = node['height']
if 'scale' in node:
- if (PIL and not ('width' in node and 'height' in node)
+ if (PIL and ('width' not in node or 'height' not in node)
and self.settings.file_insertion_enabled):
imagepath = url2pathname(uri)
try:
@@ -1568,8 +1568,9 @@
self.body.append('</table>\n')
def visit_target(self, node):
- if not ('refuri' in node or 'refid' in node
- or 'refname' in node):
+ if ('refuri' not in node
+ and 'refid' not in node
+ and 'refname' not in node):
self.body.append(self.starttag(node, 'span', '', CLASS='target'))
self.context.append('</span>')
else:
Modified: trunk/docutils/docutils/writers/html4css1/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html4css1/__init__.py 2022-01-26 19:04:14 UTC (rev 8977)
+++ trunk/docutils/docutils/writers/html4css1/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
@@ -559,7 +559,7 @@
if 'height' in node:
atts['height'] = node['height']
if 'scale' in node:
- if (PIL and not ('width' in node and 'height' in node)
+ if (PIL and ('width' not in node or 'height' not in node)
and self.settings.file_insertion_enabled):
imagepath = url2pathname(uri)
try:
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-26 19:04:14 UTC (rev 8977)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
@@ -2388,7 +2388,7 @@
# Convert image URI to a local file path
imagepath = url2pathname(attrs['uri']).replace('\\', '/')
# alignment defaults:
- if not 'align' in attrs:
+ if 'align' not in attrs:
# Set default align of image in a figure to 'center'
if isinstance(node.parent, nodes.figure):
attrs['align'] = 'center'
@@ -2763,7 +2763,7 @@
self.out.append('}}')
def visit_raw(self, node):
- if not 'latex' in node.get('format', '').split():
+ if 'latex' not in node.get('format', '').split():
raise nodes.SkipNode
if not (self.is_inline(node)
or isinstance(node.parent, nodes.compound)):
Modified: trunk/docutils/docutils/writers/manpage.py
===================================================================
--- trunk/docutils/docutils/writers/manpage.py 2022-01-26 19:04:14 UTC (rev 8977)
+++ trunk/docutils/docutils/writers/manpage.py 2022-01-26 19:04:28 UTC (rev 8978)
@@ -599,7 +599,7 @@
self._docinfo[name],
self.defs['indent'][1],
self.defs['indent'][1]))
- elif not name in skip:
+ elif name not in skip:
if name in self._docinfo_names:
label = self._docinfo_names[name]
else:
Modified: trunk/docutils/docutils/writers/odf_odt/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/odf_odt/__init__.py 2022-01-26 19:04:14 UTC (rev 8977)
+++ trunk/docutils/docutils/writers/odf_odt/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
@@ -3175,9 +3175,9 @@
#
# I don't know how to implement targets in ODF.
# How do we create a target in oowriter? A cross-reference?
- if not ('refuri' in node or
- 'refid' in node or
- 'refname' in node):
+ if ('refuri' not in node
+ and 'refid' not in node
+ and 'refname' not in node):
pass
else:
pass
Modified: trunk/docutils/tools/test/test_buildhtml.py
===================================================================
--- trunk/docutils/tools/test/test_buildhtml.py 2022-01-26 19:04:14 UTC (rev 8977)
+++ trunk/docutils/tools/test/test_buildhtml.py 2022-01-26 19:04:28 UTC (rev 8978)
@@ -76,7 +76,7 @@
for s in self.tree:
s = os.path.join(self.root, s)
- if not "." in s:
+ if "." not in s:
os.mkdir(s)
else:
fd_s = open(s, "w")
@@ -86,7 +86,7 @@
def tearDown(self):
for i in range(len(self.tree) - 1, -1, -1):
s = os.path.join(self.root, self.tree[i])
- if not "." in s:
+ if "." not in s:
os.rmdir(s)
else:
os.remove(s)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-26 19:05:11
|
Revision: 8979
http://sourceforge.net/p/docutils/code/8979
Author: milde
Date: 2022-01-26 19:05:07 +0000 (Wed, 26 Jan 2022)
Log Message:
-----------
Remove unused imports
Modified Paths:
--------------
trunk/docutils/docutils/__init__.py
trunk/docutils/docutils/languages/__init__.py
trunk/docutils/docutils/nodes.py
trunk/docutils/docutils/parsers/__init__.py
trunk/docutils/docutils/parsers/rst/directives/__init__.py
trunk/docutils/docutils/parsers/rst/directives/images.py
trunk/docutils/docutils/parsers/rst/directives/misc.py
trunk/docutils/docutils/parsers/rst/directives/tables.py
trunk/docutils/docutils/parsers/rst/languages/__init__.py
trunk/docutils/docutils/parsers/rst/roles.py
trunk/docutils/docutils/parsers/rst/states.py
trunk/docutils/docutils/readers/__init__.py
trunk/docutils/docutils/readers/standalone.py
trunk/docutils/docutils/transforms/components.py
trunk/docutils/docutils/transforms/frontmatter.py
trunk/docutils/docutils/transforms/parts.py
trunk/docutils/docutils/transforms/peps.py
trunk/docutils/docutils/transforms/references.py
trunk/docutils/docutils/transforms/universal.py
trunk/docutils/docutils/utils/math/latex2mathml.py
trunk/docutils/docutils/utils/punctuation_chars.py
trunk/docutils/docutils/writers/__init__.py
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/docutils_xml.py
trunk/docutils/docutils/writers/html4css1/__init__.py
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/docutils/writers/manpage.py
trunk/docutils/docutils/writers/odf_odt/__init__.py
trunk/docutils/docutils/writers/pep_html/__init__.py
trunk/docutils/docutils/writers/xetex/__init__.py
trunk/docutils/setup.py
trunk/docutils/test/DocutilsTestSupport.py
trunk/docutils/test/package_unittest.py
trunk/docutils/test/test__init__.py
trunk/docutils/test/test_dependencies.py
trunk/docutils/test/test_nodes.py
trunk/docutils/test/test_parsers/test_parser.py
trunk/docutils/test/test_parsers/test_recommonmark/__init__.py
trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_raw.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_tables.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_unicode.py
trunk/docutils/test/test_publisher.py
trunk/docutils/test/test_writers/test_docutils_xml.py
trunk/docutils/tools/buildhtml.py
trunk/docutils/tools/rst2odt.py
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -70,7 +70,6 @@
from collections import namedtuple
-import sys
class VersionInfo(namedtuple('VersionInfo',
Modified: trunk/docutils/docutils/languages/__init__.py
===================================================================
--- trunk/docutils/docutils/languages/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/languages/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -11,7 +11,6 @@
__docformat__ = 'reStructuredText'
-import sys
from importlib import import_module
from docutils.utils import normalize_language_tag
Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/nodes.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -23,7 +23,6 @@
__docformat__ = 'reStructuredText'
from collections import Counter
-import os
import re
import sys
import warnings
@@ -1880,7 +1879,6 @@
Raw data that is to be passed untouched to the Writer.
"""
- pass
# =================
@@ -2133,7 +2131,6 @@
the tree traversed.
"""
- pass
class SkipChildren(TreePruningException):
@@ -2143,7 +2140,6 @@
siblings and ``depart_...`` method are not affected.
"""
- pass
class SkipSiblings(TreePruningException):
@@ -2153,7 +2149,6 @@
current node's children and its ``depart_...`` method are not affected.
"""
- pass
class SkipNode(TreePruningException):
@@ -2163,7 +2158,6 @@
node's ``depart_...`` method.
"""
- pass
class SkipDeparture(TreePruningException):
@@ -2173,7 +2167,6 @@
children and siblings are not affected.
"""
- pass
class NodeFound(TreePruningException):
@@ -2184,7 +2177,6 @@
code.
"""
- pass
class StopTraversal(TreePruningException):
@@ -2197,7 +2189,6 @@
caller.
"""
- pass
def make_id(string):
Modified: trunk/docutils/docutils/parsers/__init__.py
===================================================================
--- trunk/docutils/docutils/parsers/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/parsers/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -8,7 +8,6 @@
__docformat__ = 'reStructuredText'
-import sys
from importlib import import_module
from docutils import Component, frontend
Modified: trunk/docutils/docutils/parsers/rst/directives/__init__.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/parsers/rst/directives/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -10,7 +10,6 @@
import re
import codecs
-import sys
from importlib import import_module
from docutils import nodes, parsers
Modified: trunk/docutils/docutils/parsers/rst/directives/images.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/images.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/parsers/rst/directives/images.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -8,7 +8,6 @@
__docformat__ = 'reStructuredText'
-import sys
from urllib.request import url2pathname
try: # check for the Python Imaging Library
Modified: trunk/docutils/docutils/parsers/rst/directives/misc.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/misc.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/parsers/rst/directives/misc.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -6,7 +6,6 @@
__docformat__ = 'reStructuredText'
-import sys
import os.path
import re
import time
Modified: trunk/docutils/docutils/parsers/rst/directives/tables.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/tables.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/parsers/rst/directives/tables.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -11,7 +11,6 @@
import csv
import os.path
-import sys
import warnings
from docutils import io, nodes, statemachine, utils
Modified: trunk/docutils/docutils/parsers/rst/languages/__init__.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/parsers/rst/languages/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -12,7 +12,6 @@
__docformat__ = 'reStructuredText'
-import sys
from docutils.languages import LanguageImporter
Modified: trunk/docutils/docutils/parsers/rst/roles.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/roles.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/parsers/rst/roles.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -76,7 +76,6 @@
__docformat__ = 'reStructuredText'
-import warnings
from docutils import nodes, utils
from docutils.parsers.rst import directives
Modified: trunk/docutils/docutils/parsers/rst/states.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/states.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/parsers/rst/states.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -103,7 +103,6 @@
__docformat__ = 'reStructuredText'
-import sys
import re
from types import FunctionType, MethodType
Modified: trunk/docutils/docutils/readers/__init__.py
===================================================================
--- trunk/docutils/docutils/readers/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/readers/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -8,7 +8,6 @@
__docformat__ = 'reStructuredText'
-import sys
from importlib import import_module
from docutils import utils, parsers, Component
Modified: trunk/docutils/docutils/readers/standalone.py
===================================================================
--- trunk/docutils/docutils/readers/standalone.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/readers/standalone.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -9,7 +9,6 @@
__docformat__ = 'reStructuredText'
-import sys
from docutils import frontend, readers
from docutils.transforms import frontmatter, references, misc
Modified: trunk/docutils/docutils/transforms/components.py
===================================================================
--- trunk/docutils/docutils/transforms/components.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/transforms/components.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -8,10 +8,6 @@
__docformat__ = 'reStructuredText'
-import sys
-import os
-import re
-import time
from docutils import nodes, utils
from docutils import ApplicationError, DataError
from docutils.transforms import Transform, TransformError
Modified: trunk/docutils/docutils/transforms/frontmatter.py
===================================================================
--- trunk/docutils/docutils/transforms/frontmatter.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/transforms/frontmatter.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -22,7 +22,6 @@
__docformat__ = 'reStructuredText'
import re
-import sys
from docutils import nodes, utils
from docutils.transforms import TransformError, Transform
Modified: trunk/docutils/docutils/transforms/parts.py
===================================================================
--- trunk/docutils/docutils/transforms/parts.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/transforms/parts.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -9,7 +9,6 @@
__docformat__ = 'reStructuredText'
-import re
import sys
from docutils import nodes, utils
from docutils.transforms import TransformError, Transform
Modified: trunk/docutils/docutils/transforms/peps.py
===================================================================
--- trunk/docutils/docutils/transforms/peps.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/transforms/peps.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -13,7 +13,6 @@
__docformat__ = 'reStructuredText'
-import sys
import os
import re
import time
Modified: trunk/docutils/docutils/transforms/references.py
===================================================================
--- trunk/docutils/docutils/transforms/references.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/transforms/references.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -8,8 +8,6 @@
__docformat__ = 'reStructuredText'
-import sys
-import re
from docutils import nodes, utils
from docutils.transforms import TransformError, Transform
Modified: trunk/docutils/docutils/transforms/universal.py
===================================================================
--- trunk/docutils/docutils/transforms/universal.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/transforms/universal.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -21,7 +21,6 @@
__docformat__ = 'reStructuredText'
import re
-import sys
import time
from docutils import nodes, utils
from docutils.transforms import TransformError, Transform
Modified: trunk/docutils/docutils/utils/math/latex2mathml.py
===================================================================
--- trunk/docutils/docutils/utils/math/latex2mathml.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/utils/math/latex2mathml.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -24,9 +24,7 @@
#
# >>> from latex2mathml import *
-import copy
import re
-import sys
import unicodedata
from docutils.utils.math import tex2unichar, toplevel_code
Modified: trunk/docutils/docutils/utils/punctuation_chars.py
===================================================================
--- trunk/docutils/docutils/utils/punctuation_chars.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/utils/punctuation_chars.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -14,7 +14,7 @@
# ``docutils/tools/dev/generate_punctuation_chars.py``.
# ::
-import sys, re
+import sys
import unicodedata
"""Docutils character category patterns.
Modified: trunk/docutils/docutils/writers/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/writers/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -9,7 +9,6 @@
__docformat__ = 'reStructuredText'
import os.path
-import sys
from importlib import import_module
import docutils
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/writers/_html_base.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -20,7 +20,6 @@
import mimetypes
import os, os.path
import re
-import sys
from urllib.request import url2pathname
import warnings
Modified: trunk/docutils/docutils/writers/docutils_xml.py
===================================================================
--- trunk/docutils/docutils/writers/docutils_xml.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/writers/docutils_xml.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -11,7 +11,6 @@
__docformat__ = 'reStructuredText'
from io import StringIO
-import sys
import xml.sax.saxutils
import docutils
Modified: trunk/docutils/docutils/writers/html4css1/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html4css1/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/writers/html4css1/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -16,7 +16,6 @@
import os.path
import re
-import sys
import docutils
from docutils import frontend, nodes, writers, io
from docutils.transforms import writer_aux
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -15,7 +15,6 @@
import os
import re
import string
-import sys
from urllib.request import url2pathname
import warnings
Modified: trunk/docutils/docutils/writers/manpage.py
===================================================================
--- trunk/docutils/docutils/writers/manpage.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/writers/manpage.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -44,7 +44,6 @@
__docformat__ = 'reStructuredText'
import re
-import sys
import docutils
from docutils import nodes, writers, languages
Modified: trunk/docutils/docutils/writers/odf_odt/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/odf_odt/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/writers/odf_odt/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -21,7 +21,6 @@
import os.path
import re
import subprocess
-import sys
import tempfile
import time
from urllib.request import urlopen
@@ -1759,7 +1758,6 @@
def visit_caption(self, node):
raise nodes.SkipChildren()
- pass
def depart_caption(self, node):
pass
Modified: trunk/docutils/docutils/writers/pep_html/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/pep_html/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/writers/pep_html/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -9,7 +9,6 @@
__docformat__ = 'reStructuredText'
-import sys
import os
import os.path
import docutils
Modified: trunk/docutils/docutils/writers/xetex/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/xetex/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/docutils/writers/xetex/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -22,9 +22,7 @@
__docformat__ = 'reStructuredText'
-import os
import os.path
-import re
import docutils
from docutils import frontend, nodes, utils, writers, languages
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/setup.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -2,8 +2,6 @@
# $Id$
# Copyright: This file has been placed in the public domain.
-import glob
-import os
import sys
try:
Modified: trunk/docutils/test/DocutilsTestSupport.py
===================================================================
--- trunk/docutils/test/DocutilsTestSupport.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/test/DocutilsTestSupport.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -46,7 +46,6 @@
import re
import inspect
import traceback
-import warnings
from pprint import pformat
testroot = os.path.abspath(os.path.dirname(__file__) or os.curdir)
Modified: trunk/docutils/test/package_unittest.py
===================================================================
--- trunk/docutils/test/package_unittest.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/test/package_unittest.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -15,7 +15,6 @@
import getopt
import types
import unittest
-import re
# So that individual test modules can share a bit of state,
Modified: trunk/docutils/test/test__init__.py
===================================================================
--- trunk/docutils/test/test__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/test/test__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -9,7 +9,6 @@
"""
import unittest
-import sys
import DocutilsTestSupport # must be imported before docutils
import docutils
import docutils.utils
Modified: trunk/docutils/test/test_dependencies.py
===================================================================
--- trunk/docutils/test/test_dependencies.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/test/test_dependencies.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -8,7 +8,6 @@
Test module for the --record-dependencies option.
"""
-import csv
import os.path
import unittest
import DocutilsTestSupport # must be imported before docutils
Modified: trunk/docutils/test/test_nodes.py
===================================================================
--- trunk/docutils/test/test_nodes.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/test/test_nodes.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -7,7 +7,6 @@
Test module for nodes.py.
"""
-import sys
import unittest
import warnings
Modified: trunk/docutils/test/test_parsers/test_parser.py
===================================================================
--- trunk/docutils/test/test_parsers/test_parser.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/test/test_parsers/test_parser.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -7,7 +7,6 @@
Tests for basic functionality of parser classes.
"""
-import sys
import unittest
if __name__ == '__main__':
Modified: trunk/docutils/test/test_parsers/test_recommonmark/__init__.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/__init__.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/test/test_parsers/test_recommonmark/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -1,7 +1,6 @@
import os
import os.path
import sys
-import unittest
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
prev = ''
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -13,9 +13,7 @@
Various tests for the recommonmark parser.
"""
-import sys
import unittest
-import warnings
if __name__ == '__main__':
import __init__
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 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_include.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -8,7 +8,6 @@
"""
import os.path
-import sys
if __name__ == '__main__':
import __init__
from test_parsers import DocutilsTestSupport
Modified: trunk/docutils/test/test_parsers/test_rst/test_directives/test_raw.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_directives/test_raw.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_raw.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -9,7 +9,6 @@
"""
import os.path
-import sys
if __name__ == '__main__':
import __init__
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 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_tables.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -9,7 +9,6 @@
"""
import os
-import sys
import csv
import platform
Modified: trunk/docutils/test/test_parsers/test_rst/test_directives/test_unicode.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_directives/test_unicode.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_unicode.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -8,7 +8,6 @@
Tests for misc.py "unicode" directive.
"""
-import sys
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/test/test_publisher.py
===================================================================
--- trunk/docutils/test/test_publisher.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/test/test_publisher.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -9,7 +9,6 @@
"""
import pickle
-import sys
import DocutilsTestSupport # must be imported before docutils
import docutils
Modified: trunk/docutils/test/test_writers/test_docutils_xml.py
===================================================================
--- trunk/docutils/test/test_writers/test_docutils_xml.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/test/test_writers/test_docutils_xml.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -14,7 +14,6 @@
module mirrors the current behaviour of the docutils_xml writer.
"""
-import sys
if __name__ == '__main__':
import __init__
Modified: trunk/docutils/tools/buildhtml.py
===================================================================
--- trunk/docutils/tools/buildhtml.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/tools/buildhtml.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -21,7 +21,6 @@
except:
pass
-import copy
from fnmatch import fnmatch
import os
import os.path
Modified: trunk/docutils/tools/rst2odt.py
===================================================================
--- trunk/docutils/tools/rst2odt.py 2022-01-26 19:04:28 UTC (rev 8978)
+++ trunk/docutils/tools/rst2odt.py 2022-01-26 19:05:07 UTC (rev 8979)
@@ -8,7 +8,6 @@
A front end to the Docutils Publisher, producing OpenOffice documents.
"""
-import sys
try:
import locale
locale.setlocale(locale.LC_ALL, '')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-26 19:05:28
|
Revision: 8980
http://sourceforge.net/p/docutils/code/8980
Author: milde
Date: 2022-01-26 19:05:25 +0000 (Wed, 26 Jan 2022)
Log Message:
-----------
Skip assigning to a variable when immediately returning
Patch by Adam Turner
Modified Paths:
--------------
trunk/docutils/docutils/nodes.py
trunk/docutils/docutils/parsers/rst/directives/__init__.py
trunk/docutils/docutils/parsers/rst/tableparser.py
trunk/docutils/docutils/readers/__init__.py
trunk/docutils/docutils/statemachine.py
trunk/docutils/docutils/transforms/frontmatter.py
trunk/docutils/docutils/utils/__init__.py
trunk/docutils/docutils/utils/math/math2html.py
trunk/docutils/docutils/utils/math/tex2mathml_extern.py
trunk/docutils/docutils/writers/__init__.py
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/docutils/writers/odf_odt/__init__.py
trunk/docutils/setup.py
trunk/docutils/test/test_writers/test_odt.py
Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py 2022-01-26 19:05:07 UTC (rev 8979)
+++ trunk/docutils/docutils/nodes.py 2022-01-26 19:05:25 UTC (rev 8980)
@@ -681,8 +681,7 @@
return atts
def attlist(self):
- attlist = sorted(self.non_default_attributes().items())
- return attlist
+ return sorted(self.non_default_attributes().items())
def get(self, key, failobj=None):
return self.attributes.get(key, failobj)
Modified: trunk/docutils/docutils/parsers/rst/directives/__init__.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
+++ trunk/docutils/docutils/parsers/rst/directives/__init__.py 2022-01-26 19:05:25 UTC (rev 8980)
@@ -183,8 +183,7 @@
if argument is None:
raise ValueError('argument required but none supplied')
else:
- path = ''.join(s.strip() for s in argument.splitlines())
- return path
+ return ''.join(s.strip() for s in argument.splitlines())
def uri(argument):
"""
@@ -197,8 +196,7 @@
raise ValueError('argument required but none supplied')
else:
parts = split_escaped_whitespace(escape2null(argument))
- uri = ' '.join(''.join(unescape(part).split()) for part in parts)
- return uri
+ return ' '.join(''.join(unescape(part).split()) for part in parts)
def nonnegative_int(argument):
"""
Modified: trunk/docutils/docutils/parsers/rst/tableparser.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/tableparser.py 2022-01-26 19:05:07 UTC (rev 8979)
+++ trunk/docutils/docutils/parsers/rst/tableparser.py 2022-01-26 19:05:25 UTC (rev 8980)
@@ -65,8 +65,7 @@
self.setup(block)
self.find_head_body_sep()
self.parse_table()
- structure = self.structure_from_cells()
- return structure
+ return self.structure_from_cells()
def find_head_body_sep(self):
"""Look for a head/body row separator line; store the line index."""
@@ -209,8 +208,7 @@
def scan_cell(self, top, left):
"""Starting at the top-left corner, start tracing out a cell."""
assert self.block[top][left] == '+'
- result = self.scan_right(top, left)
- return result
+ return self.scan_right(top, left)
def scan_right(self, top, left):
"""
Modified: trunk/docutils/docutils/readers/__init__.py
===================================================================
--- trunk/docutils/docutils/readers/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
+++ trunk/docutils/docutils/readers/__init__.py 2022-01-26 19:05:25 UTC (rev 8980)
@@ -79,8 +79,7 @@
def new_document(self):
"""Create and return a new empty document tree (root node)."""
- document = utils.new_document(self.source.source_path, self.settings)
- return document
+ return utils.new_document(self.source.source_path, self.settings)
class ReReader(Reader):
Modified: trunk/docutils/docutils/statemachine.py
===================================================================
--- trunk/docutils/docutils/statemachine.py 2022-01-26 19:05:07 UTC (rev 8979)
+++ trunk/docutils/docutils/statemachine.py 2022-01-26 19:05:25 UTC (rev 8980)
@@ -1498,8 +1498,7 @@
"""
if convert_whitespace:
astring = whitespace.sub(' ', astring)
- lines = [s.expandtabs(tab_width).rstrip() for s in astring.splitlines()]
- return lines
+ return [s.expandtabs(tab_width).rstrip() for s in astring.splitlines()]
def _exception_data():
"""
Modified: trunk/docutils/docutils/transforms/frontmatter.py
===================================================================
--- trunk/docutils/docutils/transforms/frontmatter.py 2022-01-26 19:05:07 UTC (rev 8979)
+++ trunk/docutils/docutils/transforms/frontmatter.py 2022-01-26 19:05:25 UTC (rev 8980)
@@ -519,8 +519,7 @@
if len(authornames) > 1:
break
authornames = (name.strip() for name in authornames)
- authors = [[nodes.Text(name)] for name in authornames if name]
- return authors
+ return [[nodes.Text(name)] for name in authornames if name]
def authors_from_bullet_list(self, field):
authors = []
Modified: trunk/docutils/docutils/utils/__init__.py
===================================================================
--- trunk/docutils/docutils/utils/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
+++ trunk/docutils/docutils/utils/__init__.py 2022-01-26 19:05:25 UTC (rev 8980)
@@ -262,8 +262,7 @@
missing data, bad quotes, etc.).
"""
option_list = extract_options(field_list)
- option_dict = assemble_option_dict(option_list, options_spec)
- return option_dict
+ return assemble_option_dict(option_list, options_spec)
def extract_options(field_list):
"""
Modified: trunk/docutils/docutils/utils/math/math2html.py
===================================================================
--- trunk/docutils/docutils/utils/math/math2html.py 2022-01-26 19:05:07 UTC (rev 8979)
+++ trunk/docutils/docutils/utils/math/math2html.py 2022-01-26 19:05:25 UTC (rev 8980)
@@ -1479,8 +1479,7 @@
return replaced
def changeline(self, line):
- line = self.escape(line, EscapeConfig.chars)
- return line
+ return self.escape(line, EscapeConfig.chars)
def extracttext(self):
"Return all text."
Modified: trunk/docutils/docutils/utils/math/tex2mathml_extern.py
===================================================================
--- trunk/docutils/docutils/utils/math/tex2mathml_extern.py 2022-01-26 19:05:07 UTC (rev 8979)
+++ trunk/docutils/docutils/utils/math/tex2mathml_extern.py 2022-01-26 19:05:25 UTC (rev 8980)
@@ -96,8 +96,7 @@
if reporter and err.find('**** Error') >= 0 or not result:
reporter.error(err)
start, end = result.find('<math'), result.find('</math>')+7
- result = result[start:end]
- return result
+ return result[start:end]
def blahtexml(math_code, inline=True, reporter=None):
"""Convert LaTeX math code to MathML with blahtexml_
Modified: trunk/docutils/docutils/writers/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
+++ trunk/docutils/docutils/writers/__init__.py 2022-01-26 19:05:25 UTC (rev 8980)
@@ -75,8 +75,7 @@
document.reporter)
self.destination = destination
self.translate()
- output = self.destination.write(self.output)
- return output
+ return self.destination.write(self.output)
def translate(self):
"""
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2022-01-26 19:05:07 UTC (rev 8979)
+++ trunk/docutils/docutils/writers/_html_base.py 2022-01-26 19:05:25 UTC (rev 8980)
@@ -370,8 +370,7 @@
# Surround at-signs and periods with <span> tags. ("@" has
# already been encoded to "@" by the `encode` method.)
addr = addr.replace('@', '<span>@</span>')
- addr = addr.replace('.', '<span>.</span>')
- return addr
+ return addr.replace('.', '<span>.</span>')
def attval(self, text,
whitespace=re.compile('[\n\r\t\v\f]')):
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2022-01-26 19:05:25 UTC (rev 8980)
@@ -480,8 +480,7 @@
"""
def sortedkeys(self):
"""Return sorted list of keys"""
- keys = sorted(self.keys())
- return keys
+ return sorted(self.keys())
def sortedvalues(self):
"""Return list of values sorted by keys"""
Modified: trunk/docutils/docutils/writers/odf_odt/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/odf_odt/__init__.py 2022-01-26 19:05:07 UTC (rev 8979)
+++ trunk/docutils/docutils/writers/odf_odt/__init__.py 2022-01-26 19:05:25 UTC (rev 8980)
@@ -253,8 +253,7 @@
if attrib is None:
attrib = {}
tag, attrib = fix_ns(tag, attrib, nsdict)
- el = _ElementInterfaceWrapper(tag, attrib)
- return el
+ return _ElementInterfaceWrapper(tag, attrib)
def SubElement(parent, tag, attrib=None, nsmap=None, nsdict=CNSD):
@@ -678,8 +677,7 @@
"""Get the stylesheet from the visitor.
Ask the visitor to setup the page.
"""
- s1 = self.visitor.setup_page()
- return s1
+ return self.visitor.setup_page()
def copy_from_stylesheet(self, outzipfile):
"""Copy images, settings, etc from the stylesheet doc into target doc.
@@ -729,8 +727,7 @@
}, nsdict=MANNSD)
s1 = ToString(doc)
doc = minidom.parseString(s1)
- s1 = doc.toprettyxml(' ')
- return s1
+ return doc.toprettyxml(' ')
def create_meta(self):
root = Element(
@@ -1049,8 +1046,7 @@
the value.
"""
name1 = name % parameters
- stylename = self.format_map.get(name1, 'rststyle-%s' % name1)
- return stylename
+ return self.format_map.get(name1, 'rststyle-%s' % name1)
def generate_content_element(self, root):
return SubElement(root, 'office:text')
@@ -1062,8 +1058,7 @@
self.settings.custom_header or
self.settings.custom_footer):
self.add_header_footer(self.dom_stylesheet)
- new_content = etree.tostring(self.dom_stylesheet)
- return new_content
+ return etree.tostring(self.dom_stylesheet)
def get_dom_stylesheet(self):
return self.dom_stylesheet
@@ -1444,8 +1439,7 @@
def astext(self):
root = self.content_tree.getroot()
et = etree.ElementTree(root)
- s1 = ToString(et)
- return s1
+ return ToString(et)
def content_astext(self):
return self.astext()
@@ -1506,8 +1500,7 @@
def append_child(self, tag, attrib=None, parent=None):
if parent is None:
parent = self.current_element
- el = SubElement(parent, tag, attrib)
- return el
+ return SubElement(parent, tag, attrib)
def append_p(self, style, text=None):
result = self.append_child('text:p', attrib={
@@ -1537,8 +1530,7 @@
el, 'text:span',
attrib={'text:style-name': self.rststyle('strong')})
el1.text = label
- el = self.append_p('blockindent')
- return el
+ return self.append_p('blockindent')
def generate_labeled_line(self, node, label):
label = '%s:' % (self.language.labels[label], )
@@ -1551,8 +1543,7 @@
return el
def encode(self, text):
- text = text.replace('\n', " ")
- return text
+ return text.replace('\n', " ")
#
# Visitor functions
@@ -2601,23 +2592,19 @@
lambda name, parameters=():
self.rststyle(name, parameters),
escape_function=escape_cdata)
- outsource = pygments.highlight(insource, lexer, fmtr)
- return outsource
+ return pygments.highlight(insource, lexer, fmtr)
def fill_line(self, line):
line = FILL_PAT1.sub(self.fill_func1, line)
- line = FILL_PAT2.sub(self.fill_func2, line)
- return line
+ return FILL_PAT2.sub(self.fill_func2, line)
def fill_func1(self, matchobj):
spaces = matchobj.group(0)
- repl = '<text:s text:c="%d"/>' % (len(spaces), )
- return repl
+ return '<text:s text:c="%d"/>' % (len(spaces), )
def fill_func2(self, matchobj):
spaces = matchobj.group(0)
- repl = ' <text:s text:c="%d"/>' % (len(spaces) - 1, )
- return repl
+ return ' <text:s text:c="%d"/>' % (len(spaces) - 1, )
def visit_literal_block(self, node):
if len(self.paragraph_style_stack) > 1:
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2022-01-26 19:05:07 UTC (rev 8979)
+++ trunk/docutils/setup.py 2022-01-26 19:05:25 UTC (rev 8980)
@@ -135,8 +135,7 @@
def do_setup():
# Install data files properly.
- dist = setup(**package_data)
- return dist
+ return setup(**package_data)
if __name__ == '__main__':
Modified: trunk/docutils/test/test_writers/test_odt.py
===================================================================
--- trunk/docutils/test/test_writers/test_odt.py 2022-01-26 19:05:07 UTC (rev 8979)
+++ trunk/docutils/test/test_writers/test_odt.py 2022-01-26 19:05:25 UTC (rev 8980)
@@ -105,9 +105,8 @@
content1 = zfile.read(filename)
doc = etree.fromstring(content1)
self.reorder_attributes(doc)
- #content2 = doc.toprettyxml(indent=' ')
- content2 = etree.tostring(doc)
- return content2
+ # return doc.toprettyxml(indent=' ')
+ return etree.tostring(doc)
def assertEqual(self, first, second, msg=None):
if msg is None:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2022-01-26 22:09:44
|
Revision: 8983
http://sourceforge.net/p/docutils/code/8983
Author: milde
Date: 2022-01-26 22:09:36 +0000 (Wed, 26 Jan 2022)
Log Message:
-----------
Drop string prefix "u".
Modified Paths:
--------------
trunk/docutils/docutils/core.py
trunk/docutils/docutils/frontend.py
trunk/docutils/docutils/io.py
trunk/docutils/docutils/languages/ar.py
trunk/docutils/docutils/languages/ca.py
trunk/docutils/docutils/languages/cs.py
trunk/docutils/docutils/languages/da.py
trunk/docutils/docutils/languages/eo.py
trunk/docutils/docutils/languages/es.py
trunk/docutils/docutils/languages/fa.py
trunk/docutils/docutils/languages/fi.py
trunk/docutils/docutils/languages/fr.py
trunk/docutils/docutils/languages/gl.py
trunk/docutils/docutils/languages/he.py
trunk/docutils/docutils/languages/ja.py
trunk/docutils/docutils/languages/ko.py
trunk/docutils/docutils/languages/lt.py
trunk/docutils/docutils/languages/pl.py
trunk/docutils/docutils/languages/pt_br.py
trunk/docutils/docutils/languages/ru.py
trunk/docutils/docutils/languages/sk.py
trunk/docutils/docutils/languages/sv.py
trunk/docutils/docutils/languages/zh_cn.py
trunk/docutils/docutils/languages/zh_tw.py
trunk/docutils/docutils/nodes.py
trunk/docutils/docutils/parsers/rst/directives/__init__.py
trunk/docutils/docutils/parsers/rst/directives/body.py
trunk/docutils/docutils/parsers/rst/directives/misc.py
trunk/docutils/docutils/parsers/rst/directives/tables.py
trunk/docutils/docutils/parsers/rst/languages/af.py
trunk/docutils/docutils/parsers/rst/languages/ar.py
trunk/docutils/docutils/parsers/rst/languages/ca.py
trunk/docutils/docutils/parsers/rst/languages/cs.py
trunk/docutils/docutils/parsers/rst/languages/da.py
trunk/docutils/docutils/parsers/rst/languages/de.py
trunk/docutils/docutils/parsers/rst/languages/eo.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/fr.py
trunk/docutils/docutils/parsers/rst/languages/gl.py
trunk/docutils/docutils/parsers/rst/languages/he.py
trunk/docutils/docutils/parsers/rst/languages/it.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/nl.py
trunk/docutils/docutils/parsers/rst/languages/pl.py
trunk/docutils/docutils/parsers/rst/languages/pt_br.py
trunk/docutils/docutils/parsers/rst/languages/ru.py
trunk/docutils/docutils/parsers/rst/languages/sk.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/parsers/rst/states.py
trunk/docutils/docutils/statemachine.py
trunk/docutils/docutils/transforms/parts.py
trunk/docutils/docutils/transforms/references.py
trunk/docutils/docutils/utils/__init__.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/math/unichar2tex.py
trunk/docutils/docutils/utils/smartquotes.py
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/html4css1/__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/test__init__.py
trunk/docutils/test/test_command_line.py
trunk/docutils/test/test_dependencies.py
trunk/docutils/test/test_io.py
trunk/docutils/test/test_nodes.py
trunk/docutils/test/test_parsers/test_recommonmark/test_bullet_lists.py
trunk/docutils/test/test_parsers/test_recommonmark/test_inline_markup.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_directives/test_date.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_raw.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_tables.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_unicode.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_inline_markup.py
trunk/docutils/test/test_parsers/test_rst/test_section_headers.py
trunk/docutils/test/test_parsers/test_rst/test_substitutions.py
trunk/docutils/test/test_settings.py
trunk/docutils/test/test_transforms/test_docinfo.py
trunk/docutils/test/test_transforms/test_footnotes.py
trunk/docutils/test/test_transforms/test_sectnum.py
trunk/docutils/test/test_transforms/test_smartquotes.py
trunk/docutils/test/test_transforms/test_substitutions.py
trunk/docutils/test/test_utils.py
trunk/docutils/test/test_writers/test_docutils_xml.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_misc.py
trunk/docutils/tools/rst2html5.py
Modified: trunk/docutils/docutils/core.py
===================================================================
--- trunk/docutils/docutils/core.py 2022-01-26 22:08:49 UTC (rev 8982)
+++ trunk/docutils/docutils/core.py 2022-01-26 22:09:36 UTC (rev 8983)
@@ -262,14 +262,14 @@
elif isinstance(error, UnicodeEncodeError):
self.report_UnicodeError(error)
elif isinstance(error, io.InputError):
- self._stderr.write(u'Unable to open source file for reading:\n'
- u' %s\n' % io.error_string(error))
+ self._stderr.write('Unable to open source file for reading:\n'
+ ' %s\n' % io.error_string(error))
elif isinstance(error, io.OutputError):
self._stderr.write(
- u'Unable to open destination file for writing:\n'
- u' %s\n' % io.error_string(error))
+ 'Unable to open destination file for writing:\n'
+ ' %s\n' % io.error_string(error))
else:
- print(u'%s' % io.error_string(error), file=self._stderr)
+ print('%s' % io.error_string(error), file=self._stderr)
print(("""\
Exiting due to error. Use "--traceback" to diagnose.
Please report errors to <doc...@li...>.
Modified: trunk/docutils/docutils/frontend.py
===================================================================
--- trunk/docutils/docutils/frontend.py 2022-01-26 22:08:49 UTC (rev 8982)
+++ trunk/docutils/docutils/frontend.py 2022-01-26 22:09:36 UTC (rev 8983)
@@ -172,7 +172,7 @@
# this function is called for every option added to `value`
# -> split the last item and append the result:
last = value.pop()
- items = [i.strip(u' \t\n') for i in last.split(u',') if i.strip(u' \t\n')]
+ items = [i.strip(' \t\n') for i in last.split(',') if i.strip(' \t\n')]
value.extend(items)
return value
@@ -225,7 +225,7 @@
lc_quotes.append(item)
continue
except ValueError:
- raise ValueError(u'Invalid value "%s".'
+ raise ValueError('Invalid value "%s".'
' Format is "<language>:<quotes>".'
% item.encode('ascii', 'backslashreplace'))
# parse colon separated string list:
Modified: trunk/docutils/docutils/io.py
===================================================================
--- trunk/docutils/docutils/io.py 2022-01-26 22:08:49 UTC (rev 8982)
+++ trunk/docutils/docutils/io.py 2022-01-26 22:09:36 UTC (rev 8983)
@@ -139,7 +139,7 @@
decoded = str(data, enc, self.error_handler)
self.successful_encoding = enc
# Return decoded, removing BOMs.
- return decoded.replace(u'\ufeff', u'')
+ return decoded.replace('\ufeff', '')
except (UnicodeError, LookupError) as err:
# keep exception instance for use outside of the "for" loop.
error = err
@@ -549,7 +549,7 @@
def read(self):
"""Return a null string."""
- return u''
+ return ''
class NullOutput(Output):
Modified: trunk/docutils/docutils/languages/ar.py
===================================================================
--- trunk/docutils/docutils/languages/ar.py 2022-01-26 22:08:49 UTC (rev 8982)
+++ trunk/docutils/docutils/languages/ar.py 2022-01-26 22:09:36 UTC (rev 8983)
@@ -15,46 +15,46 @@
labels = {
# fixed: language-dependent
- u'author': u'المؤلف',
- u'authors': u'المؤلفون',
- u'organization': u'التنظيم',
- u'address': u'العنوان',
- u'contact': u'اتصل',
- u'version': u'نسخة',
- u'revision': u'مراجعة',
- u'status': u'الحالة',
- u'date': u'تاریخ',
- u'copyright': u'الحقوق',
- u'dedication': u'إهداء',
- u'abstract': u'ملخص',
- u'attention': u'تنبيه',
- u'caution': u'احتیاط',
- u'danger': u'خطر',
- u'error': u'خطأ',
- u'hint': u'تلميح',
- u'important': u'مهم',
- u'note': u'ملاحظة',
- u'tip': u'نصيحة',
- u'warning': u'تحذير',
- u'contents': u'المحتوى'}
+ 'author': 'المؤلف',
+ 'authors': 'المؤلفون',
+ 'organization': 'التنظيم',
+ 'address': 'العنوان',
+ 'contact': 'اتصل',
+ 'version': 'نسخة',
+ 'revision': 'مراجعة',
+ 'status': 'الحالة',
+ 'date': 'تاریخ',
+ 'copyright': 'الحقوق',
+ 'dedication': 'إهداء',
+ 'abstract': 'ملخص',
+ 'attention': 'تنبيه',
+ 'caution': 'احتیاط',
+ 'danger': 'خطر',
+ 'error': 'خطأ',
+ 'hint': 'تلميح',
+ 'important': 'مهم',
+ 'note': 'ملاحظة',
+ 'tip': 'نصيحة',
+ 'warning': 'تحذير',
+ 'contents': 'المحتوى'}
"""Mapping of node class name to label text."""
bibliographic_fields = {
# language-dependent: fixed
- u'مؤلف': u'author',
- u'مؤلفون': u'authors',
- u'التنظيم': u'organization',
- u'العنوان': u'address',
- u'اتصل': u'contact',
- u'نسخة': u'version',
- u'مراجعة': u'revision',
- u'الحالة': u'status',
- u'تاریخ': u'date',
- u'الحقوق': u'copyright',
- u'إهداء': u'dedication',
- u'ملخص': u'abstract'}
+ 'مؤلف': 'author',
+ 'مؤلفون': 'authors',
+ 'التنظيم': 'organization',
+ 'العنوان': 'address',
+ 'اتصل': 'contact',
+ 'نسخة': 'version',
+ 'مراجعة': 'revision',
+ 'الحالة': 'status',
+ 'تاریخ': 'date',
+ 'الحقوق': 'copyright',
+ 'إهداء': 'dedication',
+ 'ملخص': 'abstract'}
"""Arabic (lowcased) to canonical name mapping for bibliographic fields."""
-author_separators = [u'؛', u'،']
+author_separators = ['؛', '،']
"""List of separator strings for the 'Authors' bibliographic field. Tried in
order."""
Modified: trunk/docutils/docutils/languages/ca.py
===================================================================
--- trunk/docutils/docutils/languages/ca.py 2022-01-26 22:08:49 UTC (rev 8982)
+++ trunk/docutils/docutils/languages/ca.py 2022-01-26 22:09:36 UTC (rev 8983)
@@ -15,44 +15,44 @@
labels = {
# fixed: language-dependent
- 'author': u'Autor',
- 'authors': u'Autors',
- 'organization': u'Organitzaci\u00F3',
- 'address': u'Adre\u00E7a',
- 'contact': u'Contacte',
- 'version': u'Versi\u00F3',
- 'revision': u'Revisi\u00F3',
- 'status': u'Estat',
- 'date': u'Data',
- 'copyright': u'Copyright',
- 'dedication': u'Dedicat\u00F2ria',
- 'abstract': u'Resum',
- 'attention': u'Atenci\u00F3!',
- 'caution': u'Compte!',
- 'danger': u'PERILL!',
- 'error': u'Error',
- 'hint': u'Suggeriment',
- 'important': u'Important',
- 'note': u'Nota',
- 'tip': u'Consell',
- 'warning': u'Av\u00EDs',
- 'contents': u'Contingut'}
+ 'author': 'Autor',
+ 'authors': 'Autors',
+ 'organization': 'Organitzaci\u00F3',
+ 'address': 'Adre\u00E7a',
+ 'contact': 'Contacte',
+ 'version': 'Versi\u00F3',
+ 'revision': 'Revisi\u00F3',
+ 'status': 'Estat',
+ 'date': 'Data',
+ 'copyright': 'Copyright',
+ 'dedication': 'Dedicat\u00F2ria',
+ 'abstract': 'Resum',
+ 'attention': 'Atenci\u00F3!',
+ 'caution': 'Compte!',
+ 'danger': 'PERILL!',
+ 'error': 'Error',
+ 'hint': 'Suggeriment',
+ 'important': 'Important',
+ 'note': 'Nota',
+ 'tip': 'Consell',
+ 'warning': 'Av\u00EDs',
+ 'contents': 'Contingut'}
"""Mapping of node class name to label text."""
bibliographic_fields = {
# language-dependent: fixed
- u'autor': 'author',
- u'autors': 'authors',
- u'organitzaci\u00F3': 'organization',
- u'adre\u00E7a': 'address',
- u'contacte': 'contact',
- u'versi\u00F3': 'version',
- u'revisi\u00F3': 'revision',
- u'estat': 'status',
- u'data': 'date',
- u'copyright': 'copyright',
- u'dedicat\u00F2ria': 'dedication',
- u'resum': 'abstract'}
+ 'autor': 'author',
+ 'autors': 'authors',
+ 'organitzaci\u00F3': 'organization',
+ 'adre\u00E7a': 'address',
+ 'contacte': 'contact',
+ 'versi\u00F3': 'version',
+ 'revisi\u00F3': 'revision',
+ 'estat': 'status',
+ 'data': 'date',
+ 'copyright': 'copyright',
+ 'dedicat\u00F2ria': 'dedication',
+ 'resum': 'abstract'}
"""Catalan (lowcased) to canonical name mapping for bibliographic fields."""
author_separators = [';', ',']
Modified: trunk/docutils/docutils/languages/cs.py
===================================================================
--- trunk/docutils/docutils/languages/cs.py 2022-01-26 22:08:49 UTC (rev 8982)
+++ trunk/docutils/docutils/languages/cs.py 2022-01-26 22:09:36 UTC (rev 8983)
@@ -15,44 +15,44 @@
labels = {
# fixed: language-dependent
- 'author': u'Autor',
- 'authors': u'Auto\u0159i',
- 'organization': u'Organizace',
- 'address': u'Adresa',
- 'contact': u'Kontakt',
- 'version': u'Verze',
- 'revision': u'Revize',
- 'status': u'Stav',
- 'date': u'Datum',
- 'copyright': u'Copyright',
- 'dedication': u'V\u011Bnov\u00E1n\u00ED',
- 'abstract': u'Abstrakt',
- 'attention': u'Pozor!',
- 'caution': u'Opatrn\u011B!',
- 'danger': u'!NEBEZPE\u010C\u00CD!',
- 'error': u'Chyba',
- 'hint': u'Rada',
- 'important': u'D\u016Fle\u017Eit\u00E9',
- 'note': u'Pozn\u00E1mka',
- 'tip': u'Tip',
- 'warning': u'Varov\u00E1n\u00ED',
- 'contents': u'Obsah'}
+ 'author': 'Autor',
+ 'authors': 'Auto\u0159i',
+ 'organization': 'Organizace',
+ 'address': 'Adresa',
+ 'contact': 'Kontakt',
+ 'version': 'Verze',
+ 'revision': 'Revize',
+ 'status': 'Stav',
+ 'date': 'Datum',
+ 'copyright': 'Copyright',
+ 'dedication': 'V\u011Bnov\u00E1n\u00ED',
+ 'abstract': 'Abstrakt',
+ 'attention': 'Pozor!',
+ 'caution': 'Opatrn\u011B!',
+ 'danger': '!NEBEZPE\u010C\u00CD!',
+ 'error': 'Chyba',
+ 'hint': 'Rada',
+ 'important': 'D\u016Fle\u017Eit\u00E9',
+ 'note': 'Pozn\u00E1mka',
+ 'tip': 'Tip',
+ 'warning': 'Varov\u00E1n\u00ED',
+ 'contents': 'Obsah'}
"""Mapping of node class name to label text."""
bibliographic_fields = {
# language-dependent: fixed
- u'autor': 'author',
- u'auto\u0159i': 'authors',
- u'organizace': 'organization',
- u'adresa': 'address',
- u'kontakt': 'contact',
- u'verze': 'version',
- u'revize': 'revision',
- u'stav': 'status',
- u'datum': 'date',
- u'copyright': 'copyright',
- u'v\u011Bnov\u00E1n\u00ED': 'dedication',
- u'abstrakt': 'abstract'}
+ 'autor': 'author',
+ 'auto\u0159i': 'authors',
+ 'organizace': 'organization',
+ 'adresa': 'address',
+ 'kontakt': 'contact',
+ 'verze': 'version',
+ 'revize': 'revision',
+ 'stav': 'status',
+ 'datum': 'date',
+ 'copyright': 'copyright',
+ 'v\u011Bnov\u00E1n\u00ED': 'dedication',
+ 'abstrakt': 'abstract'}
"""Czech (lowcased) to canonical name mapping for bibliographic fields."""
author_separators = [';', ',']
Modified: trunk/docutils/docutils/languages/da.py
===================================================================
--- trunk/docutils/docutils/languages/da.py 2022-01-26 22:08:49 UTC (rev 8982)
+++ trunk/docutils/docutils/languages/da.py 2022-01-26 22:09:36 UTC (rev 8983)
@@ -15,45 +15,45 @@
labels = {
# fixed: language-dependent
- 'author': u'Forfatter',
- 'authors': u'Forfattere',
- 'organization': u'Organisation',
- 'address': u'Adresse',
- 'contact': u'Kontakt',
- 'version': u'Version',
- 'revision': u'Revision',
- 'status': u'Status',
- 'date': u'Dato',
- 'copyright': u'Copyright',
- 'dedication': u'Dedikation',
- 'abstract': u'Resumé',
- 'attention': u'Giv agt!',
- 'caution': u'Pas på!',
- 'danger': u'!FARE!',
- 'error': u'Fejl',
- 'hint': u'Vink',
- 'important': u'Vigtigt',
- 'note': u'Bemærk',
- 'tip': u'Tips',
- 'warning': u'Advarsel',
- 'contents': u'Indhold'}
+ 'author': 'Forfatter',
+ 'authors': 'Forfattere',
+ 'organization': 'Organisation',
+ 'address': 'Adresse',
+ 'contact': 'Kontakt',
+ 'version': 'Version',
+ 'revision': 'Revision',
+ 'status': 'Status',
+ 'date': 'Dato',
+ 'copyright': 'Copyright',
+ 'dedication': 'Dedikation',
+ 'abstract': 'Resumé',
+ 'attention': 'Giv agt!',
+ 'caution': 'Pas på!',
+ 'danger': '!FARE!',
+ 'error': 'Fejl',
+ 'hint': 'Vink',
+ 'important': 'Vigtigt',
+ 'note': 'Bemærk',
+ 'tip': 'Tips',
+ 'warning': 'Advarsel',
+ 'contents': 'Indhold'}
"""Mapping of node class name to label text."""
bibliographic_fields = {
# language-dependent: fixed
- u'forfatter': 'author',
- u'forfattere': 'authors',
- u'organisation': 'organization',
- u'adresse': 'address',
- u'kontakt': 'contact',
- u'version': 'version',
- u'revision': 'revision',
- u'status': 'status',
- u'dato': 'date',
- u'copyright': 'copyright',
- u'dedikation': 'dedication',
- u'resume': 'abstract',
- u'resumé': 'abstract'}
+ 'forfatter': 'author',
+ 'forfattere': 'authors',
+ 'organisation': 'organization',
+ 'adresse': 'address',
+ 'kontakt': 'contact',
+ 'version': 'version',
+ 'revision': 'revision',
+ 'status': 'status',
+ 'dato': 'date',
+ 'copyright': 'copyright',
+ 'dedikation': 'dedication',
+ 'resume': 'abstract',
+ 'resumé': 'abstract'}
"""Danish (lowcased) to canonical name mapping for bibliographic fields."""
author_separators = [';', ',']
Modified: trunk/docutils/docutils/languages/eo.py
===================================================================
--- trunk/docutils/docutils/languages/eo.py 2022-01-26 22:08:49 UTC (rev 8982)
+++ trunk/docutils/docutils/languages/eo.py 2022-01-26 22:09:36 UTC (rev 8983)
@@ -15,29 +15,29 @@
labels = {
# fixed: language-dependent
- 'author': u'A\u016dtoro',
- 'authors': u'A\u016dtoroj',
- 'organization': u'Organizo',
- 'address': u'Adreso',
- 'contact': u'Kontakto',
- 'version': u'Versio',
- 'revision': u'Revido',
- 'status': u'Stato',
- 'date': u'Dato',
- # 'copyright': u'Kopirajto',
- 'copyright': u'A\u016dtorrajto',
- 'dedication': u'Dedi\u0109o',
- 'abstract': u'Resumo',
- 'attention': u'Atentu!',
- 'caution': u'Zorgu!',
- 'danger': u'DAN\u011cERO!',
- 'error': u'Eraro',
- 'hint': u'Spuro',
- 'important': u'Grava',
- 'note': u'Noto',
- 'tip': u'Helpeto',
- 'warning': u'Averto',
- 'contents': u'Enhavo'}
+ 'author': 'A\u016dtoro',
+ 'authors': 'A\u016dtoroj',
+ 'organization': 'Organizo',
+ 'address': 'Adreso',
+ 'contact': 'Kontakto',
+ 'version': 'Versio',
+ 'revision': 'Revido',
+ 'status': 'Stato',
+ 'date': 'Dato',
+ # 'copyright': 'Kopirajto',
+ 'copyright': 'A\u016dtorrajto',
+ 'dedication': 'Dedi\u0109o',
+ 'abstract': 'Resumo',
+ 'attention': 'Atentu!',
+ 'caution': 'Zorgu!',
+ 'danger': 'DAN\u011cERO!',
+ 'error': 'Eraro',
+ 'hint': 'Spuro',
+ 'important': 'Grava',
+ 'note': 'Noto',
+ 'tip': 'Helpeto',
+ 'warning': 'Averto',
+ 'contents': 'Enhavo'}
"""Mapping of node class name to label text."""
bibliographic_fields = {
Modified: trunk/docutils/docutils/languages/es.py
===================================================================
--- trunk/docutils/docutils/languages/es.py 2022-01-26 22:08:49 UTC (rev 8982)
+++ trunk/docutils/docutils/languages/es.py 2022-01-26 22:09:36 UTC (rev 8983)
@@ -14,43 +14,43 @@
__docformat__ = 'reStructuredText'
labels = {
- 'author': u'Autor',
- 'authors': u'Autores',
- 'organization': u'Organizaci\u00f3n',
- 'address': u'Direcci\u00f3n',
- 'contact': u'Contacto',
- 'version': u'Versi\u00f3n',
- 'revision': u'Revisi\u00f3n',
- 'status': u'Estado',
- 'date': u'Fecha',
- 'copyright': u'Copyright',
- 'dedication': u'Dedicatoria',
- 'abstract': u'Resumen',
- 'attention': u'\u00a1Atenci\u00f3n!',
- 'caution': u'\u00a1Precauci\u00f3n!',
- 'danger': u'\u00a1PELIGRO!',
- 'error': u'Error',
- 'hint': u'Sugerencia',
- 'important': u'Importante',
- 'note': u'Nota',
- 'tip': u'Consejo',
- 'warning': u'Advertencia',
- 'contents': u'Contenido'}
+ 'author': 'Autor',
+ 'authors': 'Autores',
+ 'organization': 'Organizaci\u00f3n',
+ 'address': 'Direcci\u00f3n',
+ 'contact': 'Contacto',
+ 'version': 'Versi\u00f3n',
+ 'revision': 'Revisi\u00f3n',
+ 'status': 'Estado',
+ 'date': 'Fecha',
+ 'copyright': 'Copyright',
+ 'dedication': 'Dedicatoria',
+ 'abstract': 'Resumen',
+ 'attention': '\u00a1Atenci\u00f3n!',
+ 'caution': '\u00a1Precauci\u00f3n!',
+ 'danger': '\u00a1PELIGRO!',
+ 'error': 'Error',
+ 'hint': 'Sugerencia',
+ 'important': 'Importante',
+ 'note': 'Nota',
+ 'tip': 'Consejo',
+ 'warning': 'Advertencia',
+ 'contents': 'Contenido'}
"""Mapping of node class name to label text."""
bibliographic_fields = {
- u'autor': 'author',
- u'autores': 'authors',
- u'organizaci\u00f3n': 'organization',
- u'direcci\u00f3n': 'address',
- u'contacto': 'contact',
- u'versi\u00f3n': 'version',
- u'revisi\u00f3n': 'revision',
- u'estado': 'status',
- u'fecha': 'date',
- u'copyright': 'copyright',
- u'dedicatoria': 'dedication',
- u'resumen': 'abstract'}
+ 'autor': 'author',
+ 'autores': 'authors',
+ 'organizaci\u00f3n': 'organization',
+ 'direcci\u00f3n': 'address',
+ 'contacto': 'contact',
+ 'versi\u00f3n': 'version',
+ 'revisi\u00f3n': 'revision',
+ 'estado': 'status',
+ 'fecha': 'date',
+ 'copyright': 'copyright',
+ 'dedicatoria': 'dedication',
+ 'resumen': 'abstract'}
"""Spanish (lowcased) to canonical name mapping for bibliographic fields."""
author_separators = [';', ',']
Modified: trunk/docutils/docutils/languages/fa.py
===================================================================
--- trunk/docutils/docutils/languages/fa.py 2022-01-26 22:08:49 UTC (rev 8982)
+++ trunk/docutils/docutils/languages/fa.py 2022-01-26 22:09:36 UTC (rev 8983)
@@ -15,46 +15,46 @@
labels = {
# fixed: language-dependent
- u'author': u'نویسنده',
- u'authors': u'نویسندگان',
- u'organization': u'سازمان',
- u'address': u'آدرس',
- u'contact': u'تماس',
- u'version': u'نسخه',
- u'revision': u'بازبینی',
- u'status': u'وضعیت',
- u'date': u'تاریخ',
- u'copyright': u'کپیرایت',
- u'dedication': u'تخصیص',
- u'abstract': u'چکیده',
- u'attention': u'توجه!',
- u'caution': u'احتیاط!',
- u'danger': u'خطر!',
- u'error': u'خطا',
- u'hint': u'راهنما',
- u'important': u'مهم',
- u'note': u'یادداشت',
- u'tip': u'نکته',
- u'warning': u'اخطار',
- u'contents': u'محتوا'}
+ 'author': 'نویسنده',
+ 'authors': 'نویسندگان',
+ 'organization': 'سازمان',
+ 'address': 'آدرس',
+ 'contact': 'تماس',
+ 'version': 'نسخه',
+ 'revision': 'بازبینی',
+ 'status': 'وضعیت',
+ 'date': 'تاریخ',
+ 'copyright': 'کپیرایت',
+ 'dedication': 'تخصیص',
+ 'abstract': 'چکیده',
+ 'attention': 'توجه!',
+ 'caution': 'احتیاط!',
+ 'danger': 'خطر!',
+ 'error': 'خطا',
+ 'hint': 'راهنما',
+ 'important': 'مهم',
+ 'note': 'یادداشت',
+ 'tip': 'نکته',
+ 'warning': 'اخطار',
+ 'contents': 'محتوا'}
"""Mapping of node class name to label text."""
bibliographic_fields = {
# language-dependent: fixed
- u'نویسنده': u'author',
- u'نویسندگان': u'authors',
- u'سازمان': u'organization',
- u'آدرس': u'address',
- u'تماس': u'contact',
- u'نسخه': u'version',
- u'بازبینی': u'revision',
- u'وضعیت': u'status',
- u'تاریخ': u'date',
- u'کپیرایت': u'copyright',
- u'تخصیص': u'dedication',
- u'چکیده': u'abstract'}
+ 'نویسنده': 'author',
+ 'نویسندگان': 'authors',
+ 'سازمان': 'organization',
+ 'آدرس': 'address',
+ 'تماس': 'contact',
+ 'نسخه': 'version',
+ 'بازبینی': 'revision',
+ 'وضعیت': 'status',
+ 'تاریخ': 'date',
+ 'کپیرایت': 'copyright',
+ 'تخصیص': 'dedication',
+ 'چکیده': 'abstract'}
"""Persian (lowcased) to canonical name mapping for bibliographic fields."""
-author_separators = [u'؛', u'،']
+author_separators = ['؛', '،']
"""List of separator strings for the 'Authors' bibliographic field. Tried in
order."""
Modified: trunk/docutils/docutils/languages/fi.py
===================================================================
--- trunk/docutils/docutils/languages/fi.py 2022-01-26 22:08:49 UTC (rev 8982)
+++ trunk/docutils/docutils/languages/fi.py 2022-01-26 22:09:36 UTC (rev 8983)
@@ -15,44 +15,44 @@
labels = {
# fixed: language-dependent
- u'author': u'Tekij\u00e4',
- u'authors': u'Tekij\u00e4t',
- u'organization': u'Yhteis\u00f6',
- u'address': u'Osoite',
- u'contact': u'Yhteystiedot',
- u'version': u'Versio',
- u'revision': u'Vedos',
- u'status': u'Tila',
- u'date': u'P\u00e4iv\u00e4ys',
- u'copyright': u'Tekij\u00e4noikeudet',
- u'dedication': u'Omistuskirjoitus',
- u'abstract': u'Tiivistelm\u00e4',
- u'attention': u'Huomio!',
- u'caution': u'Varo!',
- u'danger': u'!VAARA!',
- u'error': u'Virhe',
- u'hint': u'Vihje',
- u'important': u'T\u00e4rke\u00e4\u00e4',
- u'note': u'Huomautus',
- u'tip': u'Neuvo',
- u'warning': u'Varoitus',
- u'contents': u'Sis\u00e4llys'}
+ 'author': 'Tekij\u00e4',
+ 'authors': 'Tekij\u00e4t',
+ 'organization': 'Yhteis\u00f6',
+ 'address': 'Osoite',
+ 'contact': 'Yhteystiedot',
+ 'version': 'Versio',
+ 'revision': 'Vedos',
+ 'status': 'Tila',
+ 'date': 'P\u00e4iv\u00e4ys',
+ 'copyright': 'Tekij\u00e4noikeudet',
+ 'dedication': 'Omistuskirjoitus',
+ 'abstract': 'Tiivistelm\u00e4',
+ 'attention': 'Huomio!',
+ 'caution': 'Varo!',
+ 'danger': '!VAARA!',
+ 'error': 'Virhe',
+ 'hint': 'Vihje',
+ 'important': 'T\u00e4rke\u00e4\u00e4',
+ 'note': 'Huomautus',
+ 'tip': 'Neuvo',
+ 'warning': 'Varoitus',
+ 'contents': 'Sis\u00e4llys'}
"""Mapping of node class name to label text."""
bibliographic_fields = {
# language-dependent: fixed
- u'tekij\u00e4': u'author',
- u'tekij\u00e4t': u'authors',
- u'yhteis\u00f6': u'organization',
- u'osoite': u'address',
- u'yhteystiedot': u'contact',
- u'versio': u'version',
- u'vedos': u'revision',
- u'tila': u'status',
- u'p\u00e4iv\u00e4ys': u'date',
- u'tekij\u00e4noikeudet': u'copyright',
- u'omistuskirjoitus': u'dedication',
- u'tiivistelm\u00e4': u'abstract'}
+ 'tekij\u00e4': 'author',
+ 'tekij\u00e4t': 'authors',
+ 'yhteis\u00f6': 'organization',
+ 'osoite': 'address',
+ 'yhteystiedot': 'contact',
+ 'versio': 'version',
+ 'vedos': 'revision',
+ 'tila': 'status',
+ 'p\u00e4iv\u00e4ys': 'date',
+ 'tekij\u00e4noikeudet': 'copyright',
+ 'omistuskirjoitus': 'dedication',
+ 'tiivistelm\u00e4': 'abstract'}
"""Finnish (lowcased) to canonical name mapping for bibliographic fields."""
author_separators = [';', ',']
Modified: trunk/docutils/docutils/languages/fr.py
===================================================================
--- trunk/docutils/docutils/languages/fr.py 2022-01-26 22:08:49 UTC (rev 8982)
+++ trunk/docutils/docutils/languages/fr.py 2022-01-26 22:09:36 UTC (rev 8983)
@@ -14,43 +14,43 @@
__docformat__ = 'reStructuredText'
label...
[truncated message content] |