~ubuntu-branches/ubuntu/trusty/python-meld3/trusty

« back to all changes in this revision

Viewing changes to CHANGES.txt

  • Committer: Bazaar Package Importer
  • Author(s): Anders Hammarquist
  • Date: 2009-07-30 11:04:50 UTC
  • Revision ID: james.westby@ubuntu.com-20090730110450-4dwqbhp8kzokahy5
Tags: upstream-0.6.5
ImportĀ upstreamĀ versionĀ 0.6.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
0.6.5
 
2
 
 
3
  Apply patch for Python 2.5 compatibility from both
 
4
  Toshio and Anders.
 
5
 
 
6
  Create distro tarball via:
 
7
 
 
8
   rm MANIFEST
 
9
   USE_MELD3_EXTENSION_MODULES=1 python setup.py sdist
 
10
 
 
11
  .. in order to get the cmeld3.c file in the distribution.
 
12
0.6.4
 
13
 
 
14
  Make the default build use the Python-based meld "helper" instead of
 
15
  the C-based one.  Since the primary consumer of meld3 (as far as I
 
16
  know) is "supervisor", and since the typical supervisor consumer is
 
17
  likely not to have a C compiler and Python development libraries on
 
18
  his system, it makes more sense for the default build not to compile
 
19
  the C extensions.  However, if the environment variable
 
20
  "USE_MELD3_EXTENSION_MODULES" is set when "setup.py install" is
 
21
  invoked, the C extensions will be built.  meld3 is much slower
 
22
  without the C extensions, so using "USE_MELD3_EXTENSION_MODULES" is
 
23
  usually a good idea for performance-sensitive systems.
 
24
 
 
25
  As a result of this change, the "NO_MELD3_EXTENSION_MODULES"
 
26
  environment variable introduced in 0.6.1 now has no effect.
 
27
 
 
28
0.6.3
 
29
 
 
30
  Fixed two more memory leaks (one in bfclonehandler, the other in
 
31
  findmeldhandler) in the c helper module.
 
32
 
 
33
0.6.2
 
34
 
 
35
  Fixed a number of memory leaks in the C implementation of the helper
 
36
  module.  Any use of "findmeld", "clone", "getiterator", or "content"
 
37
  previously leaked references.
 
38
 
 
39
0.6.1
 
40
 
 
41
  Allow people to install meld3 without building extension modules.
 
42
  If the environment variable "NO_MELD3_EXTENSION_MODULES" is set, the
 
43
  meld3 setup.py file will not build any extension modules.  meld3
 
44
  will still work, only more slowly than if the extension modules
 
45
  existed.
 
46
 
 
47
0.6
 
48
 
 
49
  Fixed crashbug when repeating trees with "structure" nodes in them.
 
50
  Symptom: bus error.  Thanks to Terrence Brannon for the report.
 
51
 
 
52
0.5
 
53
 
 
54
  Add 'fillmeldhtmlform' method to nodes.
 
55
 
 
56
  Fix obscure parsing bug that arose when attempting to change the
 
57
  URI used as a "meld id" (do not lowercase).
 
58
 
 
59
  Added three methods to element nodes:
 
60
 
 
61
    write_htmlstring
 
62
    write_xmlstring
 
63
    write_xhtmlstring
 
64
 
 
65
  These methods have the same respective argument lists as their
 
66
  "write_foo" cousins, except they don't accept a "file" argument.
 
67
  Instead of writing to a file, they return a string containing the
 
68
  renderering of the element.
 
69
 
 
70
  You can now use the meld3.py module to interactively try out
 
71
  different renderings.  To do this, invoke meld3.py with a filename
 
72
  and a dotted-python-path name to a mutator function that accepts a
 
73
  single argument (the root element), e.g.:
 
74
 
 
75
    python meld3.py sample.html meld3.sample_mutator
 
76
 
 
77
  The rendering will be sent to stdout
 
78
 
 
79
  Remove unused parse method.
 
80
 
 
81
  Add __setslice__, __delslice__, remove methods that correctly update
 
82
  parent pointers.
 
83
 
 
84
  Don't call into superclass to do append, insert, __setitem__, etc.
 
85
 
 
86
  Internal speedups:
 
87
 
 
88
    - Avoid function call overhead in various places by inlining code.
 
89
 
 
90
    - _write_html/_write_xml now accept a callable "write" argument
 
91
      instead of a file argument (avoid file.write call overhead).
 
92
 
 
93
    - HTML serializer only calls _escape_cdata/_escape_attrib if necessary
 
94
      instead of calling it without regard to its need.
 
95
 
 
96
    - Use string.encode(encoding) instead of calling an _encode function.
 
97
 
 
98
    - Perform special-case rendering for English-centric encodings
 
99
      during write_html.
 
100
 
 
101
    - Ignore things that might be "QNames" during rendering.
 
102
 
 
103
    - "getiterator", "content", "clone", and "findmeld" now
 
104
      implemented in a C module.  Experimental.  Disable via changing
 
105
      "import cmeld3 as helper" in meld3.py to something like "import
 
106
      wontbehere".
 
107
 
 
108
  Fix text and attribute serialization to only quote ampersands that
 
109
  aren't already part of entities.
 
110
 
 
111
  Do the minimal possible thing to escape text and attribute values during
 
112
  rendering.  For text, this is escaping ampersands that aren't parts of 
 
113
  entities and the less-than (<) character.  For attribute values, this is
 
114
  amps and less-than as well as the quote (") character.  This was done
 
115
  partly because I think the spec allows it but it's also what Kid does,
 
116
  shrug.
 
117
 
 
118
  Change 'diffmeld()' to return a dictionary of dictionaries.  The
 
119
  dictionary returned by diffmeld has the keys 'reduced' and
 
120
  'unreduced'.  the values of both 'reduced' and 'unreduced' is
 
121
  another dictionary.  The leafmost dictionary has the keys 'added',
 
122
  'removed', and 'moved.  In the 'unreduced' dictionary, *all* meld
 
123
  tags that have been added, removed, or moved are present (this was
 
124
  the behavior of diffmeld previously).  In the 'reduced' dictionary,
 
125
  the added, removed, and moved values are reduced to the smallest
 
126
  number of tags which share a common lineage.
 
127
 
 
128
  Add a meldprofile.py script.
 
129
 
 
130
0.4
 
131
 
 
132
  The clone() method of elements copied neither the text nor the tail
 
133
  of the element (this is what caused markup created by "repeats" to
 
134
  fall all on one line).
 
135
 
 
136
  Add diffing capability to meld nodes.  The file 'melddiff.py' shows an
 
137
  example of using the diff API.
 
138
 
 
139
  Add a 'meldid()' method to elements.  This returns None if the element
 
140
  has no meld id, otherwise it returns the id.
 
141
 
 
142
  Add a 'fillmeld(**kw)' method to elements.  This does the same thing
 
143
  as '__mod__' but returns meld ids (the keys of **kw) that cannot be
 
144
  found anywhere in the tree.
 
145
 
 
146
  Make source distro into a distutils-installable package.
 
147
 
 
148
0.3
 
149
 
 
150
  Fix broken example.py file.
 
151
 
 
152
  Add ZPT-alike methods on elements: 'content', 'replace', and
 
153
  'attributes'.  'content' replaces the node's content; 'replace'
 
154
  replaces the node itself with a text value, and 'attributes' sets
 
155
  the attributes of the node.  Using the ElementTree API to do the
 
156
  same things usually causes the code to run faster, but these
 
157
  functions are more convenient and more easily grokked by ZPT people.
 
158
 
 
159
  Override __delitem__ on meld elements in order to relieve deleted
 
160
  items of their parent pointers.
 
161
 
 
162
  Strip all xhtml namespace identifiers out of XHTML output.  Browsers
 
163
  just can't deal with this.
 
164
 
 
165
  Undocumented element API method 'remove' renamed to 'deparent' (it
 
166
  was shadowing an ElementTree API method).
 
167
 
 
168
  Documentation improvements and change examples to use ZPT-alike
 
169
  methods.
 
170
 
 
171
  Add support for HTML input files.  Input files don't need to be
 
172
  strictly well-formed XML anymore.
 
173
 
 
174
  Remove the 'parse' top-level function in favor of explicit separate
 
175
  xml parsing and html parsing functions.
 
176
 
 
177
  Add 'parse_xml' and 'parse_html' top-level parsing functions.
 
178
 
 
179
  Add 'parse_xmlstring' and 'parse_htmlstring' module-scope functions
 
180
  which calls their respective 'parse_xxx' function with a StringIO
 
181
  containing the passed text.
 
182
 
 
183
 
 
184
0.2
 
185
 
 
186
  Use a method on elements to do writing rather than requiring a user
 
187
  call a "write" function.  The equivalent is now a method of the
 
188
  element named "write_xml".  element.write_xml(file) performs a write
 
189
  of XML into the file.  element.write_xml(...) includes an XML
 
190
  declaration in its serialization (but no doctype, at least by
 
191
  default).
 
192
 
 
193
  Various non-XML serialization methods have been added.  The default
 
194
  arguments of these serialization methods are what I'm guessing are
 
195
  the most common cases desired for various kinds of qoutput::
 
196
 
 
197
     element.write_html(...).  This serializes the node and its
 
198
     children to HTML.  This feature was inspired by and based on code
 
199
     Ian Bicking.  By default, the serialization will include a
 
200
     'loose' HTML DTD doctype (this can be overridden with the
 
201
     doctype= argument).  "Empty" shortcut elements such as "<div/>"
 
202
     will be converted to a balanced pair of tags e.g. "<div></div>".
 
203
     But some HTML tags (defined as per the HTML 4 spec as area, base,
 
204
     basefont, br, col, frame, hr, img, input, isindex, link, meta,
 
205
     param) will not be followed with a balanced ending tag; only the
 
206
     beginning tag will be output.  Additionally, "boolean" tag
 
207
     attributes will not be followed with any value.  The "boolean"
 
208
     tags are selected, checked, compact, declare, defer, disabled,
 
209
     ismap, multiple, nohref, noresize, noshade, and nowrap.  So the
 
210
     XML input "<input type="checkbox" checked="checked"/>" will be
 
211
     turned into "<input type="checkbox" checked>".  Additionally,
 
212
     'script' and 'style' tags will not have their contents escaped
 
213
     (e.g. so "&" will not be turned into &amp; when it's iside the
 
214
     textual content of a script or style tag.)
 
215
 
 
216
     element.write_xhtml(...).  This serializes the node and its
 
217
     children to XHTML.  By default, the serialization will include a
 
218
     'loose' XHTML doctype (this can be overridden with the doctype=
 
219
     argument).  No XML declaration is included in the serialization by
 
220
     default.  If you want to serialize an XML declaration, pass
 
221
     'declaration=True'.
 
222
 
 
223
  All serialization methods have a number of optional
 
224
  arguments::
 
225
 
 
226
     fragment: If this is true, serialize an element as a "fragment".
 
227
     When an element is serialized as a fragment, it will not include
 
228
     either a declaration nor a doctype (the declaration= and doctype=
 
229
     arguments will be ignored).
 
230
 
 
231
     doctype: Output a custom doctype during the writing of XML and
 
232
     HTML (see write, write_xml, write_xhtml, and write_html).  Use
 
233
     the constants in meld3.doctype (xhtml, xhtml_strict, html, and
 
234
     html_strict) to avoid passing a literal 3-tuple of (name, pubid,
 
235
     system) as the doctype parameter.  If fragment=True is specified
 
236
     for serialization, this argument has no effect.
 
237
 
 
238
     encoding: Specify a character encoding to be used during writing
 
239
     (see write, write_xml write_html, and write_xhtml).  The encoding
 
240
     must be a valid Python codec name (e.g. 'utf-8').  If this is
 
241
     provided for write_xml and write_xhtml, and the XML declaration
 
242
     is serialized, the declaration will include the encoding.  If an
 
243
     encoding is passed to write_html, no explicit encoding is
 
244
     included in the declaration but the serialization will be done
 
245
     with utf-8.
 
246
 
 
247
  XML serializations (write_xml and write_xhtml) have the
 
248
  aforementioned arguments but expose two additional optional
 
249
  arguments::
 
250
 
 
251
     declaration: If this is true, an xml declaration header is output
 
252
     during the writing of XML (see write, write_xml, and
 
253
     write_xhtml).  If the encoding is specified, and the
 
254
     serialization is meant to include an XML declaration (via
 
255
     declaration=), the declaration will include the encoding.  If
 
256
     'fragment=True' is specified for serialization, this argument has
 
257
     no effect.  It doesn't matter if your input document had a
 
258
     declaration header; this option must be used to control
 
259
     declaration output.
 
260
 
 
261
     pipeline: If this is true, allow meld identifiers to be preserved
 
262
     during the writing of XML and XHTML (see write, write_xml and
 
263
     write_xhtml).  meld identifiers cannot be preserved on HTML
 
264
     serializations because HTML doesn't understand namespaces.
 
265
 
 
266
  HTML entities can now be parsed properly (magically) when a DOCTYPE
 
267
  is not supplied in the source of the XML passed to 'parse'.  If your
 
268
  source document does not contain a DOCTYPE declaration, the DOCTYPE
 
269
  is set to 'loose' XHTML 'by magic'.  If your source document does
 
270
  contain a DOCTYPE declaration, the existing DOCTYPE is used (and
 
271
  HTML entities thus may or may not work as a result, depending on the
 
272
  DOCTYPE).  To prevent this behavior, pass a false value to the
 
273
  xhtml= parameter of the 'parse' function.  This in no way effects
 
274
  output, which is independent of parsing.  This does not imply that
 
275
  any *non*-HTML entity can be parsed in the input stream under any
 
276
  circumstance without having it defined it in your source document.
 
277
 
 
278
  Comments are now preserved in output.  They are also present in the
 
279
  ElementTree node tree (as Comment elements), so beware. Processing
 
280
  instructions (e.g. <?xml version="1.0">) are completely thrown away
 
281
  at parse time and do not exist anywhere in the element tree.
 
282
 
 
283
  Avoid use of deepcopy in the clone() method of elements (much
 
284
  speedier to explicitly recurse).
 
285
 
 
286
  The "meld helper" namespace (e.g. element.meld) is no longer present
 
287
  or supported.  Instead of using element.meld['foo'] to find an
 
288
  element with the meld:id "foo", use element.findmeld('foo').  This
 
289
  returns None if the node cannot be found.  Instead of using
 
290
  element.meld.get('foo', 'somedefault'), use element.findmeld('foo',
 
291
  'somedefault').  Instead of using element.meld.repeat(...), use
 
292
  element.repeat(...).
 
293
 
 
294
  Elements now support a __mod__ which can accept a dictionarylike
 
295
  operand and which causes the text of elements with meld ids which
 
296
  match the keys in the dictionary to be set to the key's value in the
 
297
  dictionary.  For example, if an element contains subelements with
 
298
  the meld ids "foo" and "bar", you can replace those nodes' text
 
299
  values with the following::
 
300
    
 
301
    element % {'foo':'foo text', 'bar':'bar text'}
 
302
 
 
303
  __mod__ will not accept a non-dictionary-like object (such as a list
 
304
  or tuple).  __mod__ will never raise an error unless you pass it a
 
305
  non-dictionary-like object; if it can't find a node corresponding to
 
306
  a key in the dictionary, it moves on to the next key.  Only the text
 
307
  values of the nodes which are found during this process are
 
308
  replaced.
 
309
 
 
310
  Using duplicate meld identifiers on separate elements in the document
 
311
  now causes a ValueError to be raised at parse time.
 
312
 
 
313
0.1
 
314
 
 
315
   Initial release.
 
316
 
 
317