|
From: <mi...@us...> - 2026-08-20 22:07:12
|
Revision: 10392
http://sourceforge.net/p/docutils/code/10392
Author: milde
Date: 2026-08-20 22:07:10 +0000 (Thu, 20 Aug 2026)
Log Message:
-----------
Fixes for PEP reader and writer.
Update "pep"reader docstring.
Change the type of the "title" part returned by
`pep_html.Writer.assemble_parts()` from `list` to `str`:
> All parts returned by the HTML writers are of data type str.
>
> - docs/api/publisher.html
Modified Paths:
--------------
trunk/docutils/HISTORY.rst
trunk/docutils/docutils/readers/pep.py
trunk/docutils/docutils/writers/pep_html/__init__.py
Modified: trunk/docutils/HISTORY.rst
===================================================================
--- trunk/docutils/HISTORY.rst 2026-07-22 20:59:24 UTC (rev 10391)
+++ trunk/docutils/HISTORY.rst 2026-08-20 22:07:10 UTC (rev 10392)
@@ -167,7 +167,14 @@
- Update `Reader.get_transforms()` to remove two of the transforms
obsoleting `references.DanglingReferences`.
+* docutils/writers/pep_html/__init__.py
+ - Change the type of the "title" part returned by
+ `.Writer.assemble_parts()` from `list` to `str`.
+ (`The Docutils Publisher` says: "all parts returned
+ by the HTML writers are of data type str.")
+
+
Release 0.23 (2026-05-27)
=========================
Modified: trunk/docutils/docutils/readers/pep.py
===================================================================
--- trunk/docutils/docutils/readers/pep.py 2026-07-22 20:59:24 UTC (rev 10391)
+++ trunk/docutils/docutils/readers/pep.py 2026-08-20 22:07:10 UTC (rev 10392)
@@ -44,11 +44,11 @@
inliner_class = rst.states.Inliner
def __init__(self, parser=None, parser_name=None) -> None:
- """`parser` should be ``None``, `parser_name` is ignored.
+ """
+ Initialize the "rst" parser with PEP-specific settings.
- The default parser is "rst" with PEP-specific settings
- (since Docutils 0.3). Since Docutils 0.22, `parser` is ignored,
- if it is a `str` instance.
+ A custom parser instance may be passed as `parser`. The argument
+ `parser_name` and string-values for `parser` are ignored.
"""
if parser is None or isinstance(parser, str):
parser = rst.Parser(rfc2822=True, inliner=self.inliner_class())
Modified: trunk/docutils/docutils/writers/pep_html/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/pep_html/__init__.py 2026-07-22 20:59:24 UTC (rev 10391)
+++ trunk/docutils/docutils/writers/pep_html/__init__.py 2026-08-20 22:07:10 UTC (rev 10392)
@@ -90,7 +90,7 @@
def assemble_parts(self) -> None:
html4css1.Writer.assemble_parts(self)
- self.parts['title'] = [self.title]
+ self.parts['title'] = self.title
self.parts['pepnum'] = self.pepnum
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|