A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

CHANGELOG 5.3 KiB

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