A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

CHANGELOG 9.7 KiB

11年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. v0.6 (unreleased):
  2. - Dropped support for end-of-life Python versions 2.6, 3.2, 3.3. (#199, #204)
  3. - Fixed signals getting stuck inside the C tokenizer until parsing finishes,
  4. in pathological cases. (#206)
  5. - Fixed <wbr> not being considered a single-only tag. (#200)
  6. v0.5.1 (released March 3, 2018):
  7. - Improved behavior when adding parameters to templates (via Template.add())
  8. with poorly formatted whitespace conventions. (#185)
  9. - Fixed the parser getting stuck in deeply nested HTML tags with unclosed,
  10. quoted attributes. (#190)
  11. v0.5 (released June 23, 2017):
  12. - Added Wikicode.contains() to determine whether a Node or Wikicode object is
  13. contained within another Wikicode object.
  14. - Added Wikicode.get_ancestors() and Wikicode.get_parent() to find all
  15. ancestors and the direct parent of a Node, respectively.
  16. - Fixed a long-standing performance issue with deeply nested, invalid syntax
  17. (issue #42). The parser should be much faster on certain complex pages. The
  18. "max cycle" restriction has also been removed, so some situations where
  19. templates at the end of a page were being skipped are now resolved.
  20. - Made Template.remove(keep_field=True) behave more reasonably when the
  21. parameter is already empty.
  22. - Added the keep_template_params argument to Wikicode.strip_code(). If True,
  23. then template parameters will be preserved in the output.
  24. - Wikicode objects can now be pickled properly (fixed infinite recursion error
  25. on incompletely-constructed StringMixIn subclasses).
  26. - Fixed Wikicode.matches()'s behavior on iterables besides lists and tuples.
  27. - Fixed len() sometimes raising ValueError on empty node lists.
  28. - Fixed a rare parsing bug involving self-closing tags inside the attributes of
  29. unpaired tags.
  30. - Fixed release script after changes to PyPI.
  31. v0.4.4 (released December 30, 2016):
  32. - Added support for Python 3.6.
  33. - Fixed parsing bugs involving:
  34. - wikitables nested in templates;
  35. - wikitable error recovery when unable to recurse;
  36. - templates nested in template parameters before other parameters.
  37. - Fixed parsing file-like objects.
  38. - Made builds deterministic.
  39. - Documented caveats.
  40. v0.4.3 (released October 29, 2015):
  41. - Added Windows binaries for Python 3.5.
  42. - Fixed edge cases involving wikilinks inside of external links and vice versa.
  43. - Fixed a C tokenizer crash when a keyboard interrupt happens while parsing.
  44. v0.4.2 (released July 30, 2015):
  45. - Fixed setup script not including header files in releases.
  46. - Fixed Windows binary uploads.
  47. v0.4.1 (released July 30, 2015):
  48. - The process for building Windows binaries has been fixed, and these should be
  49. distributed along with new releases. Windows users can now take advantage of
  50. C speedups without having a compiler of their own.
  51. - Added support for Python 3.5.
  52. - '<' and '>' are now disallowed in wikilink titles and template names. This
  53. includes when denoting tags, but not comments.
  54. - Fixed the behavior of preserve_spacing in Template.add() and keep_field in
  55. Template.remove() on parameters with hidden keys.
  56. - Removed _ListProxy.detach(). SmartLists now use weak references and their
  57. children are garbage-collected properly.
  58. - Fixed parser bugs involving:
  59. - templates with completely blank names;
  60. - templates with newlines and comments.
  61. - Heavy refactoring and fixes to the C tokenizer, including:
  62. - corrected a design flaw in text handling, allowing for substantial speed
  63. improvements when parsing long strings of plain text;
  64. - implemented new Python 3.3 PEP 393 Unicode APIs.
  65. - Fixed various bugs in SmartList, including one that was causing memory issues
  66. on 64-bit builds of Python 2 on Windows.
  67. - Fixed some bugs in the release scripts.
  68. v0.4 (released May 23, 2015):
  69. - The parser now falls back on pure Python mode if C extensions cannot be
  70. built. This fixes an issue that prevented some Windows users from installing
  71. the parser.
  72. - Added support for parsing wikicode tables (patches by David Winegar).
  73. - Added a script to test for memory leaks in scripts/memtest.py.
  74. - Added a script to do releases in scripts/release.sh.
  75. - skip_style_tags can now be passed to mwparserfromhell.parse() (previously,
  76. only Parser().parse() allowed it).
  77. - The 'recursive' argument to Wikicode's filter methods now accepts a third
  78. option, RECURSE_OTHERS, which recurses over all children except instances of
  79. 'forcetype' (for example, `code.filter_templates(code.RECURSE_OTHERS)`
  80. returns all un-nested templates).
  81. - The parser now understands HTML tag attributes quoted with single quotes.
  82. When setting a tag attribute's value, quotes will be added if necessary. As
  83. part of this, Attribute's 'quoted' attribute has been changed to 'quotes',
  84. and is now either a string or None.
  85. - Calling Template.remove() with a Parameter object that is not part of the
  86. template now raises ValueError instead of doing nothing.
  87. - Parameters with non-integer keys can no longer be created with
  88. 'showkey=False', nor have the value of this attribute be set to False later.
  89. - _ListProxy.destroy() has been changed to _ListProxy.detach(), and now works
  90. in a more useful way.
  91. - If something goes wrong while parsing, ParserError will now be raised.
  92. Previously, the parser would produce an unclear BadRoute exception or allow
  93. an incorrect node tree to be build.
  94. - Fixed parser bugs involving:
  95. - nested tags;
  96. - comments in template names;
  97. - tags inside of <nowiki> tags.
  98. - Added tests to ensure that parsed trees convert back to wikicode without
  99. unintentional modifications.
  100. - Added support for a NOWEB environment variable, which disables a unit test
  101. that makes a web call.
  102. - Test coverage has been improved, and some minor related bugs have been fixed.
  103. - Updated and fixed some documentation.
  104. v0.3.3 (released April 22, 2014):
  105. - Added support for Python 2.6 and 3.4.
  106. - Template.has() is now passed 'ignore_empty=False' by default instead of True.
  107. This fixes a bug when adding parameters to templates with empty fields, and
  108. is a breaking change if you rely on the default behavior.
  109. - The 'matches' argument of Wikicode's filter methods now accepts a function
  110. (taking one argument, a Node, and returning a bool) in addition to a regex.
  111. - Re-added 'flat' argument to Wikicode.get_sections(), fixed the order in which
  112. it returns sections, and made it faster.
  113. - Wikicode.matches() now accepts a tuple or list of strings/Wikicode objects
  114. instead of just a single string or Wikicode.
  115. - Given the frequency of issues with the (admittedly insufficient) tag parser,
  116. there's a temporary skip_style_tags argument to parse() that ignores '' and
  117. ''' until these issues are corrected.
  118. - Fixed a parser bug involving nested wikilinks and external links.
  119. - C code cleanup and speed improvements.
  120. v0.3.2 (released September 1, 2013):
  121. - Added support for Python 3.2 (along with current support for 3.3 and 2.7).
  122. - Renamed Template.remove()'s first argument from 'name' to 'param', which now
  123. accepts Parameter objects in addition to parameter name strings.
  124. v0.3.1 (released August 29, 2013):
  125. - Fixed a parser bug involving URLs nested inside other markup.
  126. - Fixed some typos.
  127. v0.3 (released August 24, 2013):
  128. - Added complete support for HTML Tags, including forms like <ref>foo</ref>,
  129. <ref name="bar"/>, and wiki-markup tags like bold ('''), italics (''), and
  130. lists (*, #, ; and :).
  131. - Added support for ExternalLinks (http://example.com/ and
  132. [http://example.com/ Example]).
  133. - Wikicode's filter methods are now passed 'recursive=True' by default instead
  134. of False. This is a breaking change if you rely on any filter() methods being
  135. non-recursive by default.
  136. - Added a matches() method to Wikicode for page/template name comparisons.
  137. - The 'obj' param of Wikicode.insert_before(), insert_after(), replace(), and
  138. remove() now accepts other Wikicode objects and strings representing parts of
  139. wikitext, instead of just nodes. These methods also make all possible
  140. substitutions instead of just one.
  141. - Renamed Template.has_param() to has() for consistency with Template's other
  142. methods; has_param() is now an alias.
  143. - The C tokenizer extension now works on Python 3 in addition to Python 2.7.
  144. - Various bugfixes, internal changes, and cleanup.
  145. v0.2 (released June 20, 2013):
  146. - The parser now fully supports Python 3 in addition to Python 2.7.
  147. - Added a C tokenizer extension that is significantly faster than its Python
  148. equivalent. It is enabled by default (if available) and can be toggled by
  149. setting `mwparserfromhell.parser.use_c` to a boolean value.
  150. - Added a complete set of unit tests covering parsing and wikicode
  151. manipulation.
  152. - Renamed Wikicode.filter_links() to filter_wikilinks() (applies to ifilter as
  153. well).
  154. - Added filter methods for Arguments, Comments, Headings, and HTMLEntities.
  155. - Added 'before' param to Template.add(); renamed 'force_nonconformity' to
  156. 'preserve_spacing'.
  157. - Added 'include_lead' param to Wikicode.get_sections().
  158. - Removed 'flat' param from Wikicode.get_sections().
  159. - Removed 'force_no_field' param from Template.remove().
  160. - Added support for Travis CI.
  161. - Added note about Windows build issue in the README.
  162. - The tokenizer will limit itself to a realistic recursion depth to prevent
  163. errors and unreasonably long parse times.
  164. - Fixed how some nodes' attribute setters handle input.
  165. - Fixed multiple bugs in the tokenizer's handling of invalid markup.
  166. - Fixed bugs in the implementation of SmartList and StringMixIn.
  167. - Fixed some broken example code in the README; other copyedits.
  168. - Other bugfixes and code cleanup.
  169. v0.1.1 (released September 21, 2012):
  170. - Added support for Comments (<!-- foo -->) and Wikilinks ([[foo]]).
  171. - Added corresponding ifilter_links() and filter_links() methods to Wikicode.
  172. - Fixed a bug when parsing incomplete templates.
  173. - Fixed strip_code() to affect the contents of headings.
  174. - Various copyedits in documentation and comments.
  175. v0.1 (released August 23, 2012):
  176. - Initial release.