A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

242 satır
10 KiB

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