Message10010
Logged In: YES
user_id=3066
I don't remember if the cycle detector was enabled by
default in 2.1.* -- that all seems so long ago!
The content handler ends up being part of a circular
reference cycle, with the ExpatParser acting as it's own
locator object. This happens because the parser references
the content handler, and hands a reference to itself for the
content handler to squirrel away as the locator.
I see two approaches to removing this dependency. The first
is simply to call setDocumentLocator(None) after calling
endDocument(), but that's fragile; it assumes the parse gets
that far. The second is to use a separate object to provide
the locator to the content handler; this seems more robust
as it doesn't assume that the parse succeeds.
I'll start on a patch that uses the second approach.
Martin, do you see any other alternatives? There will be a
2.1.3 release for other reasons, BTW, so this might make it in. |
|
Date |
User |
Action |
Args |
2007-08-23 14:00:09 | admin | link | issue535474 messages |
2007-08-23 14:00:09 | admin | create | |
|