A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

changelog.rst 10 KiB

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