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