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.6 KiB

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