Message251234
Lauri changed the version from 3.4 to 3.2, and I was able to reproduce the problem in 3.2.5:
C:\Temp>py -3.2 --version
Python 3.2.5
C:\Temp>py -3.2 nospace.py
removing fill.txt
Traceback (most recent call last):
File "nospace.py", line 8, in <module>
n = f.write(b"\0")
IOError: [Errno 28] No space left on device
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "nospace.py", line 8, in <module>
n = f.write(b"\0")
IOError: [Errno 28] No space left on device
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "nospace.py", line 12, in <module>
os.remove(fill)
WindowsError: [Error 32] The process cannot access the file because it is
being used by another process: 'T:\\fill.txt'
It's a sharing violation, since the file handle isn't closed and wasn't opened with FILE_SHARE_DELETE.
There's no problem in 3.4 or 3.5 since it properly closes the file handle even if flush() fails:
C:\Temp>py -3.4 --version
Python 3.4.3
C:\Temp>py -3.4 nospace.py
removing fill.txt
C:\Temp>py -3.5 --version
Python 3.5.0
C:\Temp>py -3.5 nospace.py
removing fill.txt |
|
Date |
User |
Action |
Args |
2015-09-21 15:54:38 | eryksun | set | recipients:
+ eryksun, paul.moore, vstinner, tim.golden, zach.ware, steve.dower, Lauri Kajan |
2015-09-21 15:54:38 | eryksun | set | messageid: <1442850878.59.0.539219655723.issue25202@psf.upfronthosting.co.za> |
2015-09-21 15:54:38 | eryksun | link | issue25202 messages |
2015-09-21 15:54:38 | eryksun | create | |
|