[New-bugs-announce] [issue19614] support.temp_cwd should use support.rmtree

R. David Murray report at bugs.python.org
Fri Nov 15 18:44:46 CET 2013


New submission from R. David Murray:

Based on this error on one of the buildbots, it is clear that support.temp_cwd should be calling support.rmtree, and not shutil.rmtree, during cleanup:

[...]
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\runpy.py", line 160, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\runpy.py", line 73, in _run_code
    exec(code, run_globals)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\regrtest.py", line 1585, in <module>
    main_in_temp_cwd()
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\regrtest.py", line 1560, in main_in_temp_cwd
    main()
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 868, in temp_cwd
    yield cwd_dir
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 822, in temp_dir
    shutil.rmtree(path)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 477, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 376, in _rmtree_unsafe
    onerror(os.rmdir, path, sys.exc_info())
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 374, in _rmtree_unsafe
    os.rmdir(path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\buildbot.python.org\\3.x.kloth-win64\\build\\build\\test_python_4744'
[...]

----------
components: Tests
keywords: buildbot, easy
messages: 202962
nosy: r.david.murray
priority: normal
severity: normal
stage: needs patch
status: open
title: support.temp_cwd should use support.rmtree
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19614>
_______________________________________


More information about the New-bugs-announce mailing list