A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

CHANGELOG 7.8 KiB

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