Title: xml parser file lock
Type: behaviour Severity: normal
Components: Core Versions: 2.5.1
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: pjenvey Nosy List: boisgera, gdoutch, pjenvey
Priority: high Keywords:

Created on 2009-09-29.08:25:21 by gdoutch, last changed 2010-04-10.02:13:20 by pjenvey.

File name Uploaded Description Edit Remove gdoutch, 2009-09-29.08:25:20 Sample script including unittest gdoutch, 2009-09-29.08:49:38 Modified Lib\xml\etree\
msg5200 (view) Author: Gareth Doutch (gdoutch) Date: 2009-09-29.08:25:19
I have a problem with an xml file locking after read and/or write.
I have a short sample code with unit test attached. Below are the
outputs from Jython and CPython (v 2.5.4).
I am using Jython 2.5.1 on Windows XP and java version "1.6.0_16".

ERROR: runTest (__main__.TestDelete)
Traceback (most recent call last):
  File "W:\testTeam\SIT\JySit\sit\scripts\", line 73, in tearDown
  File "C:\jython2.5.1\Lib\", line 342, in remove
    raise OSError(0, "couldn't delete file", path)
OSError: [Errno 0] couldn't delete file: 'C:\\testdir\\test.xml'
Ran 1 test in 0.454s
FAILED (errors=1)
Ran 1 test in 0.015s
msg5201 (view) Author: Gareth Doutch (gdoutch) Date: 2009-09-29.08:49:38
Submit a modified file to "cure" the issue.
msg5207 (view) Author: Gareth Doutch (gdoutch) Date: 2009-09-30.12:49:41
I had no problem using this module in Jython 2.2.1
msg5211 (view) Author: Philip Jenvey (pjenvey) Date: 2009-10-01.01:34:18
I don't see how you wouldn't be able to reproduce this on 2.2.1 on Windows 
with the same jython-elementtree, unless you got lucky and GC kicked in 
before you tried removing the file
msg5312 (view) Author: Gareth Doutch (gdoutch) Date: 2009-11-16.16:02:14
msg5649 (view) Author: Philip Jenvey (pjenvey) Date: 2010-04-10.02:13:20
fixed in r7012
Date User Action Args
2010-04-10 02:13:20pjenveysetstatus: open -> closed
resolution: fixed
messages: + msg5649
2009-11-17 04:15:45pjenveysetpriority: high
assignee: pjenvey
2009-11-16 16:02:15gdoutchsetmessages: + msg5312
2009-10-01 01:34:18pjenveysetnosy: + pjenvey, boisgera
messages: + msg5211
2009-09-30 12:49:42gdoutchsetmessages: + msg5207
2009-09-29 08:49:41gdoutchsetfiles: +
messages: + msg5201
2009-09-29 08:25:21gdoutchcreate