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