This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author craigneuro
Recipients craigneuro
Date 2008-05-12.19:44:25
SpamBayes Score 0.11542282
Marked as misclassified No
Message-id <1210621474.39.0.327877522239.issue2840@psf.upfronthosting.co.za>
In-reply-to
Content
This was observed in Python 2.5.2 on Windows XP.  Run this code in IDLE:

import xml.sax
from xml.sax.handler import ContentHandler
class C(ContentHandler):
	def startElement(self, name, attrs):
		assert False

xml.sax.parse(xml_path, C())

Where "xml_path" points to a well-formed XML file.  This will raise an
AssertionError.  Then, attempt to modify or delete the XML file that was
specified; it's still locked by the Python process.

Deleting the ContentHandler does not unlock it.  There doesn't seem any
way to unlock it aside from terminating the Python process.

If the ContentHandler doesn't raise an exception or error, the file is
unlocked properly.
History
Date User Action Args
2008-05-12 19:44:37craigneurosetspambayes_score: 0.115423 -> 0.11542282
recipients: + craigneuro
2008-05-12 19:44:34craigneurosetspambayes_score: 0.115423 -> 0.115423
messageid: <1210621474.39.0.327877522239.issue2840@psf.upfronthosting.co.za>
2008-05-12 19:44:33craigneurolinkissue2840 messages
2008-05-12 19:44:29craigneurocreate