14
0

11 Commits

Author SHA256 Message Date
1ff453ab4d Accepting request 1315965 from devel:languages:python
- Update to 0.22.3:
  - docutils/parsers/rst/directives/body.py, docutils/parsers/rst/directives/parts.py
        Do not flag uncategorized, auxiliary elements
        like sphinx.addnodes.only when testing for
        invalid parents of topics or sidebars (cf.
        https://github.com/sphinx-doc/sphinx/issues/14002).
  - docutils/parsers/rst/states.py
        More informative error messages when a substitution
        definition contains problematic or not supported content.
        Ignore combining characters when extracting a grid table block
  - docutils/parsers/rst/tableparser.py
        Ignore combining characters when parsing the grid table
        structure. Fixes bugs #128 and #512.
  - docutils/statemachine.py
        Fix handling of combining characters when extracting
        2d-block.
- Update to 0.22.2:
  - Remove a spurious vim .swp-file to fix bug #513.
- Update to 0.22.1:
  - Only documentation fixes.
    docutils/frontend.py, docutils/writers/
        More consistent and concise command line help.
    docutils/nodes.py
      - nodes.Element.section_hierarchy() now returns only
        elements with non-empty "parent" attribute.
    docutils/parsers/rst/states.py
      - Relax "section title" system messages from SEVERE to
        ERROR.
      - Fix behaviour with nested parsing into a detached node
        (cf. bugs #508 and #509).
      - New attribute NestedStateMachine.parent_state_machine.
        Use case: update the "current node" of parent state
        machine(s) after nested parsing.
      - Better error messages for grid table markup errors (bug
        #504), based on patch #214 by Jynn Nelson.
    docutils/transforms/references.py
      - Better error reports for hyperlinks with embedded URI or
        alias.
    docutils/writers/latex2e/__init__.py
      - Add cross-reference anchors (\phantomsection\label{...})
        for elements with IDs (fixes bug #503).
      - Fix cross-reference anchor placement in figures, images,
        literal-blocks, tables, and (sub)titles.
      - Simplify code for images nested in reference or figure
        elements.
- Update to 0.22.0:
    General
      - We have started to add type hints to Docutils
        (feature-request #87).
      - This will be a complex programme of work and as such, for
        the time being, these type hints are "provisional" and
        should not be relied upon.
      - By default, the Python interpreter treats type hints as
        annotations. Python >= 3.10 is required with active type
        hints (typing.TYPE_CHECKING == True).
    docs/ref/docutils.dtd
      - Allow multiple <term> elements in a
        <definition_list_item>. Fixes feature-request #60
      - The first element in a <figure> may also be a <reference>
        (with nested "clickable" <image>).
    docutils/core.py
      - Removed Publisher.setup_option_parser() (internal,
        obsolete).
      - Allow a string value (component name or alias) in
        the "reader", "parser", and "writer" arguments of
        Publisher.__init__() and the publish_*() convenience
        functions.
    docutils/frontend.py
      - Drop short options -i and -o for --input-encoding and
        --output-encoding.
      - Change the default input encoding from None (auto-detect)
        to "utf-8".
      - Change the default value of the root_prefix setting to
        the empty string (no change to the behaviour).
    docutils/io.py
      - Change the default input encoding from None (auto-detect)
        to "utf-8".
    docutils/nodes.py
      - Raise TypeError if the "rawsource" argument in
        Element.__init__() is an Element instance. Catches errors
        like nodes.hint(nodes.paragraph()).
      - New element category classes SubStructural and
        PureTextElement.
      - Fix element categories.
      - New method Element.validate(): raise
        nodes.ValidationError if the element does not comply with
        the "Docutils Document Model". Provisional.
      - New "attribute validating functions" convert string
        representations to correct data type, normalize values,
        and raise ValueError for invalid attribute names or
        values.
      - New function parse_measure().
      - Removed Element.set_class().
      - Downgrade "duplicate ID" message level from SERIOUS to
        ERROR.
      - Fix recursion in Element.get_language_code().
      - Do not insert <system_message> elements for duplicate
        explicit targets if this results in an invalid doctree
        (cf. bug #489).
      - Don't include a "backlink" reference in system messages,
        if the referenced element is an external target (not
        visible in the output).
      - Don't invalidate indirect targets with duplicate name,
        if they refer to the same refname (similar to external
        targets refering to the same URI).
    docutils/parsers/docutils_xml.py
      - New parser for Docutils XML sources. Provisional.
    docutils/parsers/recommonmark_wrapper.py
      - New method Parser.finish_parse() to clean up (before
        validating).
    docutils/parsers/rst/languages/
      - Remove mistranslations of the "admonition" directive
        name.
    docutils/parsers/rst/languages/en.py
      - Add alias "rst-class" for the "class" directive to
        improve the compatibility with Sphinx.
    docutils/parsers/rst/directives/__init__.py
      - Support CSS3 length units. Fixes feature-request #57.
    docutils/parsers/rst/directives/images.py
      - New option "figname" for the "figure" directive. Fixes
        feature-request #44.
    docutils/parsers/rst/directives/misc.py
      - Pass the included file's path to the parser when the
        "include" directive is used with :parser: option. Enables
        system messages with correct source/line info.
      - Pass default settings to custom parser for included file.
    docutils/parsers/rst/directives/references.py
      - Remove "name" from TargetNotes.option_spec. The
        "target-notes" directive generates one footnote element
        per external target but "name" must be unique across the
        document. So far, the name was silently dropped.
    docutils/parsers/rst/directives/tables.py
      - Removed CSVTable.decode_from_csv() and
        CSVTable.encode_from_csv(). Not required with Python 3.
    docutils/parsers/rst/roles.py
      - Renamed normalized_role_options() to normalize_options()
        (it is now also used for directive options).
    docutils/parsers/rst/states.py
      - Raise warning for empty footnotes and citations.
      - Add source and line info to <enumerated-list> elements.
        Fix line number of "start value not ordinal-1" INFO
        message.
      - Change section handling to not rely on exceptions and
        reparsing. Based on patch #213 by Arne Skjærholt. Fixes
        bug #346 (duplicate System Messages).
      - Use types.SimpleNamespace instead of a local definition
        for the auxilliary class states.Struct.
      - Warn about duplicate name in references with embedded
        internal targets. Fixes bug #502.
      - "Downgrade" targets generated from hyperlink references
        with embedded URI or alias from explicit to implicit (cf.
        bug #502).
    docutils/readers/__init__.py:
      - Deprecate "parser_name" argument of Reader.__init__().
    docutils/transforms/frontmatter.py
      - Update DocInfo to work with corrected element categories.
    docutils/transforms/misc.py:
      - Fix for misc.Transitions: report an error if a
        <transition> element follows a <meta> or <decoration>
        element as this is invalid according to docutils.dtd.
    docutils/transforms/references.py
      - Make AnonymousHyperlinks transform idempotent.
      - New transform CitationReferences. Marks
        citation_references as resolved if BibTeX is used by the
        backend (LaTeX).
    docutils/transforms/writer_aux.py
      - Removed Compound transform.
    docutils/transforms/universal.py
      - Messages transform now also handles "loose" system
        messages generated by the parser.
    docutils/utils/__init__.py
      - Removed Reporter.set_conditions(). Set attributes via
        configuration settings or directly.
    docutils/utils/_roman_numerals.py
      - New implementation or Roman numeral support. Replaces the
        local copy of the roman.py package.
    docutils/utils/error_reporting.py
      - Removed. Obsolete in Python 3.
    docutils/writers/docutils-xml.py
      - Do not increase indentation of follow-up lines inside
        inline elements. when formatting with indents.
    docutils/writers/__init__.py
      - New base class writers.DoctreeTranslator with auxiliary
        method uri2path().
    docutils/writers/_html_base.py
      - Make MathML the default math_output.
      - Revise image size handling methods, use "width" and
        "height" attributes for unitless values.
      - Add "px" to unitless table "width" values.
      - Fix error when determining the document metadata title
        from the source path and the internal source attribute is
        None.
    docutils/writers/html4css1/__init__.py
      - Keep default math_output value "HTML math.css".
      - Add "px" to unitless table "width" values.
    docutils/writers/latex2e/__init__.py
      - LaTeXTranslator.to_latex_length(): Handle CSS3 length
        units. Remove optional argument pxunit (ignored since at
        least 2012). Drop trailing zeroes from length values.
        Move XeTeX-specific code to the "xetex" writer.
      - Don't wrap references with custom reference-label in a
        \hyperref command.
      - Mark the main language when loading "babel".
      - Provide an "unknown_references_resolver" (cf.
        docutils/TransformSpec) for citation references resolved
        with BibTeX (cf. use_bibtex setting).
      - Support SVG image inclusion with the "svg" LaTeX package
        (see the stylesheet configuration setting). Solves
        feature-request #83
      - Add "template" to the parts returned by
        Writer.assemble_parts().
      - Use standard dict for LaTeXTranslator.requirements and
        LaTeXTranslator.fallbacks.
      - Use <document> "title" attribute in pdfinfo.
      - Encode <meta> element content in pdfinfo.
      - Improve formatting of docinfo fields.
      - LaTeXTranslator.pop_output_collector() now returns the
        popped list.
      - Replace Writer.bibtex_reference_resolver() with a
        transform.
      - LaTeXTranslator.visit_inline() now inserts labels for the
        node's IDs.
      - Disable footnote handling by the "hyperref" LaTeX package
        (Docutils' \DUfootnotemark and \DUfootnotetext macros
        implement hyperlinks and backlinks). Avoids "empty
        anchor" warnings.
      - Fix target position and re-style system messages.
      - Don't merge paragraphs if there is a target between them.
    docutils/writers/latex2e/docutils.sty
      - Replace use of \ifthenelse{\isundefined... (from
        "ifthen.sty") with the eTeX primitive \ifdefined.
      - Add macros to emulate CSS3 length units unknown to LaTeX.
    docutils/writers/manpage.py
      - Remove code for unused emdash bullets.
      - Print Docutils version in header comment (feature-request
        #105).
      - Stop converting text to full capitals (bug #481).
      - Fix reference output (bug #497).
      - Use macros .UR/.UE for hyperlink references unless the
        new configuration setting text_references is True. The
        current default is True (text references), it will change
        to False (macro references) in Docutils 1.0.
      - Do not drop text of internal targets.
    docutils/writers/null.py
      - null.Writer.translate() sets self.output to the empty
        string.
    docutils/writers/odf_odt/__init__.py
      - Use "px" as fallback unit for unitless image size
        attributes.
      - Fix conversion factor of "pc" (pica) to "cm".
      - Fix conversion of image width in "%" if the height is
        specified.
      - Adjust fallback DPI value (currently not used) to match
        CSS units.
      - Fix errors with *.xml style files (bug #494).
      - Use <document> "title" attribute in document metadata.
    pyproject.toml
      - Add tox.ini to the "include" list (fixes bug #486).
    tools/rst2odt.py
      - Use core.publish_file() instead of
        core.publish_file_to_binary().
    tools/rst2odt_prepstyles.py
      - Removed. Use python -m
        docutils.writers.odf_odt.prepstyles.
- fix alternatives
- Use libalternatives instead of update-alternatives, bsc#1235783
- Update to 0.21.2:
  * General:
    + Drop support for Python 3.7 and 3.8.
    + Provide rst2* "console_scripts" entry points (without the .py
      extension) instead of installing the rst2*.py front end tools in the
      binary PATH.
    + Use docutils --reader=pep --writer=pep_html for a PEP preview.
    + Use python -m docutils.writers.odf_odt.prepstyles to strip the page
      size from an ODT writer stylesheet.
    + Use the same CSV format for the :header: option and the main data of
      the "csv-table" directive.
    + New option "loading" for the "image" directive. Sets the new attribute
      loading of the <image> doctree element.
  * Configuration changes:
    + New configuration setting root_prefix. Configurable root directory
      for included files.
    + New configuration setting sources for the "buildhtml.py" application.
    + 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.
- Fix update-alternatives updates: docutils is the master but
  rst2html from old installations can create update failures
- Fix bytecode cache errors: Don't modify python scripts after
  install
- Drop obsolete Requires & BuildRequires on python-packaging & python-xml
- Update to 0.20.1:
  * Include tox.ini and docutils.conf in the source package
  * Docutils 0.20 is the last version supporting Python 3.7 and 3.8.
  * Support Python 3.11 (patch #198 by Hugo van Kemenade).
  * New functions `rst2…()` for use as "console_scripts" `entry points`_.
  * Fix `previous_sibling()` method that led to invalid HTML in some cases
  * Fix bug #463. Spurious comma in deprecation warning.
  * Improved mock Sphinx module.
  * `Transformer.populate_from_components()` now silently ignores
    components that are not instances of `docutils.TransformSpec`.
  * Accept author names with initials like ``A. Einstein`` in the "author"
    `bibliographic field`_ instead of rising an error
  * `DanglingReferences` ignores `citation_reference` nodes if the
    "use_bibex" setting is active.
  * New utility function `xml_declaration()`.
  * `DependencyList.add()` accepts `pathlib.Path` instances.
  * Support "mod" notation for modulo operation / modulus arithmetic.
  * Wrap definition lists with "details" class argument in a <div>
    with the "id" and "class" values of the list node.
  * Use dpub-ARIA role "doc-footnote__" (instead of ARIA role "note")
    for footnotes.
  * 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()`.
  * Drop ``\usepackage{fixltx2e}`` from template.
  * Fix SetuptoolsDeprecationWarning: ``Installing '' as data is deprecated``
    by adding data directories to package_data.packages list.
  * Refactored tests to use common `unittest` idioms.
- Drop pygments-2.14.patch, no longer needed.
- python-roman is not actually necessary for testing.
- add sle15_python_module_pythons (jsc#PED-68)
- Update single spec from Factory
- Refactor pygments-2.14.patch to not use distutils.
- Delete sphix-6.0.0.patch
- Add pygments-2.14.patch
- The patch is related to pygments not Sphinx and the patch is updated to make
  it conditional so it work with older versions of pygments, shp#docutils#201
- Add sphinx-6.0.0.patch to fix tests for new version of sphinx.
- 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).
    - New module. Support for python -m docutils. Also used for
      the docutils console script entry point.
    - 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.
    - New function error_string() obsoletes
      utils.error_reporting.ErrorString.
    - Class ErrorOutput moved here from utils/error_reporting.
    - 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.
    - 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.py module raises an ImportError.)
    - Prepend parser name to ImportError if importing a parser
      class fails.
    - New module for parsing CommonMark input. Selects a
      locally installed 3rd-party parser (pycmark, myst, or
      recommonmark).
    - 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.
    - Update PEP base URL (fixes bug #445), use "https:" scheme
      in RFC base URL.
    - Add reporter to Directive class attributes.
    - parser_name() keeps details if converting ImportError to
      ValueError.
    - Don't use mutable default values for function
      arguments. Fixes bug #430.
    - Fix bug #435: invalid references in problematic nodes with
      report_level=4.
    - decode_path() returns str instance instead of
      nodes.reprunicode.
    - Add deprecation warning.
    - Add "html writers" to config_section_dependencies. Fixes
      bug #443.
    - Write table column widths with 3 digits precision. Fixes
      bug #444.
    - 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
      <video> tag.
    - Wrap groups of footnotes in an <aside> for easier styling.
    - Use "https:" scheme in "python_home" URL default.
    - Fix links in template.txt.
    - New "docutils" console script entry point. Fixes bug #447.
    - Always encode the log file "alltests.out" using 'utf-8'.
    - exception_data() now returns None if no exception was
      raised.
    - recommonmark_wrapper only imported if upstream parser is
      present.
    - Fix bug #436: Null char valid in CSV since Python 3.11.
    - Allow 3rd-party drop-in components for reader and parser,
      too.
    - Fix help output.
    - Actual code moved to docutils.__main__.py.
    - Options -h and --help print short usage message.
- Release 0.18.1 (2021-11-23)
    - Node.traverse() returns a list again to restore backwards
      compatibility. Fixes bug #431.
    - New method Node.findall(): like Node.traverse() but returns
      an iterator. Obsoletes Node.traverse().
    - Fix behaviour of get_stylesheet_list(): do not look up
      stylesheets given as "stylesheet" setting. Cf. bug #434.
    - Fix handling of footnote_backlinks==False (report Alan G
      Isaac).
    - Fix typo (bug #432).
    - Fix spurious output with Windows (bug #350).
    - Fix a false positive (bug #434).
- Release 0.18 (2021-10-26)
    - mark as provisional (will switch from using "optparse" to
      "argparse").
    - remove hack for the now obsolete "mod_python" Apache
      module.
    - new function get_default_settings()
    - Don't change a list while looping over it (in
      document.set_name_id_map()). Thanks to Mickey Endito.
    - Test and update to work with recommonmark version
      0.6.0. Still provisional.
    - Unfortunately, recommonmark is no longer maintained.
    - Fix bug #424 Wrong circular inclusion detection. Use a
      "magic" comment instead of line numbers to keep a log of
      recursive inclusions.
    - Use a "magic" comment to update the log of recursive
      inclusions.
    - New option `image_loading`_. Support "lazy" loading of
      images. Obsoletes "embed_images".
    - Fix spelling of option "detailed".
    - Read settings from standard configuration files.
- Release 0.18b1 (2021-10-05)
  - The default value for the "auto_id_prefix" setting changed to
    "%": auto-generated IDs use the tag name as prefix.
  - Make meta a standard Docutils doctree node. Writers may
    ignore "meta" nodes if they are not supported by the output
    format.
  - document.make_id(): Do not strip leading number and hyphen
    characters from name if the id_prefix setting is non-empty.
  - Node.traverse() returns an iterator instead of a list.
  - Removed. (Meta directive moved to misc.py.)
  - Meta directive class (moved from html.py) inserts meta
    (instead of pending) nodes.
  - Add class option to Raw directive.
  - Unify behaviour of "widths" option: check that the length of
    an integer list equals the number of table columns also for
    the "table" directive.
  - Fork from elyxer and remove code that is not required for
    math conversion.
  - Scale variable sized operators and big delimiters with CSS
  - Support more commands, fix mapping of commands to Unicode
    characters (cf. LaTeX syntax for mathematics).
  - Fix bug #244 Wrong subscript/superscript order.
  - Don't use <tt> element (deprecated in HTML5).
  - Use STIX fonts if available.
  - Fix source location (line number) for attribution
    elements. Patch by Mickey Endito.
  - Add line, source, and rawsource internal attributes for
    blockquote elements. Patch by Mickey Endito.
  - Skip system_messages when propagating targets. Fixes bug
    #425.
  - Removed unique_combinations() (obsoleted by
    itertools.combinations()).
  - Major update (fixes and support for additional commands and
    symbols). Fixes bug #407.
  - Write footnote brackets and field term colons to HTML, so
    that they are present also without CSS and when copying
    text. Adapt minimal.css.
  - Use semantic tags <aside> for footnote text, topics,
    admonitions, and system-messages and <nav> for the table of
    contents. Use <div> for citations.
  - Only specify table column widths, if the "widths" option
    is set and is not "auto" (fixes bug #426). The table_style
    setting "colwidths-grid" restores the current default.
  - Use ARIA roles to enable accessible HTML for abstract,
    dedication, the table of contents, footnote, references,
    footnotes, citations, and backlinks.
  - Use "aria-level" attribute instead of invalid tags <h7>,
    <h8>, ... for headings of deeply nested sections.
  - Do not set classes "compound-first", "compound-middle",
    or "compound-last" to elements nested in a compound. Use
    class value "backrefs" instead of "fn-backref" for a span of
    back-references.
  - Do not write class values handled by the HTML writer
    ("colwidths-auto", "colwidths-given", "colwidths-grid") to
    the output.
  - Move space character between section number and heading into
    "sectnum" span.
  - Removed attribute HTMLTranslator.topic_classes
  - Items of a definition list with class argument "details" are
    converted to details disclosure elements.
  - Overwrite methods in _html_base.HTMLTranslator that use
    HTML5 tags (details, aside, nav, ...) and attributes (role,
    aria-level).
  - The setting legacy_class_functions now defaults to
    "False". Adapt stylesheets modifying \DUadmonition and/or
    \DUtitle.
  - Apply patch #181 "Fix tocdepth when chapter/part in use" by
    John Thorvald Wodder II.
  - Fix newlines after/before ids_to_labels() (cf. patch #183).
  - Refactor/revise ToC writing.
  - Don't add \phantomsection to labels in math-blocks.
  - Improve spacing and allow customization of Docutils-generated
    table of contents.
  - New algorithm for table column widths. Fixes bug #422. New
    configuration setting legacy_column_widths.
  - Table.set_table_style() arguments changed.
  - Only write "continued on next page..." if it fits without
    making the table columns wider.
  - Table width option overrides conflicting "auto" column
    widths.
  - Fix excessive padding above sidebar titles.
  - Fix option "detailed" under Python 2.7.
  - Remove IE 6 compatibility workarounds iepngfix.htc and
    blank.gif (fixes bug #169).
  - Fix: double quotes need to be escaped on macro
    invocation. Done everywhere.
- update to 0.17.1:
  * Fix bug #406 (MathML translation of ``\mathbf``).
  * Open "docutils.sty" with encoding set to "utf8".
  * Provide fallbacks for parser config settings
    to facilitate programmatic use.
  * Installing with ``setup.py`` now requires ``setuptools``.
    Alternatively, install with `pip`_ (or "manually").
  * Use importlib.import_module() to programmatically import modules.
  * Fix bug #385: Import of language modules.
  * Arabic mappings by Shahin.
  * Fixes in Korean translation by Shinjo Park.
  * Fix error when copying `system_message` node
  * Make the sidebar's "title" argument optional
  * Make "meta" elements available for "latex" and "odt".
  * Prevent infinite inclusion loops.
  * Move non-essential styling to ``plain.css``.
  * Support "captionbelow" class value for tables.
  * Display code line numbers as pseudo-elements which are skipped
    when copying text from code blocks. Solves feature request #32.
  * Support numbered figures.
  * New optional style that adapts to different screen sizes.
  * Fix #394 fix missing new line after rubric.
  * Patch #168 fix crashing on empty citation (by Takeshi KOMIYA).
  * Fix #126 manpage title with spaces.
  * Fix #380 commandline option problem in sphinx.
  * Fix/improve metadata handling:
    fix "keyword" splitting,
    allow generic fields (stored as "Custom Properties").
    __ docs/user/config.html#detailled
  * Run python3 test like python2 against source not the build/-directory
  * New generic command line front end that allows the free selection of
    reader, parser, and writer components.
- remove pygments25.patch (upstream)
- In a world with more than one python 3 flavor, provide "docutils"
  with the default python3 provider.
  gh#openSUSE/python-rpm-macros#66
- Fix the condition to really generate the direct binaries
- Remove %python3_only and use full alternatives.
- Add patch to fix build with pygments 2.4 and newer:
  * pygments25.patch
- Update to 0.16:
  - Dropped support for Python 2.6, 3.3 and 3.4
  - Docutils now supports Python 2.7 and Python 3.5+ natively
    (without conversion by ``2to3``).
  - Keep `backslash escapes`__ in the document tree. Backslash characters in
    text are be represented by NULL characters in the ``text`` attribute of
    Doctree nodes and removed in the writing stage by the node's
    ``astext()`` method.
- Remove merged patch fix_tests_38.patch
- Add fix_tests_38.patch to overcome failing
  test_writers.test_odt.DocutilsOdtTestCase with Python 3.8.
  Also, failed as shp#docutils#161.
- Skip the tests for the flavors not being built
- update to version 0.15.2
  * Docutils 0.14.x is the last version supporting Python 2.4, 2.5,
   3.1, and 3.2.
  * reStructured text: Allow embedded colons in field list field
    names (before, tokens like :this:example: were considered ordinary text).
  * Fixed a bug with the "trim" options of the "unicode" directive.
- Add multibuild in order to avoid buildcycle with Pillow and friends
- Add optional build dependencies Pillow, Pygments and roman,
  causing 16 additonal test methods to run
- Add Recommends for Pillow, Pygments and roman
- Use %license
- Simplify test invocation
- Remove unnecessary node BR
- Remove superfluous devel dependency for noarch package
- specfile:
  * add binary rst2html4
- update to version 0.14:
  * Enable validation of Docutils XML documents against the DTD:
    Use attribute type NMTOKEN instead of REFID for the `refid` attribute
    and NMTOKENS for `backrefs`: REFID refers to an ID type instance,
    however, the `ids` attribute cannot use the ID type because `XML only
    allows one ID per Element Type`__ and doesn't support a multiple-ID
    "IDS" attribute type.
  * Added documentation for escaped whitespace in URI contexts.
  * Clarify use of Unicode character categories.
  * Added functionality: escaped whitespace in URI contexts.
  * Consistent handling of all whitespace characters in inline markup
    recognition. Fixes [ 307 ] and [ 3402314 ] (now [ 173 ]).
  * Added support for escaped whitespace in URI contexts.
  * Rework patch [ 120 ] (revert change to "Table.get_column_widths()"
    that led to problems in an application with a custom table
    directive).
  * Fix [ 320 ] Russian docinfo fields not recognized.
  * Don't add a second ID to problematic references.
  * Fix SmartQuotes: warn only once if language is unsupported, keep
    "rawsource" when "educating" quotes.
  * Added "split_escaped_whitespace" function, support for escaped
    whitespace in URI contexts.
  * Fix [ 321 ] Import block might cause name error.
  * Update quote definitions for languages et, fi, fr, ro, sv, tr, uk.
  * New quote definitions for hr, hsb, hu, lv, sh, sl, sr.
  * Fix [ 313 ] Differentiate apostrophe from closing single quote (if
    possible).
  * Fix [ 317 ] Extra space inserted with French smartquotes.
  * Add command line interface for stand-alone use (requires 2.7).
  * Provide default title in metadata (required by HTML5).
  * Fix [ 312 ] HTML writer generates invalid HTML if the table has
    two tags.
  * Fix [ 319 ] The MathJax CDN shut down on April 30, 2017. For
    security reasons, we don't use a third party public installation as default but
    warn if math-output_ is set to MathJax without specifying a URL.
  * Apply [ 125 ] HTML writer: respect automatic table column sizing.
  * Handle class arguments for block-level elements by wrapping them
    in a "DUclass" environment. This replaces the special handling for
    "epigraph" and "topic" elements.
  * Apply [ 141 ] Handling inline in manpage writer.
  * Command setting "language" now sets the default language of the
    generated ODF document.
  * The use of image directive options :width: (%), :scale:, etc now
    set the width/height/size of images in the generated ODF
    documents.
  * The heading/title of admonitions now reflects the language
    specified by the "language" setting.
  * Fixed [ 306 ] only first of multiple "image" directives with the
    same URL shown in output.
  * Fixed [ 282 ] python3: AttributeError.
  * tools/rst2html4.py: New front-end.
  * tools/dev/generate_punctuation_chars.py: New skript to test and
    update utils.punctuation_chars.
- only emit rst2html5 alternatives for python 3
- switch the "docutils" provides to the python 3 package (all the comands live there)
  (this fixes bsc#1039394)
- Make only the python2 package provide the "docutils" package.
- Fix url
- Executables are python-independent so only have the python3
  version provide them.
- Implement update-alternatives to avoid conflict with rst2html5
- Converted to single-spec
- Added python-docutils-rpmlintrc
- update to 0.13.1:
  * New HTML writer generating HTML 5.
  * languages: persian/farsi (fa) and latvian (la) mappings.
  * change default base url for :rfc: to http://tools.ietf.org/html/
  latex2e: Fix admonition width, remove deprecated options,
  better tablewidth auto, ...
- Fix update-alternatives implementation.
- fix bashisms in pre script
- Update to 0.12
  * docs/ref/rst/directives.txt
    - Update "math" and "csv-table" descriptions.
  * docutils/parsers/rst/directives/images.py
    - Fix [258] figwidth="image" generates unitless width value.
  * docutils/parsers/rst/states.py
    - Improve error report when a non-ASCII character is specified as
        delimiter, quote or escape character under Python 2.
        Fixes [ 249 ] and [ 250 ].
  * docutils/writers/html4css1/__init__.py
    - Don't add newline after inline math.
        Thanks to Yury G. Kudryashov for the patch.
  * docutils/writers/latex2e/__init__.py
    - Fix [ 239 ] Latex writer glues paragraphs with figure floats.
    - Apply [ 116 ] by Kirill Smelkov. Don't hardcode \large for subtitle.
  * docutils/writers/odf_odt/__init__.py
    - Apply patch by Jakub Wilk to fix bug [ 100 ].
  * test/test_error_reporting.py
    - Fix [ 223 ] by removing redundant tests we do not have control over.
  * test/test_nodes.py
    - Apply [ 115 ] respect fixed 2to3 string literal conversion behavior.
- Update to 0.11
  * Fix for the overwritting of document attributes.
  * Support embedded aliases within hyperlink references.
  * try local import of docutils components (reader, writer, parser,
    language module) before global search.
  * Python 3.3 checks CVS syntax only if "strict" is True.
  * Now, it is easy to add a custom stylesheet to Docutils' default
    stylesheet with, e.g.,
        --stylesheet_path='html4css1.css, mystyle.css'
  * If there is a file html4css1.css in the working directory of the
    process at launch, it is used instead of the one provided by
    Docutils in the writer source directory.
  * New default for math-output: HTML math.css.
  * Avoid repeated class declarations in html4css1 writer
  * Drop the simple algorithm replacing straight double quotes with
    English typographic ones. Activate the SmartQuotes transform if
    you want this feature.
  * New setting stylesheet_dirs: Comma-separated list of directories
    where stylesheets are found. Used by stylesheet_path when
    expanding relative path arguments.
  * handle lines starting with a period.
  * Fix option separating comma was bold (thanks to Bill Morris).
- Use pypi url and download
- Replace rpmlint-non-executable-scripts.diff with sed in the spec
  file
- Fix the symlink creation.
- Drop r7486-python33-compat.patch as it is not needed.
- Use update-alternatives to allow switching between py2 and py3
  version of doctool binaries.
- update to 0.10:
  - add rpmlint-non-executable-scripts.diff
  * SmartQuotes transform for typographic quotes and dashes.
  * FileInput/FileOutput: no system-exit on IOError. The handle_io_errors option is ignored.
  * <code> tag for inline "code", do not drop nested inline nodes (syntax highlight tokens).
  * Customizable MathJax URL (based on patch by Dmitry Shachnev).
  * No line break after opening inline math tag.
- Run testsuite
- Correctly fix non-excutable script warning
- Remove outdated macros
- Also remove "*.py" ending in egg-info files
- patch from upstream for python3.3 support
 * Fix [3541369] Relative __import__ also with Python 3.3
- Update to version 0.9:
  * reStructuredText "code" role and directive with syntax
    highlighting by Pygments_.
  * "code" option of the "include" directive.
  * Fix [ 3402314 ] allow non-ASCII whitespace, punctuation
    characters and "international" quotes around inline markup.
  * Fix handling of missing stylesheets.
  * Fix [ 2971827 ] and [ 3442827 ] extras/roman.py moved to
    docutils/utils/roman.py
  * docutils.utils is now a package (providing a place for
    sub-modules)
  * change default for `math-output` setting to MathJax
  * Support the `abbreviation` and `acronym` standard roles.
  * Record only files required to generate the LaTeX source as
    dependencies.
  * Use ``\setcounter{secnumdepth}{0}`` instead of ``*``-versions
    when suppressing LaTeX section numbering.
- Cleaned up spec files
- Fix rpmlint warnings
- license update: Python-2.0 and BSD-2-Clause and GPL-2.0+ and GPL-3.0+ and
  SUSE-Public-Domain
  tools/editors/emacs/rst.el is GPL-3.0+ - see also COPYING file
- Fix building python 3 package on openSUSE 11.4 x86_64
- Disable testsuite altogether, fails also on the bleeding_edge_* repos
- Fixed SLE_11_SP2 build by disabling the testsuite
- Fixed build:
  * python-xml is only required on SUSE
  * pyxml is required on Fedora (and RHEL)
- Don't run tests on SLE, they break the build
- Renamed to python-docutils (from docutils), also fixes rpmlint
  warning about naming policy
- Update to version 0.8.1:
  * Change last file with Apache license to BSD-2-Clause and correct copyright
    info for rst.el
  * Fix tests under py3k.
  * Clean up Babel language setting. Restores Sphinx compatibility.
- Changes from version 0.8.0:
  * Some additions to the Docutils core are released under the 2-Clause BSD
    license.
  * Handle language codes according to BCP 47.
  * If the specified langauage is not supported by Docutils, warn and fall
    back to English.
  * Math support: reStructuredText "math" role and directive, math and
    math_block doctree elements.
  * Orphaned "python" reader and "newlatex2e" writer moved to the sandbox.
  * Added lithuanian mappings.
- Changes from version 0.7.0:
  * Support SVG and SWF images
  * Generate valid XHTML for centered images with targets. Use CSS classes
    instead of "align" tags for image alignment.
  * Preserve runs of spaces in 'inline literals'.
  * Deprecate figure_footnotes setting.
  * Rename use_latex_footnotes setting to docutils_footnotes.
  * New latex_preamble setting.
  * Use PDF standard fonts (Times/Helvetica/Courier) as default.
  * hyperref package called with unicode option
  * Drop the special output_encoding default ("latin-1"). The Docutils wide
    default (usually "UTF-8") is used instead.
- Spec file cleanup:
  * Removed outdated docutils-0.6-insecure-temp.patch
  * Fixed non-executable scripts rpmlint warning
  * Removed ".py" ending from executables in /usr/bin, this is what
    other Python packages expect anyway
- Remove redundant tags/sections from specfile
  (cf. packaging guidelines)
- reduce rpmlint complaints:
  * name in summary
  * executables in doc package ('tools' folder)
- update to 0.6
  * support for SVG and SWF images in HTML writer
  * many improvements in LaTeX2e writer
- re-generated spec file with py2pack
  * now builds for Fedora and Mandriva
- update to 0.6
  * scaling figures/images by percents
  * many improvements in LaTeX2e writer
- fixed insecure usage of temp files in emacs mode
  (bnc#564366)
- build as noarch on new distros
- update to 0.5
  * added hebrew mappings
  * configuration is now in UTF-8
  * minor fixes and refactoring
- updated to reflect python changes due to #149809
- converted neededforbuild to BuildRequires
- update to 0.4
- update to 0.3.9
- update to 0.3.7
- update to 0.3.5
- updated to 0.3.3-alpha
- corrected python dependency
- initial version (CVS from 2004-02-10)

OBS-URL: https://build.opensuse.org/request/show/1315965
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-docutils?expand=0&rev=44
2025-11-07 17:20:53 +00:00
f24813225f - Update to 0.22.3:
- docutils/parsers/rst/directives/body.py, docutils/parsers/rst/directives/parts.py
        Do not flag uncategorized, auxiliary elements
        like sphinx.addnodes.only when testing for
        invalid parents of topics or sidebars (cf.
        https://github.com/sphinx-doc/sphinx/issues/14002).
  - docutils/parsers/rst/states.py
        More informative error messages when a substitution
        definition contains problematic or not supported content.
        Ignore combining characters when extracting a grid table block
  - docutils/parsers/rst/tableparser.py
        Ignore combining characters when parsing the grid table
        structure. Fixes bugs #128 and #512.
  - docutils/statemachine.py
        Fix handling of combining characters when extracting
        2d-block.
- Refactor pygments-2.14.patch to not use distutils.
  * reStructured text: Allow embedded colons in field list field
  * try local import of docutils components (reader, writer, parser,
  * Now, it is easy to add a custom stylesheet to Docutils' default
    stylesheet with, e.g.,
    English typographic ones. Activate the SmartQuotes transform if
    where stylesheets are found. Used by stylesheet_path when
- Replace rpmlint-non-executable-scripts.diff with sed in the spec
 * Fix [3541369] Relative __import__ also with Python 3.3
  * reStructuredText "code" role and directive with syntax
  * Fix [ 3402314 ] allow non-ASCII whitespace, punctuation
  * Fix [ 2971827 ] and [ 3442827 ] extras/roman.py moved to
  * docutils.utils is now a package (providing a place for
  * Record only files required to generate the LaTeX source as

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=103
2025-11-06 09:24:22 +00:00
d734152c19 Accepting request 1306483 from devel:languages:python
- Update to 0.22.2:
  - Remove a spurious vim .swp-file to fix bug #513.

- Update to 0.22.1:
  - Only documentation fixes.
    docutils/frontend.py, docutils/writers/
        More consistent and concise command line help.
    docutils/nodes.py
      - nodes.Element.section_hierarchy() now returns only
        elements with non-empty "parent" attribute.
    docutils/parsers/rst/states.py
      - Relax "section title" system messages from SEVERE to
        ERROR.
      - Fix behaviour with nested parsing into a detached node
        (cf. bugs #508 and #509).
      - New attribute NestedStateMachine.parent_state_machine.
        Use case: update the "current node" of parent state
        machine(s) after nested parsing.
      - Better error messages for grid table markup errors (bug
        #504), based on patch #214 by Jynn Nelson.
    docutils/transforms/references.py
      - Better error reports for hyperlinks with embedded URI or
        alias.
    docutils/writers/latex2e/__init__.py
      - Add cross-reference anchors (\phantomsection\label{...})
        for elements with IDs (fixes bug #503).
      - Fix cross-reference anchor placement in figures, images,
        literal-blocks, tables, and (sub)titles.
      - Simplify code for images nested in reference or figure
        elements.

OBS-URL: https://build.opensuse.org/request/show/1306483
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-docutils?expand=0&rev=43
2025-10-03 13:42:11 +00:00
b37e3d5ce4 Revert provides conditional to provide docutils on default package
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=101
2025-09-22 10:42:47 +00:00
12d5e863a6 - Update to 0.22.2:
- Remove a spurious vim .swp-file to fix bug #513.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=100
2025-09-22 10:27:02 +00:00
a60d48307f - Update to 0.22.1:
- Only documentation fixes.
    docutils/frontend.py, docutils/writers/
        More consistent and concise command line help.
    docutils/nodes.py
      - nodes.Element.section_hierarchy() now returns only
        elements with non-empty "parent" attribute.
    docutils/parsers/rst/states.py
      - Relax "section title" system messages from SEVERE to
        ERROR.
      - Fix behaviour with nested parsing into a detached node
        (cf. bugs #508 and #509).
      - New attribute NestedStateMachine.parent_state_machine.
        Use case: update the "current node" of parent state
        machine(s) after nested parsing.
      - Better error messages for grid table markup errors (bug
        #504), based on patch #214 by Jynn Nelson.
    docutils/transforms/references.py
      - Better error reports for hyperlinks with embedded URI or
        alias.
    docutils/writers/latex2e/__init__.py
      - Add cross-reference anchors (\phantomsection\label{...})
        for elements with IDs (fixes bug #503).
      - Fix cross-reference anchor placement in figures, images,
        literal-blocks, tables, and (sub)titles.
      - Simplify code for images nested in reference or figure
        elements.
- Update to 0.22.0:
    General
      - We have started to add type hints to Docutils

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=99
2025-09-17 20:17:24 +00:00
44475e061e Accepting request 1238443 from devel:languages:python
- Use libalternatives instead of update-alternatives, bsc#1235783

OBS-URL: https://build.opensuse.org/request/show/1238443
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-docutils?expand=0&rev=42
2025-01-17 17:37:27 +00:00
56f3db172b - fix alternatives
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=97
2025-01-17 09:01:23 +00:00
133dc52c97 - Use libalternatives instead of update-alternatives, bsc#1235783
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=96
2025-01-16 00:38:21 +00:00
f34c080de0 Accepting request 1220388 from devel:languages:python
- Update to 0.21.2:
  * General:
    + Drop support for Python 3.7 and 3.8.
    + Provide rst2* "console_scripts" entry points (without the .py
      extension) instead of installing the rst2*.py front end tools in the
      binary PATH.
    + Use docutils --reader=pep --writer=pep_html for a PEP preview.
    + Use python -m docutils.writers.odf_odt.prepstyles to strip the page
      size from an ODT writer stylesheet.
    + Use the same CSV format for the :header: option and the main data of
      the "csv-table" directive.
    + New option "loading" for the "image" directive. Sets the new attribute
      loading of the <image> doctree element.
  * Configuration changes:
    + New configuration setting root_prefix. Configurable root directory
      for included files.
    + New configuration setting sources for the "buildhtml.py" application.
    + 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.

OBS-URL: https://build.opensuse.org/request/show/1220388
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-docutils?expand=0&rev=41
2024-11-08 10:55:40 +00:00
ffedde7c57 - Update to 0.21.2:
* General:
    + Drop support for Python 3.7 and 3.8.
    + Provide rst2* "console_scripts" entry points (without the .py
      extension) instead of installing the rst2*.py front end tools in the
      binary PATH.
    + Use docutils --reader=pep --writer=pep_html for a PEP preview.
    + Use python -m docutils.writers.odf_odt.prepstyles to strip the page
      size from an ODT writer stylesheet.
    + Use the same CSV format for the :header: option and the main data of
      the "csv-table" directive.
    + New option "loading" for the "image" directive. Sets the new attribute
      loading of the <image> doctree element.
  * Configuration changes:
    + New configuration setting root_prefix. Configurable root directory
      for included files.
    + New configuration setting sources for the "buildhtml.py" application.
    + 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.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=94
2024-11-03 05:39:44 +00:00
4 changed files with 359 additions and 35 deletions

BIN
docutils-0.20.1.tar.gz (Stored with Git LFS)

Binary file not shown.

3
docutils-0.22.3.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:21486ae730e4ca9f622677b1412b879af1791efcfba517e4c6f60be543fc8cdd
size 2290153

View File

@@ -1,3 +1,316 @@
-------------------------------------------------------------------
Thu Nov 6 09:20:50 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Update to 0.22.3:
- docutils/parsers/rst/directives/body.py, docutils/parsers/rst/directives/parts.py
Do not flag uncategorized, auxiliary elements
like sphinx.addnodes.only when testing for
invalid parents of topics or sidebars (cf.
https://github.com/sphinx-doc/sphinx/issues/14002).
- docutils/parsers/rst/states.py
More informative error messages when a substitution
definition contains problematic or not supported content.
Ignore combining characters when extracting a grid table block
- docutils/parsers/rst/tableparser.py
Ignore combining characters when parsing the grid table
structure. Fixes bugs #128 and #512.
- docutils/statemachine.py
Fix handling of combining characters when extracting
2d-block.
-------------------------------------------------------------------
Mon Sep 22 10:26:15 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
- Update to 0.22.2:
- Remove a spurious vim .swp-file to fix bug #513.
-------------------------------------------------------------------
Wed Sep 17 19:37:12 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Update to 0.22.1:
- Only documentation fixes.
docutils/frontend.py, docutils/writers/
More consistent and concise command line help.
docutils/nodes.py
- nodes.Element.section_hierarchy() now returns only
elements with non-empty "parent" attribute.
docutils/parsers/rst/states.py
- Relax "section title" system messages from SEVERE to
ERROR.
- Fix behaviour with nested parsing into a detached node
(cf. bugs #508 and #509).
- New attribute NestedStateMachine.parent_state_machine.
Use case: update the "current node" of parent state
machine(s) after nested parsing.
- Better error messages for grid table markup errors (bug
#504), based on patch #214 by Jynn Nelson.
docutils/transforms/references.py
- Better error reports for hyperlinks with embedded URI or
alias.
docutils/writers/latex2e/__init__.py
- Add cross-reference anchors (\phantomsection\label{...})
for elements with IDs (fixes bug #503).
- Fix cross-reference anchor placement in figures, images,
literal-blocks, tables, and (sub)titles.
- Simplify code for images nested in reference or figure
elements.
- Update to 0.22.0:
General
- We have started to add type hints to Docutils
(feature-request #87).
- This will be a complex programme of work and as such, for
the time being, these type hints are "provisional" and
should not be relied upon.
- By default, the Python interpreter treats type hints as
annotations. Python >= 3.10 is required with active type
hints (typing.TYPE_CHECKING == True).
docs/ref/docutils.dtd
- Allow multiple <term> elements in a
<definition_list_item>. Fixes feature-request #60
- The first element in a <figure> may also be a <reference>
(with nested "clickable" <image>).
docutils/core.py
- Removed Publisher.setup_option_parser() (internal,
obsolete).
- Allow a string value (component name or alias) in
the "reader", "parser", and "writer" arguments of
Publisher.__init__() and the publish_*() convenience
functions.
docutils/frontend.py
- Drop short options -i and -o for --input-encoding and
--output-encoding.
- Change the default input encoding from None (auto-detect)
to "utf-8".
- Change the default value of the root_prefix setting to
the empty string (no change to the behaviour).
docutils/io.py
- Change the default input encoding from None (auto-detect)
to "utf-8".
docutils/nodes.py
- Raise TypeError if the "rawsource" argument in
Element.__init__() is an Element instance. Catches errors
like nodes.hint(nodes.paragraph()).
- New element category classes SubStructural and
PureTextElement.
- Fix element categories.
- New method Element.validate(): raise
nodes.ValidationError if the element does not comply with
the "Docutils Document Model". Provisional.
- New "attribute validating functions" convert string
representations to correct data type, normalize values,
and raise ValueError for invalid attribute names or
values.
- New function parse_measure().
- Removed Element.set_class().
- Downgrade "duplicate ID" message level from SERIOUS to
ERROR.
- Fix recursion in Element.get_language_code().
- Do not insert <system_message> elements for duplicate
explicit targets if this results in an invalid doctree
(cf. bug #489).
- Don't include a "backlink" reference in system messages,
if the referenced element is an external target (not
visible in the output).
- Don't invalidate indirect targets with duplicate name,
if they refer to the same refname (similar to external
targets refering to the same URI).
docutils/parsers/docutils_xml.py
- New parser for Docutils XML sources. Provisional.
docutils/parsers/recommonmark_wrapper.py
- New method Parser.finish_parse() to clean up (before
validating).
docutils/parsers/rst/languages/
- Remove mistranslations of the "admonition" directive
name.
docutils/parsers/rst/languages/en.py
- Add alias "rst-class" for the "class" directive to
improve the compatibility with Sphinx.
docutils/parsers/rst/directives/__init__.py
- Support CSS3 length units. Fixes feature-request #57.
docutils/parsers/rst/directives/images.py
- New option "figname" for the "figure" directive. Fixes
feature-request #44.
docutils/parsers/rst/directives/misc.py
- Pass the included file's path to the parser when the
"include" directive is used with :parser: option. Enables
system messages with correct source/line info.
- Pass default settings to custom parser for included file.
docutils/parsers/rst/directives/references.py
- Remove "name" from TargetNotes.option_spec. The
"target-notes" directive generates one footnote element
per external target but "name" must be unique across the
document. So far, the name was silently dropped.
docutils/parsers/rst/directives/tables.py
- Removed CSVTable.decode_from_csv() and
CSVTable.encode_from_csv(). Not required with Python 3.
docutils/parsers/rst/roles.py
- Renamed normalized_role_options() to normalize_options()
(it is now also used for directive options).
docutils/parsers/rst/states.py
- Raise warning for empty footnotes and citations.
- Add source and line info to <enumerated-list> elements.
Fix line number of "start value not ordinal-1" INFO
message.
- Change section handling to not rely on exceptions and
reparsing. Based on patch #213 by Arne Skjærholt. Fixes
bug #346 (duplicate System Messages).
- Use types.SimpleNamespace instead of a local definition
for the auxilliary class states.Struct.
- Warn about duplicate name in references with embedded
internal targets. Fixes bug #502.
- "Downgrade" targets generated from hyperlink references
with embedded URI or alias from explicit to implicit (cf.
bug #502).
docutils/readers/__init__.py:
- Deprecate "parser_name" argument of Reader.__init__().
docutils/transforms/frontmatter.py
- Update DocInfo to work with corrected element categories.
docutils/transforms/misc.py:
- Fix for misc.Transitions: report an error if a
<transition> element follows a <meta> or <decoration>
element as this is invalid according to docutils.dtd.
docutils/transforms/references.py
- Make AnonymousHyperlinks transform idempotent.
- New transform CitationReferences. Marks
citation_references as resolved if BibTeX is used by the
backend (LaTeX).
docutils/transforms/writer_aux.py
- Removed Compound transform.
docutils/transforms/universal.py
- Messages transform now also handles "loose" system
messages generated by the parser.
docutils/utils/__init__.py
- Removed Reporter.set_conditions(). Set attributes via
configuration settings or directly.
docutils/utils/_roman_numerals.py
- New implementation or Roman numeral support. Replaces the
local copy of the roman.py package.
docutils/utils/error_reporting.py
- Removed. Obsolete in Python 3.
docutils/writers/docutils-xml.py
- Do not increase indentation of follow-up lines inside
inline elements. when formatting with indents.
docutils/writers/__init__.py
- New base class writers.DoctreeTranslator with auxiliary
method uri2path().
docutils/writers/_html_base.py
- Make MathML the default math_output.
- Revise image size handling methods, use "width" and
"height" attributes for unitless values.
- Add "px" to unitless table "width" values.
- Fix error when determining the document metadata title
from the source path and the internal source attribute is
None.
docutils/writers/html4css1/__init__.py
- Keep default math_output value "HTML math.css".
- Add "px" to unitless table "width" values.
docutils/writers/latex2e/__init__.py
- LaTeXTranslator.to_latex_length(): Handle CSS3 length
units. Remove optional argument pxunit (ignored since at
least 2012). Drop trailing zeroes from length values.
Move XeTeX-specific code to the "xetex" writer.
- Don't wrap references with custom reference-label in a
\hyperref command.
- Mark the main language when loading "babel".
- Provide an "unknown_references_resolver" (cf.
docutils/TransformSpec) for citation references resolved
with BibTeX (cf. use_bibtex setting).
- Support SVG image inclusion with the "svg" LaTeX package
(see the stylesheet configuration setting). Solves
feature-request #83
- Add "template" to the parts returned by
Writer.assemble_parts().
- Use standard dict for LaTeXTranslator.requirements and
LaTeXTranslator.fallbacks.
- Use <document> "title" attribute in pdfinfo.
- Encode <meta> element content in pdfinfo.
- Improve formatting of docinfo fields.
- LaTeXTranslator.pop_output_collector() now returns the
popped list.
- Replace Writer.bibtex_reference_resolver() with a
transform.
- LaTeXTranslator.visit_inline() now inserts labels for the
node's IDs.
- Disable footnote handling by the "hyperref" LaTeX package
(Docutils' \DUfootnotemark and \DUfootnotetext macros
implement hyperlinks and backlinks). Avoids "empty
anchor" warnings.
- Fix target position and re-style system messages.
- Don't merge paragraphs if there is a target between them.
docutils/writers/latex2e/docutils.sty
- Replace use of \ifthenelse{\isundefined... (from
"ifthen.sty") with the eTeX primitive \ifdefined.
- Add macros to emulate CSS3 length units unknown to LaTeX.
docutils/writers/manpage.py
- Remove code for unused emdash bullets.
- Print Docutils version in header comment (feature-request
#105).
- Stop converting text to full capitals (bug #481).
- Fix reference output (bug #497).
- Use macros .UR/.UE for hyperlink references unless the
new configuration setting text_references is True. The
current default is True (text references), it will change
to False (macro references) in Docutils 1.0.
- Do not drop text of internal targets.
docutils/writers/null.py
- null.Writer.translate() sets self.output to the empty
string.
docutils/writers/odf_odt/__init__.py
- Use "px" as fallback unit for unitless image size
attributes.
- Fix conversion factor of "pc" (pica) to "cm".
- Fix conversion of image width in "%" if the height is
specified.
- Adjust fallback DPI value (currently not used) to match
CSS units.
- Fix errors with *.xml style files (bug #494).
- Use <document> "title" attribute in document metadata.
pyproject.toml
- Add tox.ini to the "include" list (fixes bug #486).
tools/rst2odt.py
- Use core.publish_file() instead of
core.publish_file_to_binary().
tools/rst2odt_prepstyles.py
- Removed. Use python -m
docutils.writers.odf_odt.prepstyles.
-------------------------------------------------------------------
Fri Jan 17 09:00:56 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
- fix alternatives
-------------------------------------------------------------------
Wed Jan 15 13:51:33 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
- Use libalternatives instead of update-alternatives, bsc#1235783
-------------------------------------------------------------------
Sun Nov 3 05:32:05 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 0.21.2:
* General:
+ Drop support for Python 3.7 and 3.8.
+ Provide rst2* "console_scripts" entry points (without the .py
extension) instead of installing the rst2*.py front end tools in the
binary PATH.
+ Use docutils --reader=pep --writer=pep_html for a PEP preview.
+ Use python -m docutils.writers.odf_odt.prepstyles to strip the page
size from an ODT writer stylesheet.
+ Use the same CSV format for the :header: option and the main data of
the "csv-table" directive.
+ New option "loading" for the "image" directive. Sets the new attribute
loading of the <image> doctree element.
* Configuration changes:
+ New configuration setting root_prefix. Configurable root directory
for included files.
+ New configuration setting sources for the "buildhtml.py" application.
+ 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.
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Mar 30 15:15:42 UTC 2024 - Ben Greiner <code@bnavigator.de> Sat Mar 30 15:15:42 UTC 2024 - Ben Greiner <code@bnavigator.de>
@@ -64,7 +377,7 @@ Sun Apr 16 01:30:00 UTC 2023 - Matej Cepl <mcepl@suse.com>
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 24 07:15:02 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com> Tue Jan 24 07:15:02 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
- Refactor pygments-2.14.patch to not use distutils. - Refactor pygments-2.14.patch to not use distutils.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 10 15:42:55 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com> Tue Jan 10 15:42:55 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
@@ -364,7 +677,7 @@ Fri Aug 9 09:53:07 UTC 2019 - Marketa Calabkova <mcalabkova@suse.com>
- update to version 0.15.2 - update to version 0.15.2
* Docutils 0.14.x is the last version supporting Python 2.4, 2.5, * Docutils 0.14.x is the last version supporting Python 2.4, 2.5,
3.1, and 3.2. 3.1, and 3.2.
* reStructured text: Allow embedded colons in field list field * reStructured text: Allow embedded colons in field list field
names (before, tokens like :this:example: were considered ordinary text). names (before, tokens like :this:example: were considered ordinary text).
* Fixed a bug with the "trim" options of the "unicode" directive. * Fixed a bug with the "trim" options of the "unicode" directive.
@@ -529,11 +842,11 @@ Tue Sep 24 09:48:27 UTC 2013 - toddrme2178@gmail.com
- Update to 0.11 - Update to 0.11
* Fix for the overwritting of document attributes. * Fix for the overwritting of document attributes.
* Support embedded aliases within hyperlink references. * Support embedded aliases within hyperlink references.
* try local import of docutils components (reader, writer, parser, * try local import of docutils components (reader, writer, parser,
language module) before global search. language module) before global search.
* Python 3.3 checks CVS syntax only if "strict" is True. * Python 3.3 checks CVS syntax only if "strict" is True.
* Now, it is easy to add a custom stylesheet to Docutils' default * Now, it is easy to add a custom stylesheet to Docutils' default
stylesheet with, e.g., stylesheet with, e.g.,
--stylesheet_path='html4css1.css, mystyle.css' --stylesheet_path='html4css1.css, mystyle.css'
* If there is a file html4css1.css in the working directory of the * If there is a file html4css1.css in the working directory of the
process at launch, it is used instead of the one provided by process at launch, it is used instead of the one provided by
@@ -541,15 +854,15 @@ Tue Sep 24 09:48:27 UTC 2013 - toddrme2178@gmail.com
* New default for math-output: HTML math.css. * New default for math-output: HTML math.css.
* Avoid repeated class declarations in html4css1 writer * Avoid repeated class declarations in html4css1 writer
* Drop the simple algorithm replacing straight double quotes with * Drop the simple algorithm replacing straight double quotes with
English typographic ones. Activate the SmartQuotes transform if English typographic ones. Activate the SmartQuotes transform if
you want this feature. you want this feature.
* New setting stylesheet_dirs: Comma-separated list of directories * New setting stylesheet_dirs: Comma-separated list of directories
where stylesheets are found. Used by stylesheet_path when where stylesheets are found. Used by stylesheet_path when
expanding relative path arguments. expanding relative path arguments.
* handle lines starting with a period. * handle lines starting with a period.
* Fix option separating comma was bold (thanks to Bill Morris). * Fix option separating comma was bold (thanks to Bill Morris).
- Use pypi url and download - Use pypi url and download
- Replace rpmlint-non-executable-scripts.diff with sed in the spec - Replace rpmlint-non-executable-scripts.diff with sed in the spec
file file
------------------------------------------------------------------- -------------------------------------------------------------------
@@ -591,25 +904,25 @@ Tue Nov 20 19:34:53 UTC 2012 - saschpe@suse.de
Fri Oct 26 08:26:29 UTC 2012 - highwaystar.ru@gmail.com Fri Oct 26 08:26:29 UTC 2012 - highwaystar.ru@gmail.com
- patch from upstream for python3.3 support - patch from upstream for python3.3 support
* Fix [3541369] Relative __import__ also with Python 3.3 * Fix [3541369] Relative __import__ also with Python 3.3
------------------------------------------------------------------- -------------------------------------------------------------------
Thu May 3 14:28:17 UTC 2012 - toddrme2178@gmail.com Thu May 3 14:28:17 UTC 2012 - toddrme2178@gmail.com
- Update to version 0.9: - Update to version 0.9:
* reStructuredText "code" role and directive with syntax * reStructuredText "code" role and directive with syntax
highlighting by Pygments_. highlighting by Pygments_.
* "code" option of the "include" directive. * "code" option of the "include" directive.
* Fix [ 3402314 ] allow non-ASCII whitespace, punctuation * Fix [ 3402314 ] allow non-ASCII whitespace, punctuation
characters and "international" quotes around inline markup. characters and "international" quotes around inline markup.
* Fix handling of missing stylesheets. * Fix handling of missing stylesheets.
* Fix [ 2971827 ] and [ 3442827 ] extras/roman.py moved to * Fix [ 2971827 ] and [ 3442827 ] extras/roman.py moved to
docutils/utils/roman.py docutils/utils/roman.py
* docutils.utils is now a package (providing a place for * docutils.utils is now a package (providing a place for
sub-modules) sub-modules)
* change default for `math-output` setting to MathJax * change default for `math-output` setting to MathJax
* Support the `abbreviation` and `acronym` standard roles. * Support the `abbreviation` and `acronym` standard roles.
* Record only files required to generate the LaTeX source as * Record only files required to generate the LaTeX source as
dependencies. dependencies.
* Use ``\setcounter{secnumdepth}{0}`` instead of ``*``-versions * Use ``\setcounter{secnumdepth}{0}`` instead of ``*``-versions
when suppressing LaTeX section numbering. when suppressing LaTeX section numbering.

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-docutils # spec file for package python-docutils
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC and contributors
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -25,29 +25,40 @@
%define psuffix %{nil} %define psuffix %{nil}
%bcond_with test %bcond_with test
%endif %endif
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
Name: python-docutils%{psuffix} Name: python-docutils%{psuffix}
Version: 0.20.1 Version: 0.22.3
Release: 0 Release: 0
Summary: Python Documentation Utilities Summary: Python Documentation Utilities
License: BSD-2-Clause AND Python-2.0 AND GPL-2.0-or-later AND GPL-3.0-or-later AND SUSE-Public-Domain License: BSD-2-Clause AND Python-2.0 AND GPL-2.0-or-later AND GPL-3.0-or-later AND SUSE-Public-Domain
URL: https://pypi.python.org/pypi/docutils/ URL: https://pypi.python.org/pypi/docutils/
Source: https://files.pythonhosted.org/packages/source/d/docutils/docutils-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/d/docutils/docutils-%{version}.tar.gz
Source99: python-docutils-rpmlintrc Source99: python-docutils-rpmlintrc
BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module flit-core}
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
%if %{with libalternatives}
Requires: alts
BuildRequires: alts
%else
Requires(pre): update-alternatives Requires(pre): update-alternatives
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun): update-alternatives Requires(postun): update-alternatives
%endif
Recommends: python-Pillow Recommends: python-Pillow
Recommends: python-Pygments Recommends: python-Pygments
Recommends: python-roman Recommends: python-roman
BuildArch: noarch BuildArch: noarch
%if %{with test} %if %{with test}
BuildRequires: %{python_module Pillow} BuildRequires: %{python_module docutils = %{version}}
BuildRequires: %{python_module Pygments}
BuildRequires: %{python_module packaging} BuildRequires: %{python_module packaging}
# BuildRequires: %%{python_module roman} # BuildRequires: %%{python_module roman}
%endif %endif
@@ -66,20 +77,18 @@ easy-to-read, what-you-see-is-what-you-get plaintext markup syntax.
%autosetup -p1 -n docutils-%{version} %autosetup -p1 -n docutils-%{version}
# Remove useless ".py" ending from executables: # Remove useless ".py" ending from executables:
for i in tools/rst*; do mv "$i" "${i/.py}"; done for i in tools/rst*; do mv "$i" "${i/.py}"; done
sed -i "s|'tools/\(rst.*\)\.py'|'tools/\1'|" setup.py
find . -name \*.mp4 -print -exec chmod -x '{}' \; find . -name \*.mp4 -print -exec chmod -x '{}' \;
find . -name \*.swp -delete
# Actually seems to work with Python 3.6
sed -i -e '/python_requires/ s/7/6/' setup.py
# Remove shebang from non-executable files # Remove shebang from non-executable files
sed -i '1{/^#!/d}' \ sed -i '1{/^#!/d}' \
docutils/__main__.py \ docutils/__main__.py \
docutils/parsers/commonmark_wrapper.py \ docutils/parsers/commonmark_wrapper.py \
docutils/parsers/docutils_xml.py \
docutils/parsers/recommonmark_wrapper.py \ docutils/parsers/recommonmark_wrapper.py \
docutils/utils/error_reporting.py \
docutils/utils/math/math2html.py \ docutils/utils/math/math2html.py \
docutils/utils/math/tex2unichar.py \ docutils/utils/math/tex2unichar.py \
docutils/utils/math/mathalphabet2unichar.py \
docutils/utils/smartquotes.py \ docutils/utils/smartquotes.py \
docutils/writers/_html_base.py \ docutils/writers/_html_base.py \
docutils/writers/odf_odt/prepstyles.py \ docutils/writers/odf_odt/prepstyles.py \
@@ -91,10 +100,12 @@ sed -i '1{/^#!/d}' \
%install %install
%if !%{with test} %if !%{with test}
%pyproject_install %pyproject_install
for binary in docutils rst2html rst2latex rst2man rst2odt rst2odt_prepstyles rst2pseudoxml rst2s5 rst2xetex rst2xml rstpep2html rst2html4 rst2html5 ; do for binary in docutils rst2html rst2latex rst2man rst2odt rst2pseudoxml rst2s5 rst2xetex rst2xml rst2html4 rst2html5 ; do
%python_clone -a %{buildroot}%{_bindir}/$binary %python_clone -a %{buildroot}%{_bindir}/$binary
done done
%python_expand %fdupes %{buildroot}%{$python_sitelib} %{python_expand find %{buildroot}%{$python_sitelib} -name \*.py -executable -exec chmod -x '{}' \;
%fdupes %{buildroot}%{$python_sitelib}
}
%endif %endif
%check %check
@@ -106,27 +117,27 @@ done
# sometime ago rst2html was the master which would let fail the upgrade with master docutils in post below # sometime ago rst2html was the master which would let fail the upgrade with master docutils in post below
%pre %pre
update-alternatives --query rst2html >/dev/null 2>&1 && update-alternatives --quiet --remove-all rst2html ||: update-alternatives --query rst2html >/dev/null 2>&1 && update-alternatives --quiet --remove-all rst2html ||:
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative docutils
%post %post
%python_install_alternative docutils rst2html rst2latex rst2man rst2odt rst2odt_prepstyles rst2pseudoxml rst2s5 rst2xetex rst2xml rstpep2html rst2html4 rst2html5 %python_install_alternative docutils rst2html rst2latex rst2man rst2odt rst2pseudoxml rst2s5 rst2xetex rst2xml rst2html4 rst2html5
%postun %postun
%python_uninstall_alternative docutils %python_uninstall_alternative docutils
%files %{python_files} %files %{python_files}
%license COPYING.txt licenses/*.txt %license COPYING.rst licenses/*.txt licenses/*.rst
%doc FAQ.txt HISTORY.txt README.txt THANKS.txt BUGS.txt docs/* %doc FAQ.rst HISTORY.rst README.rst THANKS.rst BUGS.rst docs/*
%python_alternative %{_bindir}/docutils %python_alternative %{_bindir}/docutils
%python_alternative %{_bindir}/rst2html %python_alternative %{_bindir}/rst2html
%python_alternative %{_bindir}/rst2latex %python_alternative %{_bindir}/rst2latex
%python_alternative %{_bindir}/rst2man %python_alternative %{_bindir}/rst2man
%python_alternative %{_bindir}/rst2odt %python_alternative %{_bindir}/rst2odt
%python_alternative %{_bindir}/rst2odt_prepstyles
%python_alternative %{_bindir}/rst2pseudoxml %python_alternative %{_bindir}/rst2pseudoxml
%python_alternative %{_bindir}/rst2s5 %python_alternative %{_bindir}/rst2s5
%python_alternative %{_bindir}/rst2xetex %python_alternative %{_bindir}/rst2xetex
%python_alternative %{_bindir}/rst2xml %python_alternative %{_bindir}/rst2xml
%python_alternative %{_bindir}/rstpep2html
%python_alternative %{_bindir}/rst2html4 %python_alternative %{_bindir}/rst2html4
%python_alternative %{_bindir}/rst2html5 %python_alternative %{_bindir}/rst2html5
%{python_sitelib}/docutils/ %{python_sitelib}/docutils/