A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

CHANGELOG 6.6 KiB

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