A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

changelog.rst 8.3 KiB

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