.. include:: docs/header0.txt ================== Docutils History ================== :Author: David Goodger; open to all Docutils developers :Contact: docutils-develop@lists.sourceforge.net :Date: $Date$ :Revision: $Revision$ :Web site: https://docutils.sourceforge.io/ :Copyright: This document has been placed in the public domain. .. contents:: Changes since 0.20.1 ==================== * Drop support for Python 3.7 and 3.8. * Updated build stystem to use Flit_ (cf. patch #186 by Adam Turner). .. _Flit: https://github.com/pypa/flit/ * docutils/io.py - Simpler and more secure `input encoding`_ default behaviour: Do not use the locale encoding as fallback if Python is started in `UTF-8 mode`_. Stop using "latin1" as second fallback. Remove BOM (U+FEFF ZWNBSP at start of data) only if the `input_encoding`_ configuration setting is None, '', 'utf-8-sig', 'utf-16', or 'utf-32'. Do not remove other ZWNBSPs. - Auto-close `FileInput.source` in case of reading/decoding errors. .. _UTF-8 mode: https://docs.python.org/3/library/os.html#utf8-mode .. _input encoding: docs/api/publisher.html#encodings * docutils/languages/, docutils/parsers/rst/languages/ - Mark/Fix mistranslated localizations of the "admonition" directive name. In Docutils, "admonition" is used as a generic term for "advice"/"advisory"/"remark", not a reprimand. - Add support for Georgian language (patch #204 by Temuri Doghonadze). * docutils/nodes.py - Remove compatibility hacks `nodes.reprunicode` and `nodes.ensure_str()`. * docutils/parsers/rst/directives/tables.py - Use the same CSV format for the ``:header:`` option and the main data of the "csv-table" directive. - Move `parsers.rst.directives.Table.process_header_option()` to `parsers.rst.directives.CSVTable`. * docutils/utils/roman.py - Update to version `1.4 `__. Fixes feature-requests:#95 (license is now ZPL 2.1). * docutils/writers/latex2e/__init__.py - Fix placement of hyperlink target (label) for tables (bug #440). * docutils/writers/manpage.py - Apply literal block patch #205. Use ``.EE`` and ``.EX`` macros. Thanks to G. Branden Robinson (I assume). * docutils/writers/odf_odt/__init__.py - Use context manager for image reading operations. Catch `URLError` when `urllib.request.urlopen()` fails. - Convert image URI to path if accessing a local file. Fixes bug #153. * docutils/writers/s5_html/__init__.py - Warn if the S5 writer cannot copy the theme files. - Programmatic customization of "theme_url__" setting no longer overridden by the default for "theme__". __ docs/user/config.html#theme-url __ docs/user/config.html#theme * docutils/writers/_html_base.py - Stop setting the "footnote-reference" class value for footnote references. Since 0.18, you can use the CSS selector ``[role="doc-noteref"]``. - Support reading/embedding images with "file:" URIs. - Warn, if image scaling fails because the image file cannot be read. Release 0.20.1 (2023-05-17) =========================== * docutils/MANIFEST.in - Include tox.ini and docutils.conf in the source package (cf. bug #467 and bug #461). * tools/rst2odt_prepstyles.py - Moved to ``docutils/writers/odf_odt/prepstyles.py``. Replaced with a provisional backwards compatibility script. Release 0.20 (2023-05-09) ========================= * General - Docutils 0.20 is the last version supporting Python 3.7 and 3.8. - Support Python 3.11 (patch #198 by Hugo van Kemenade). * docutils/core.py - New functions `rst2…()` for use as "console_scripts" `entry points`_. (cf. `Future changes` in the RELEASE-NOTES_). * docutils/frontend.py - New configuration setting "output_". Obsoletes the ```` positional argument (cf. `Future changes` in the RELEASE-NOTES_). * docutils/languages/ docutils/parsers/rst/languages/ - Support Ukrainian. Patch by Dmytro Kazanzhy. * docutils/nodes.py - Fix `previous_sibling()` method that led to invalid HTML in some cases (cf. patch #195). - Fix bug #463. Spurious comma in deprecation warning. * docutils/parsers/recommonmark_wrapper.py - Improved mock Sphinx module. * docutils/transforms/__init__.py - `Transformer.populate_from_components()` now silently ignores components that are not instances of `docutils.TransformSpec`. * docutils/transforms/frontmatter.py - Accept author names with initials like ``A. Einstein`` in the "author" `bibliographic field`_ instead of rising an error (generally, such names are `parsed as enumerated list`__). .. _bibliographic field: docs/ref/rst/restructuredtext.html#bibliographic-fields __ docs/ref/rst/restructuredtext.html#enumerated-lists * docutils/transforms/references.py - `DanglingReferences` ignores `citation_reference` nodes if the "use_bibex" setting is active. (In this case, citations are provided by LaTeX/BibTeX.) Fixes bug #384. * docutils/utils/__init__.py - New utility function `xml_declaration()`. - `DependencyList.add()` accepts `pathlib.Path` instances. - `find_file_in_dirs()` now returns a POSIX path also on Windows; `get_stylesheet_list()` no longer converts ``\`` to ``/``. * docutils/utils/math/latex2mathml.py - Support "mod" notation for modulo operation / modulus arithmetic. * docutils/utils/math/tex2mathml_extern.py - Support `Pandoc` as alternative LaTeX to MathML converter. Patch by Ximin Luo. * docutils/writers/_html_base.py - Refactoring of `HTMLTranslator` initialization and collecting of document "parts". Adapt HTML writers importing `_html_base`. Changes to the HTML output (no space character before closing tag of XML declaration, order of metadata elements) don't affect the HTML semantics, styling, and rendering. - Wrap definition lists with "details" class argument in a
with the "id" and "class" values of the list node. - Use dpub-ARIA role "doc-footnote__" (instead of ARIA role "note") for footnotes. __ https://www.w3.org/TR/dpub-aria-1.1/#doc-footnote * docutils/writers/latex2e/__init__.py - Do not load the `inputenc` package in UTF-8 encoded LaTeX sources. (UTF-8 is the default encoding for LaTeX2e since 2018). - Fix behaviour of the use_bibtex_ setting. - Outsource parts of `depart_document()` to new auxiliary methods `make_title()` and `append_bibliography()`. - Ensure POSIX paths in stylesheet loading macros. * docutils/writers/latex2e/titlepage.tex - Drop ``\usepackage{fixltx2e}`` from template. (Obsolete since 2015 and dropped from other templates in Docutils 0.14.) * docutils/writers/manpage.py - Do not output empty "manual" in ``.TH``. * docutils/writers/xetex/__init__.py - Ignore settings in the [latex2e writer] configuration file section. Place common settings in section [latex writers]. * setup.py - Fix SetuptoolsDeprecationWarning: ``Installing '' as data is deprecated`` by adding data directories to package_data.packages list. * tox.ini - Extracted flake8 configuration and moved to ``.flake8``. - changedir to directory ``test`` to avoid path problems. * test/ - Refactored tests to use common `unittest` idioms. Fixes errors when running the test suite with ``python -m unittest`` or external test frameworks, such as Pytest_. .. _pytest: https://pypi.org/project/pytest/ * test/coverage.sh - Removed. Use the coverage.py_ project instead, ``coverage run test/alltests.py`` and ``coverage report``. .. _coverage.py: https://pypi.org/project/coverage/ * tools/ - Moved ``quicktest.py`` to ``tools/dev/``. Release 0.19 (2022-07-05) ========================= * General - Dropped support for Python 2.7, 3.5, and 3.6. and removed compatibility hacks from code and tests. - Code cleanup, check PEP 8 conformity with `flake8` (exceptions in file tox.ini). * docutils/__main__.py - New module. Support for ``python -m docutils``. Also used for the ``docutils`` console script `entry point`_. * docutils/core.py - Let `Publisher.publish()` print info and prompt when waiting for input from a terminal (cf. https://clig.dev/#interactivity). - Respect `input_encoding_error_handler`_ setting when opening a source. * docutils/io.py - New function `error_string()` obsoletes `utils.error_reporting.ErrorString`. - Class `ErrorOutput` moved here from `utils.error_reporting` module. - Use "utf-8-sig" instead of Python's default encoding if the `input_encoding`_ setting is None. - Fix error when reading of UTF-16 encoded source without trailing newline. - Suppress deprecation warning (fixes bug #464). * docutils/parsers/__init__.py - Aliases "markdown" and "commonmark" point to "commonmark_wrapper". - Alias for the "myst" parser (https://pypi.org/project/myst-docutils). - Use absolute module names in `_parser_aliases` instead of two import attempts. (Keeps details if the `recommonmark_wrapper` module raises an `ImportError`.) - Prepend parser name to `ImportError` if importing a parser class fails. * docutils/parsers/commonmark_wrapper.py - New module for parsing CommonMark input. Selects a locally installed 3rd-party parser (`pycmark`, `myst`, or `recommonmark`). * docutils/parsers/recommonmark_wrapper.py - 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 * docutils/parsers/rst/__init__.py - Update PEP base URL (fixes bug #445), use "https:" scheme in RFC base URL. - Add `reporter` to `Directive` class attributes. * docutils/parsers/rst/directives/__init__.py - `parser_name()` keeps details if converting `ImportError` to `ValueError`. * docutils/parsers/rst/roles.py - Don't use mutable default values for function arguments. Fixes bug #430. * docutils/transforms/universal.py - Fix bug #435: invalid references in `problematic` nodes with report_level=4. * docutils/utils/__init__.py - `decode_path()` returns `str` instance instead of `nodes.reprunicode`. * docutils/utils/error_reporting.py - Add deprecation warning. * docutils/writers/_html_base.py - Add "html writers" to `config_section_dependencies`. Fixes bug #443. - Write table column widths with 3 digits precision. Fixes bug #444. * docutils/writers/html5_polyglot/__init__.py - Add space before "charset" meta tag closing sequence. - Remove class value "controls" from an `image` node with video content after converting it to a "control" attribute of the