A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

144 lignes
7.0 KiB

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