A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1 год назад
1 год назад
1 год назад
1 год назад
1 год назад
1 год назад
2 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
4 лет назад
3 лет назад
4 лет назад
4 лет назад
4 лет назад
5 лет назад
5 лет назад
5 лет назад
5 лет назад
6 лет назад
6 лет назад
6 лет назад
7 лет назад
8 лет назад
8 лет назад
8 лет назад
8 лет назад
9 лет назад
8 лет назад
9 лет назад
9 лет назад
9 лет назад
9 лет назад
10 лет назад
9 лет назад
10 лет назад
10 лет назад
10 лет назад
10 лет назад
10 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. v0.6.6 (unreleased):
  2. - Dropped support for end-of-life Python 3.7.
  3. - Added support for Python 3.12.
  4. v0.6.5 (released September 5, 2023):
  5. - Dropped support for end-of-life Python 3.6.
  6. - Added support for Python 3.11.
  7. - Fixed parsing of leading zeros in named HTML entities. (#288)
  8. - Fixed memory leak parsing tags. (#303)
  9. - Fixed pickling SmartList objects. (#289)
  10. v0.6.4 (released February 14, 2022):
  11. - Dropped support for end-of-life Python 3.5.
  12. - Added support for Python 3.10. (#278)
  13. - Fixed a regression in v0.6.2 that broke parsing of nested wikilinks in file
  14. captions. For now, the parser will interpret nested wikilinks in normal links
  15. as well, even though this differs from MediaWiki. (#270)
  16. v0.6.3 (released September 2, 2021):
  17. - Added Linux AArch64 wheels. (#276)
  18. - Fixed C integer conversion, manifesting as parsing errors on big-endian
  19. platforms. (#277)
  20. v0.6.2 (released May 16, 2021):
  21. - Improved parsing of external links. (#232)
  22. - Fixed parsing of nested wikilinks.
  23. - Ported tests to pytest. (#237)
  24. - Moved mwparserfromhell package to src/ dir.
  25. - There was no 0.6.1 release due to a packaging error.
  26. v0.6 (released December 21, 2020):
  27. Thanks to everyone for their patience with this release!
  28. - Breaking change: dropped support for end-of-life Python 2.7 and 3.4.
  29. - Added support for Python 3.8 and 3.9.
  30. - Added binary wheels for Linux and macOS.
  31. - Updated Wikicode.matches() to recognize underscores as being equivalent
  32. to spaces. (#216)
  33. - Added a 'default' parameter to Template.get(), and implement dict-style item
  34. access for template parameters. (#252)
  35. - Fixed a rare parsing bug involving deeply nested style tags. (#224)
  36. - Fixed parsing of section headings inside templates. (#233)
  37. - Updated HTML tag definitions.
  38. - Internal refactoring and cleanup.
  39. v0.5.4 (released May 15, 2019):
  40. - Fixed an unlikely crash in the C tokenizer when interrupted while parsing
  41. a heading.
  42. v0.5.3 (released March 30, 2019):
  43. - Fixed manual construction of Node objects, previously unsupported. (#214)
  44. - Fixed Wikicode transformation methods (replace(), remove(), etc.) when passed
  45. an empty section as an argument. (#212)
  46. - Fixed the parser getting stuck inside malformed tables. (#206)
  47. v0.5.2 (released November 1, 2018):
  48. - Dropped support for end-of-life Python versions 2.6, 3.2, 3.3. (#199, #204)
  49. - Fixed signals getting stuck inside the C tokenizer until parsing finishes,
  50. in pathological cases. (#206)
  51. - Fixed <wbr> not being considered a single-only tag. (#200)
  52. - Fixed a C tokenizer crash on Python 3.7 when compiled with assertions. (#208)
  53. - Cleaned up some minor documentation issues. (#207)
  54. v0.5.1 (released March 3, 2018):
  55. - Improved behavior when adding parameters to templates (via Template.add())
  56. with poorly formatted whitespace conventions. (#185)
  57. - Fixed the parser getting stuck in deeply nested HTML tags with unclosed,
  58. quoted attributes. (#190)
  59. v0.5 (released June 23, 2017):
  60. - Added Wikicode.contains() to determine whether a Node or Wikicode object is
  61. contained within another Wikicode object.
  62. - Added Wikicode.get_ancestors() and Wikicode.get_parent() to find all
  63. ancestors and the direct parent of a Node, respectively.
  64. - Fixed a long-standing performance issue with deeply nested, invalid syntax
  65. (issue #42). The parser should be much faster on certain complex pages. The
  66. "max cycle" restriction has also been removed, so some situations where
  67. templates at the end of a page were being skipped are now resolved.
  68. - Made Template.remove(keep_field=True) behave more reasonably when the
  69. parameter is already empty.
  70. - Added the keep_template_params argument to Wikicode.strip_code(). If True,
  71. then template parameters will be preserved in the output.
  72. - Wikicode objects can now be pickled properly (fixed infinite recursion error
  73. on incompletely-constructed StringMixIn subclasses).
  74. - Fixed Wikicode.matches()'s behavior on iterables besides lists and tuples.
  75. - Fixed len() sometimes raising ValueError on empty node lists.
  76. - Fixed a rare parsing bug involving self-closing tags inside the attributes of
  77. unpaired tags.
  78. - Fixed release script after changes to PyPI.
  79. v0.4.4 (released December 30, 2016):
  80. - Added support for Python 3.6.
  81. - Fixed parsing bugs involving:
  82. - wikitables nested in templates;
  83. - wikitable error recovery when unable to recurse;
  84. - templates nested in template parameters before other parameters.
  85. - Fixed parsing file-like objects.
  86. - Made builds deterministic.
  87. - Documented caveats.
  88. v0.4.3 (released October 29, 2015):
  89. - Added Windows binaries for Python 3.5.
  90. - Fixed edge cases involving wikilinks inside of external links and vice versa.
  91. - Fixed a C tokenizer crash when a keyboard interrupt happens while parsing.
  92. v0.4.2 (released July 30, 2015):
  93. - Fixed setup script not including header files in releases.
  94. - Fixed Windows binary uploads.
  95. v0.4.1 (released July 30, 2015):
  96. - The process for building Windows binaries has been fixed, and these should be
  97. distributed along with new releases. Windows users can now take advantage of
  98. C speedups without having a compiler of their own.
  99. - Added support for Python 3.5.
  100. - '<' and '>' are now disallowed in wikilink titles and template names. This
  101. includes when denoting tags, but not comments.
  102. - Fixed the behavior of preserve_spacing in Template.add() and keep_field in
  103. Template.remove() on parameters with hidden keys.
  104. - Removed _ListProxy.detach(). SmartLists now use weak references and their
  105. children are garbage-collected properly.
  106. - Fixed parser bugs involving:
  107. - templates with completely blank names;
  108. - templates with newlines and comments.
  109. - Heavy refactoring and fixes to the C tokenizer, including:
  110. - corrected a design flaw in text handling, allowing for substantial speed
  111. improvements when parsing long strings of plain text;
  112. - implemented new Python 3.3 PEP 393 Unicode APIs.
  113. - Fixed various bugs in SmartList, including one that was causing memory issues
  114. on 64-bit builds of Python 2 on Windows.
  115. - Fixed some bugs in the release scripts.
  116. v0.4 (released May 23, 2015):
  117. - The parser now falls back on pure Python mode if C extensions cannot be
  118. built. This fixes an issue that prevented some Windows users from installing
  119. the parser.
  120. - Added support for parsing wikicode tables (patches by David Winegar).
  121. - Added a script to test for memory leaks in scripts/memtest.py.
  122. - Added a script to do releases in scripts/release.sh.
  123. - skip_style_tags can now be passed to mwparserfromhell.parse() (previously,
  124. only Parser().parse() allowed it).
  125. - The 'recursive' argument to Wikicode's filter methods now accepts a third
  126. option, RECURSE_OTHERS, which recurses over all children except instances of
  127. 'forcetype' (for example, `code.filter_templates(code.RECURSE_OTHERS)`
  128. returns all un-nested templates).
  129. - The parser now understands HTML tag attributes quoted with single quotes.
  130. When setting a tag attribute's value, quotes will be added if necessary. As
  131. part of this, Attribute's 'quoted' attribute has been changed to 'quotes',
  132. and is now either a string or None.
  133. - Calling Template.remove() with a Parameter object that is not part of the
  134. template now raises ValueError instead of doing nothing.
  135. - Parameters with non-integer keys can no longer be created with
  136. 'showkey=False', nor have the value of this attribute be set to False later.
  137. - _ListProxy.destroy() has been changed to _ListProxy.detach(), and now works
  138. in a more useful way.
  139. - If something goes wrong while parsing, ParserError will now be raised.
  140. Previously, the parser would produce an unclear BadRoute exception or allow
  141. an incorrect node tree to be build.
  142. - Fixed parser bugs involving:
  143. - nested tags;
  144. - comments in template names;
  145. - tags inside of <nowiki> tags.
  146. - Added tests to ensure that parsed trees convert back to wikicode without
  147. unintentional modifications.
  148. - Added support for a NOWEB environment variable, which disables a unit test
  149. that makes a web call.
  150. - Test coverage has been improved, and some minor related bugs have been fixed.
  151. - Updated and fixed some documentation.
  152. v0.3.3 (released April 22, 2014):
  153. - Added support for Python 2.6 and 3.4.
  154. - Template.has() is now passed 'ignore_empty=False' by default instead of True.
  155. This fixes a bug when adding parameters to templates with empty fields, and
  156. is a breaking change if you rely on the default behavior.
  157. - The 'matches' argument of Wikicode's filter methods now accepts a function
  158. (taking one argument, a Node, and returning a bool) in addition to a regex.
  159. - Re-added 'flat' argument to Wikicode.get_sections(), fixed the order in which
  160. it returns sections, and made it faster.
  161. - Wikicode.matches() now accepts a tuple or list of strings/Wikicode objects
  162. instead of just a single string or Wikicode.
  163. - Given the frequency of issues with the (admittedly insufficient) tag parser,
  164. there's a temporary skip_style_tags argument to parse() that ignores '' and
  165. ''' until these issues are corrected.
  166. - Fixed a parser bug involving nested wikilinks and external links.
  167. - C code cleanup and speed improvements.
  168. v0.3.2 (released September 1, 2013):
  169. - Added support for Python 3.2 (along with current support for 3.3 and 2.7).
  170. - Renamed Template.remove()'s first argument from 'name' to 'param', which now
  171. accepts Parameter objects in addition to parameter name strings.
  172. v0.3.1 (released August 29, 2013):
  173. - Fixed a parser bug involving URLs nested inside other markup.
  174. - Fixed some typos.
  175. v0.3 (released August 24, 2013):
  176. - Added complete support for HTML Tags, including forms like <ref>foo</ref>,
  177. <ref name="bar"/>, and wiki-markup tags like bold ('''), italics (''), and
  178. lists (*, #, ; and :).
  179. - Added support for ExternalLinks (http://example.com/ and
  180. [http://example.com/ Example]).
  181. - Wikicode's filter methods are now passed 'recursive=True' by default instead
  182. of False. This is a breaking change if you rely on any filter() methods being
  183. non-recursive by default.
  184. - Added a matches() method to Wikicode for page/template name comparisons.
  185. - The 'obj' param of Wikicode.insert_before(), insert_after(), replace(), and
  186. remove() now accepts other Wikicode objects and strings representing parts of
  187. wikitext, instead of just nodes. These methods also make all possible
  188. substitutions instead of just one.
  189. - Renamed Template.has_param() to has() for consistency with Template's other
  190. methods; has_param() is now an alias.
  191. - The C tokenizer extension now works on Python 3 in addition to Python 2.7.
  192. - Various bugfixes, internal changes, and cleanup.
  193. v0.2 (released June 20, 2013):
  194. - The parser now fully supports Python 3 in addition to Python 2.7.
  195. - Added a C tokenizer extension that is significantly faster than its Python
  196. equivalent. It is enabled by default (if available) and can be toggled by
  197. setting `mwparserfromhell.parser.use_c` to a boolean value.
  198. - Added a complete set of unit tests covering parsing and wikicode
  199. manipulation.
  200. - Renamed Wikicode.filter_links() to filter_wikilinks() (applies to ifilter as
  201. well).
  202. - Added filter methods for Arguments, Comments, Headings, and HTMLEntities.
  203. - Added 'before' param to Template.add(); renamed 'force_nonconformity' to
  204. 'preserve_spacing'.
  205. - Added 'include_lead' param to Wikicode.get_sections().
  206. - Removed 'flat' param from Wikicode.get_sections().
  207. - Removed 'force_no_field' param from Template.remove().
  208. - Added support for Travis CI.
  209. - Added note about Windows build issue in the README.
  210. - The tokenizer will limit itself to a realistic recursion depth to prevent
  211. errors and unreasonably long parse times.
  212. - Fixed how some nodes' attribute setters handle input.
  213. - Fixed multiple bugs in the tokenizer's handling of invalid markup.
  214. - Fixed bugs in the implementation of SmartList and StringMixIn.
  215. - Fixed some broken example code in the README; other copyedits.
  216. - Other bugfixes and code cleanup.
  217. v0.1.1 (released September 21, 2012):
  218. - Added support for Comments (<!-- foo -->) and Wikilinks ([[foo]]).
  219. - Added corresponding ifilter_links() and filter_links() methods to Wikicode.
  220. - Fixed a bug when parsing incomplete templates.
  221. - Fixed strip_code() to affect the contents of headings.
  222. - Various copyedits in documentation and comments.
  223. v0.1 (released August 23, 2012):
  224. - Initial release.