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 ocean-city
Recipients ocean-city
Date 2010-09-10.07:18:15
SpamBayes Score 3.46612e-13
Marked as misclassified No
Message-id <>
I noticed regrtest claimed it cannot delete folder after test_tarfile
ran. It was like this.

Traceback (most recent call last):
  File "e:\python-dev\py3k\lib\", line 160, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "e:\python-dev\py3k\lib\", line 73, in _run_code
    exec(code, run_globals)
  File "e:\python-dev\py3k\lib\test\", line 1566, in <module>
  File "e:\python-dev\py3k\lib\test\", line 1563, in test_main
  File "e:\python-dev\py3k\lib\", line 283, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "e:\python-dev\py3k\lib\", line 281, in rmtree
WindowsError: [Error 32] プロセスはファイルにアクセスできません。別のプロセスが
使用中です。: 'E:\\PYTHON~1\\py3k\\@test_5276_tmp\\tmp.tar'

# It says "Process cannot access the file. Another process is using it."

I tried to reproduce this by running test_tarfile alone, but failed.
But I succeeded to do it with following command.
  py3k -m test.regrtest test_capi test_tarfile

(Probably there is timing problem like GC... The reason why I think
so is below)

I think _Stream object left opened after exception occured in (even
after returned from function Tarfile#open) because it lives in stack
frame. Because t._extfileobj is True by default, TarFile object won't close it explicitly.
Date User Action Args
2010-09-10 07:18:20ocean-citysetrecipients: + ocean-city
2010-09-10 07:18:20ocean-citysetmessageid: <>
2010-09-10 07:18:17ocean-citylinkissue9815 messages
2010-09-10 07:18:16ocean-citycreate