Message315850
Wow that's old, yeah that's fair (I wouldn't expect this to be backported to any old releases).
Our current "workaround" is to try os.remove, sleep, repeat X times. This seems still racy and not something we'd like to have in our script if it can be resolved upstream. Retried on 2.7.15rc1:
C:\src>del *.log
Could Not Find C:\src\*.log
C:\src>C:\Python2.7.15rc1\python.exe --version
Python 2.7.15rc1
C:\src>C:\Python2.7.15rc1\python.exe racy_windows.py
Logging to 5656.log
Logging to 13068.log
Logging to 27620.log
Logging to 18384.log
Removing 5656.log
ERxception in thread Thread-1:
Traceback (most recent call last):
File "C:\Python2.7.15rc1\lib\threading.py", line 801, in __bootstrap_inner
self.run()
File "C:\Python2.7.15rc1\lib\threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "racy_windows.py", line 19, in __call__
os.remove(file_name)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: '5656.log'
emoving 13068.log
R
emoving 27620.log
Exception in thread Thread-3:
Traceback (most recent call last):
File "C:\Python2.7.15rc1\lib\threading.py", line 801, in __bootstrap_inner
self.run()
File "C:\Python2.7.15rc1\lib\threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "racy_windows.py", line 19, in __call__
os.remove(file_name)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: '27620.log'
Exception in thread Thread-2:
Traceback (most recent call last):
File "C:\Python2.7.15rc1\lib\threading.py", line 801, in __bootstrap_inner
self.run()
File "C:\Python2.7.15rc1\lib\threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "racy_windows.py", line 19, in __call__
os.remove(file_name)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: '13068.log'
Removing 18384.log |
|
Date |
User |
Action |
Args |
2018-04-27 16:56:30 | pbos | set | recipients:
+ pbos, paul.moore, tim.golden, zach.ware, steve.dower |
2018-04-27 16:56:30 | pbos | set | messageid: <1524848190.46.0.682650639539.issue33369@psf.upfronthosting.co.za> |
2018-04-27 16:56:30 | pbos | link | issue33369 messages |
2018-04-27 16:56:30 | pbos | create | |
|