A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

167 lines
7.8 KiB

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