A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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