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