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.

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