| 1 |
v0.6.6 (released January 4, 2024): |
| 2 |
|
| 3 |
- Dropped support for end-of-life Python 3.7. |
| 4 |
- Added support for Python 3.12. |
| 5 |
- Raised nested node depth limit from 40 to 100 to match current MediaWiki. (#313) |
| 6 |
|
| 7 |
v0.6.5 (released September 5, 2023): |
| 8 |
|
| 9 |
- Dropped support for end-of-life Python 3.6. |
| 10 |
- Added support for Python 3.11. |
| 11 |
- Fixed parsing of leading zeros in named HTML entities. (#288) |
| 12 |
- Fixed memory leak parsing tags. (#303) |
| 13 |
- Fixed pickling SmartList objects. (#289) |
| 14 |
|
| 15 |
v0.6.4 (released February 14, 2022): |
| 16 |
|
| 17 |
- Dropped support for end-of-life Python 3.5. |
| 18 |
- Added support for Python 3.10. (#278) |
| 19 |
- Fixed a regression in v0.6.2 that broke parsing of nested wikilinks in file |
| 20 |
captions. For now, the parser will interpret nested wikilinks in normal links |
| 21 |
as well, even though this differs from MediaWiki. (#270) |
| 22 |
|
| 23 |
v0.6.3 (released September 2, 2021): |
| 24 |
|
| 25 |
- Added Linux AArch64 wheels. (#276) |
| 26 |
- Fixed C integer conversion, manifesting as parsing errors on big-endian |
| 27 |
platforms. (#277) |
| 28 |
|
| 29 |
v0.6.2 (released May 16, 2021): |
| 30 |
|
| 31 |
- Improved parsing of external links. (#232) |
| 32 |
- Fixed parsing of nested wikilinks. |
| 33 |
- Ported tests to pytest. (#237) |
| 34 |
- Moved mwparserfromhell package to src/ dir. |
| 35 |
- There was no 0.6.1 release due to a packaging error. |
| 36 |
|
| 37 |
v0.6 (released December 21, 2020): |
| 38 |
|
| 39 |
Thanks to everyone for their patience with this release! |
| 40 |
|
| 41 |
- Breaking change: dropped support for end-of-life Python 2.7 and 3.4. |
| 42 |
- Added support for Python 3.8 and 3.9. |
| 43 |
- Added binary wheels for Linux and macOS. |
| 44 |
- Updated Wikicode.matches() to recognize underscores as being equivalent |
| 45 |
to spaces. (#216) |
| 46 |
- Added a 'default' parameter to Template.get(), and implement dict-style item |
| 47 |
access for template parameters. (#252) |
| 48 |
- Fixed a rare parsing bug involving deeply nested style tags. (#224) |
| 49 |
- Fixed parsing of section headings inside templates. (#233) |
| 50 |
- Updated HTML tag definitions. |
| 51 |
- Internal refactoring and cleanup. |
| 52 |
|
| 53 |
v0.5.4 (released May 15, 2019): |
| 54 |
|
| 55 |
- Fixed an unlikely crash in the C tokenizer when interrupted while parsing |
| 56 |
a heading. |
| 57 |
|
| 58 |
v0.5.3 (released March 30, 2019): |
| 59 |
|
| 60 |
- Fixed manual construction of Node objects, previously unsupported. (#214) |
| 61 |
- Fixed Wikicode transformation methods (replace(), remove(), etc.) when passed |
| 62 |
an empty section as an argument. (#212) |
| 63 |
- Fixed the parser getting stuck inside malformed tables. (#206) |
| 64 |
|
| 65 |
v0.5.2 (released November 1, 2018): |
| 66 |
|
| 67 |
- Dropped support for end-of-life Python versions 2.6, 3.2, 3.3. (#199, #204) |
| 68 |
- Fixed signals getting stuck inside the C tokenizer until parsing finishes, |
| 69 |
in pathological cases. (#206) |
| 70 |
- Fixed <wbr> not being considered a single-only tag. (#200) |
| 71 |
- Fixed a C tokenizer crash on Python 3.7 when compiled with assertions. (#208) |
| 72 |
- Cleaned up some minor documentation issues. (#207) |
| 73 |
|
| 74 |
v0.5.1 (released March 3, 2018): |
| 75 |
|
| 76 |
- Improved behavior when adding parameters to templates (via Template.add()) |
| 77 |
with poorly formatted whitespace conventions. (#185) |
| 78 |
- Fixed the parser getting stuck in deeply nested HTML tags with unclosed, |
| 79 |
quoted attributes. (#190) |
| 80 |
|
| 81 |
v0.5 (released June 23, 2017): |
| 82 |
|
| 83 |
- Added Wikicode.contains() to determine whether a Node or Wikicode object is |
| 84 |
contained within another Wikicode object. |
| 85 |
- Added Wikicode.get_ancestors() and Wikicode.get_parent() to find all |
| 86 |
ancestors and the direct parent of a Node, respectively. |
| 87 |
- Fixed a long-standing performance issue with deeply nested, invalid syntax |
| 88 |
(issue #42). The parser should be much faster on certain complex pages. The |
| 89 |
"max cycle" restriction has also been removed, so some situations where |
| 90 |
templates at the end of a page were being skipped are now resolved. |
| 91 |
- Made Template.remove(keep_field=True) behave more reasonably when the |
| 92 |
parameter is already empty. |
| 93 |
- Added the keep_template_params argument to Wikicode.strip_code(). If True, |
| 94 |
then template parameters will be preserved in the output. |
| 95 |
- Wikicode objects can now be pickled properly (fixed infinite recursion error |
| 96 |
on incompletely-constructed StringMixIn subclasses). |
| 97 |
- Fixed Wikicode.matches()'s behavior on iterables besides lists and tuples. |
| 98 |
- Fixed len() sometimes raising ValueError on empty node lists. |
| 99 |
- Fixed a rare parsing bug involving self-closing tags inside the attributes of |
| 100 |
unpaired tags. |
| 101 |
- Fixed release script after changes to PyPI. |
| 102 |
|
| 103 |
v0.4.4 (released December 30, 2016): |
| 104 |
|
| 105 |
- Added support for Python 3.6. |
| 106 |
- Fixed parsing bugs involving: |
| 107 |
- wikitables nested in templates; |
| 108 |
- wikitable error recovery when unable to recurse; |
| 109 |
- templates nested in template parameters before other parameters. |
| 110 |
- Fixed parsing file-like objects. |
| 111 |
- Made builds deterministic. |
| 112 |
- Documented caveats. |
| 113 |
|
| 114 |
v0.4.3 (released October 29, 2015): |
| 115 |
|
| 116 |
- Added Windows binaries for Python 3.5. |
| 117 |
- Fixed edge cases involving wikilinks inside of external links and vice versa. |
| 118 |
- Fixed a C tokenizer crash when a keyboard interrupt happens while parsing. |
| 119 |
|
| 120 |
v0.4.2 (released July 30, 2015): |
| 121 |
|
| 122 |
- Fixed setup script not including header files in releases. |
| 123 |
- Fixed Windows binary uploads. |
| 124 |
|
| 125 |
v0.4.1 (released July 30, 2015): |
| 126 |
|
| 127 |
- The process for building Windows binaries has been fixed, and these should be |
| 128 |
distributed along with new releases. Windows users can now take advantage of |
| 129 |
C speedups without having a compiler of their own. |
| 130 |
- Added support for Python 3.5. |
| 131 |
- '<' and '>' are now disallowed in wikilink titles and template names. This |
| 132 |
includes when denoting tags, but not comments. |
| 133 |
- Fixed the behavior of preserve_spacing in Template.add() and keep_field in |
| 134 |
Template.remove() on parameters with hidden keys. |
| 135 |
- Removed _ListProxy.detach(). SmartLists now use weak references and their |
| 136 |
children are garbage-collected properly. |
| 137 |
- Fixed parser bugs involving: |
| 138 |
- templates with completely blank names; |
| 139 |
- templates with newlines and comments. |
| 140 |
- Heavy refactoring and fixes to the C tokenizer, including: |
| 141 |
- corrected a design flaw in text handling, allowing for substantial speed |
| 142 |
improvements when parsing long strings of plain text; |
| 143 |
- implemented new Python 3.3 PEP 393 Unicode APIs. |
| 144 |
- Fixed various bugs in SmartList, including one that was causing memory issues |
| 145 |
on 64-bit builds of Python 2 on Windows. |
| 146 |
- Fixed some bugs in the release scripts. |
| 147 |
|
| 148 |
v0.4 (released May 23, 2015): |
| 149 |
|
| 150 |
- The parser now falls back on pure Python mode if C extensions cannot be |
| 151 |
built. This fixes an issue that prevented some Windows users from installing |
| 152 |
the parser. |
| 153 |
- Added support for parsing wikicode tables (patches by David Winegar). |
| 154 |
- Added a script to test for memory leaks in scripts/memtest.py. |
| 155 |
- Added a script to do releases in scripts/release.sh. |
| 156 |
- skip_style_tags can now be passed to mwparserfromhell.parse() (previously, |
| 157 |
only Parser().parse() allowed it). |
| 158 |
- The 'recursive' argument to Wikicode's filter methods now accepts a third |
| 159 |
option, RECURSE_OTHERS, which recurses over all children except instances of |
| 160 |
'forcetype' (for example, `code.filter_templates(code.RECURSE_OTHERS)` |
| 161 |
returns all un-nested templates). |
| 162 |
- The parser now understands HTML tag attributes quoted with single quotes. |
| 163 |
When setting a tag attribute's value, quotes will be added if necessary. As |
| 164 |
part of this, Attribute's 'quoted' attribute has been changed to 'quotes', |
| 165 |
and is now either a string or None. |
| 166 |
- Calling Template.remove() with a Parameter object that is not part of the |
| 167 |
template now raises ValueError instead of doing nothing. |
| 168 |
- Parameters with non-integer keys can no longer be created with |
| 169 |
'showkey=False', nor have the value of this attribute be set to False later. |
| 170 |
- _ListProxy.destroy() has been changed to _ListProxy.detach(), and now works |
| 171 |
in a more useful way. |
| 172 |
- If something goes wrong while parsing, ParserError will now be raised. |
| 173 |
Previously, the parser would produce an unclear BadRoute exception or allow |
| 174 |
an incorrect node tree to be build. |
| 175 |
- Fixed parser bugs involving: |
| 176 |
- nested tags; |
| 177 |
- comments in template names; |
| 178 |
- tags inside of <nowiki> tags. |
| 179 |
- Added tests to ensure that parsed trees convert back to wikicode without |
| 180 |
unintentional modifications. |
| 181 |
- Added support for a NOWEB environment variable, which disables a unit test |
| 182 |
that makes a web call. |
| 183 |
- Test coverage has been improved, and some minor related bugs have been fixed. |
| 184 |
- Updated and fixed some documentation. |
| 185 |
|
| 186 |
v0.3.3 (released April 22, 2014): |
| 187 |
|
| 188 |
- Added support for Python 2.6 and 3.4. |
| 189 |
- Template.has() is now passed 'ignore_empty=False' by default instead of True. |
| 190 |
This fixes a bug when adding parameters to templates with empty fields, and |
| 191 |
is a breaking change if you rely on the default behavior. |
| 192 |
- The 'matches' argument of Wikicode's filter methods now accepts a function |
| 193 |
(taking one argument, a Node, and returning a bool) in addition to a regex. |
| 194 |
- Re-added 'flat' argument to Wikicode.get_sections(), fixed the order in which |
| 195 |
it returns sections, and made it faster. |
| 196 |
- Wikicode.matches() now accepts a tuple or list of strings/Wikicode objects |
| 197 |
instead of just a single string or Wikicode. |
| 198 |
- Given the frequency of issues with the (admittedly insufficient) tag parser, |
| 199 |
there's a temporary skip_style_tags argument to parse() that ignores '' and |
| 200 |
''' until these issues are corrected. |
| 201 |
- Fixed a parser bug involving nested wikilinks and external links. |
| 202 |
- C code cleanup and speed improvements. |
| 203 |
|
| 204 |
v0.3.2 (released September 1, 2013): |
| 205 |
|
| 206 |
- Added support for Python 3.2 (along with current support for 3.3 and 2.7). |
| 207 |
- Renamed Template.remove()'s first argument from 'name' to 'param', which now |
| 208 |
accepts Parameter objects in addition to parameter name strings. |
| 209 |
|
| 210 |
v0.3.1 (released August 29, 2013): |
| 211 |
|
| 212 |
- Fixed a parser bug involving URLs nested inside other markup. |
| 213 |
- Fixed some typos. |
| 214 |
|
| 215 |
v0.3 (released August 24, 2013): |
| 216 |
|
| 217 |
- Added complete support for HTML Tags, including forms like <ref>foo</ref>, |
| 218 |
<ref name="bar"/>, and wiki-markup tags like bold ('''), italics (''), and |
| 219 |
lists (*, #, ; and :). |
| 220 |
- Added support for ExternalLinks (http://example.com/ and |
| 221 |
[http://example.com/ Example]). |
| 222 |
- Wikicode's filter methods are now passed 'recursive=True' by default instead |
| 223 |
of False. This is a breaking change if you rely on any filter() methods being |
| 224 |
non-recursive by default. |
| 225 |
- Added a matches() method to Wikicode for page/template name comparisons. |
| 226 |
- The 'obj' param of Wikicode.insert_before(), insert_after(), replace(), and |
| 227 |
remove() now accepts other Wikicode objects and strings representing parts of |
| 228 |
wikitext, instead of just nodes. These methods also make all possible |
| 229 |
substitutions instead of just one. |
| 230 |
- Renamed Template.has_param() to has() for consistency with Template's other |
| 231 |
methods; has_param() is now an alias. |
| 232 |
- The C tokenizer extension now works on Python 3 in addition to Python 2.7. |
| 233 |
- Various bugfixes, internal changes, and cleanup. |
| 234 |
|
| 235 |
v0.2 (released June 20, 2013): |
| 236 |
|
| 237 |
- The parser now fully supports Python 3 in addition to Python 2.7. |
| 238 |
- Added a C tokenizer extension that is significantly faster than its Python |
| 239 |
equivalent. It is enabled by default (if available) and can be toggled by |
| 240 |
setting `mwparserfromhell.parser.use_c` to a boolean value. |
| 241 |
- Added a complete set of unit tests covering parsing and wikicode |
| 242 |
manipulation. |
| 243 |
- Renamed Wikicode.filter_links() to filter_wikilinks() (applies to ifilter as |
| 244 |
well). |
| 245 |
- Added filter methods for Arguments, Comments, Headings, and HTMLEntities. |
| 246 |
- Added 'before' param to Template.add(); renamed 'force_nonconformity' to |
| 247 |
'preserve_spacing'. |
| 248 |
- Added 'include_lead' param to Wikicode.get_sections(). |
| 249 |
- Removed 'flat' param from Wikicode.get_sections(). |
| 250 |
- Removed 'force_no_field' param from Template.remove(). |
| 251 |
- Added support for Travis CI. |
| 252 |
- Added note about Windows build issue in the README. |
| 253 |
- The tokenizer will limit itself to a realistic recursion depth to prevent |
| 254 |
errors and unreasonably long parse times. |
| 255 |
- Fixed how some nodes' attribute setters handle input. |
| 256 |
- Fixed multiple bugs in the tokenizer's handling of invalid markup. |
| 257 |
- Fixed bugs in the implementation of SmartList and StringMixIn. |
| 258 |
- Fixed some broken example code in the README; other copyedits. |
| 259 |
- Other bugfixes and code cleanup. |
| 260 |
|
| 261 |
v0.1.1 (released September 21, 2012): |
| 262 |
|
| 263 |
- Added support for Comments (<!-- foo -->) and Wikilinks ([[foo]]). |
| 264 |
- Added corresponding ifilter_links() and filter_links() methods to Wikicode. |
| 265 |
- Fixed a bug when parsing incomplete templates. |
| 266 |
- Fixed strip_code() to affect the contents of headings. |
| 267 |
- Various copyedits in documentation and comments. |
| 268 |
|
| 269 |
v0.1 (released August 23, 2012): |
| 270 |
|
| 271 |
- Initial release. |