A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

178 rindas
8.2 KiB

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