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 6.9 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. Changelog
  2. =========
  3. v0.4
  4. ----
  5. Unreleased
  6. (`changes <https://github.com/earwig/mwparserfromhell/compare/v0.3.3...develop>`__):
  7. - The parser is now distributed with Windows binaries, fixing an issue that
  8. prevented Windows users from using the C tokenizer.
  9. - Added a script to test for memory leaks in :file:`scripts/memtest.py`.
  10. - Added a script to do releases in :file:`scripts/release.sh`.
  11. - *skip_style_tags* can now be passed to :py:func:`mwparserfromhell.parse()
  12. <.parse_anything>` (previously, only :py:meth:`.Parser.parse` allowed it).
  13. - The *recursive* argument to :py:class:`Wikicode's <.Wikicode>`
  14. :py:meth:`.filter` methods now accepts a third option, ``RECURSE_OTHERS``,
  15. which recurses over all children except instances of *forcetype* (for
  16. example, ``code.filter_templates(code.RECURSE_OTHERS)`` returns all un-nested
  17. templates).
  18. - If something goes wrong while parsing, :py:exc:`.ParserError` will now be
  19. raised. Previously, the parser would produce an unclear :py:exc:`.BadRoute`
  20. exception or allow an incorrect node tree to be build.
  21. - Fixed a parser bug involving nested tags.
  22. - Updated and fixed some documentation.
  23. v0.3.3
  24. ------
  25. `Released April 22, 2014 <https://github.com/earwig/mwparserfromhell/tree/v0.3.3>`_
  26. (`changes <https://github.com/earwig/mwparserfromhell/compare/v0.3.2...v0.3.3>`__):
  27. - Added support for Python 2.6 and 3.4.
  28. - :py:meth:`.Template.has` is now passed *ignore_empty=False* by default
  29. instead of *True*. This fixes a bug when adding parameters to templates with
  30. empty fields, **and is a breaking change if you rely on the default
  31. behavior.**
  32. - The *matches* argument of :py:class:`Wikicode's <.Wikicode>`
  33. :py:meth:`.filter` methods now accepts a function (taking one argument, a
  34. :py:class:`.Node`, and returning a bool) in addition to a regex.
  35. - Re-added *flat* argument to :py:meth:`.Wikicode.get_sections`, fixed the
  36. order in which it returns sections, and made it faster.
  37. - :py:meth:`.Wikicode.matches` now accepts a tuple or list of
  38. strings/:py:class:`.Wikicode` objects instead of just a single string or
  39. :py:class:`.Wikicode`.
  40. - Given the frequency of issues with the (admittedly insufficient) tag parser,
  41. there's a temporary *skip_style_tags* argument to
  42. :py:meth:`~.Parser.parse` that ignores ``''`` and ``'''`` until these issues
  43. are corrected.
  44. - Fixed a parser bug involving nested wikilinks and external links.
  45. - C code cleanup and speed improvements.
  46. v0.3.2
  47. ------
  48. `Released September 1, 2013 <https://github.com/earwig/mwparserfromhell/tree/v0.3.2>`_
  49. (`changes <https://github.com/earwig/mwparserfromhell/compare/v0.3.1...v0.3.2>`__):
  50. - Added support for Python 3.2 (along with current support for 3.3 and 2.7).
  51. - Renamed :py:meth:`.Template.remove`\ 's first argument from *name* to
  52. *param*, which now accepts :py:class:`.Parameter` objects in addition to
  53. parameter name strings.
  54. v0.3.1
  55. ------
  56. `Released August 29, 2013 <https://github.com/earwig/mwparserfromhell/tree/v0.3.1>`_
  57. (`changes <https://github.com/earwig/mwparserfromhell/compare/v0.3...v0.3.1>`__):
  58. - Fixed a parser bug involving URLs nested inside other markup.
  59. - Fixed some typos.
  60. v0.3
  61. ----
  62. `Released August 24, 2013 <https://github.com/earwig/mwparserfromhell/tree/v0.3>`_
  63. (`changes <https://github.com/earwig/mwparserfromhell/compare/v0.2...v0.3>`__):
  64. - Added complete support for HTML :py:class:`Tags <.Tag>`, including forms like
  65. ``<ref>foo</ref>``, ``<ref name="bar"/>``, and wiki-markup tags like bold
  66. (``'''``), italics (``''``), and lists (``*``, ``#``, ``;`` and ``:``).
  67. - Added support for :py:class:`.ExternalLink`\ s (``http://example.com/`` and
  68. ``[http://example.com/ Example]``).
  69. - :py:class:`Wikicode's <.Wikicode>` :py:meth:`.filter` methods are now passed
  70. *recursive=True* by default instead of *False*. **This is a breaking change
  71. if you rely on any filter() methods being non-recursive by default.**
  72. - Added a :py:meth:`.matches` method to :py:class:`~.Wikicode` for
  73. page/template name comparisons.
  74. - The *obj* param of :py:meth:`Wikicode.insert_before() <.insert_before>`,
  75. :py:meth:`~.insert_after`, :py:meth:`~.Wikicode.replace`, and
  76. :py:meth:`~.Wikicode.remove` now accepts :py:class:`~.Wikicode` objects and
  77. strings representing parts of wikitext, instead of just nodes. These methods
  78. also make all possible substitutions instead of just one.
  79. - Renamed :py:meth:`Template.has_param() <.has_param>` to
  80. :py:meth:`~.Template.has` for consistency with :py:class:`~.Template`\ 's
  81. other methods; :py:meth:`~.has_param` is now an alias.
  82. - The C tokenizer extension now works on Python 3 in addition to Python 2.7.
  83. - Various bugfixes, internal changes, and cleanup.
  84. v0.2
  85. ----
  86. `Released June 20, 2013 <https://github.com/earwig/mwparserfromhell/tree/v0.2>`_
  87. (`changes <https://github.com/earwig/mwparserfromhell/compare/v0.1.1...v0.2>`__):
  88. - The parser now fully supports Python 3 in addition to Python 2.7.
  89. - Added a C tokenizer extension that is significantly faster than its Python
  90. equivalent. It is enabled by default (if available) and can be toggled by
  91. setting :py:attr:`mwparserfromhell.parser.use_c` to a boolean value.
  92. - Added a complete set of unit tests covering parsing and wikicode
  93. manipulation.
  94. - Renamed :py:meth:`.filter_links` to :py:meth:`.filter_wikilinks` (applies to
  95. :py:meth:`.ifilter` as well).
  96. - Added filter methods for :py:class:`Arguments <.Argument>`,
  97. :py:class:`Comments <.Comment>`, :py:class:`Headings <.Heading>`, and
  98. :py:class:`HTMLEntities <.HTMLEntity>`.
  99. - Added *before* param to :py:meth:`Template.add() <.Template.add>`; renamed
  100. *force_nonconformity* to *preserve_spacing*.
  101. - Added *include_lead* param to :py:meth:`Wikicode.get_sections()
  102. <.get_sections>`.
  103. - Removed *flat* param from :py:meth:`.get_sections`.
  104. - Removed *force_no_field* param from :py:meth:`Template.remove()
  105. <.Template.remove>`.
  106. - Added support for Travis CI.
  107. - Added note about Windows build issue in the README.
  108. - The tokenizer will limit itself to a realistic recursion depth to prevent
  109. errors and unreasonably long parse times.
  110. - Fixed how some nodes' attribute setters handle input.
  111. - Fixed multiple bugs in the tokenizer's handling of invalid markup.
  112. - Fixed bugs in the implementation of :py:class:`.SmartList` and
  113. :py:class:`.StringMixIn`.
  114. - Fixed some broken example code in the README; other copyedits.
  115. - Other bugfixes and code cleanup.
  116. v0.1.1
  117. ------
  118. `Released September 21, 2012 <https://github.com/earwig/mwparserfromhell/tree/v0.1.1>`_
  119. (`changes <https://github.com/earwig/mwparserfromhell/compare/v0.1...v0.1.1>`__):
  120. - Added support for :py:class:`Comments <.Comment>` (``<!-- foo -->``) and
  121. :py:class:`Wikilinks <.Wikilink>` (``[[foo]]``).
  122. - Added corresponding :py:meth:`.ifilter_links` and :py:meth:`.filter_links`
  123. methods to :py:class:`.Wikicode`.
  124. - Fixed a bug when parsing incomplete templates.
  125. - Fixed :py:meth:`.strip_code` to affect the contents of headings.
  126. - Various copyedits in documentation and comments.
  127. v0.1
  128. ----
  129. `Released August 23, 2012 <https://github.com/earwig/mwparserfromhell/tree/v0.1>`_:
  130. - Initial release.