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.
 
 
 
 

226 wiersze
9.8 KiB

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