Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#22772 closed Bug (fixed)

django.contrib.formtools test failures on Windows due to failure to delete file that is being used by another process

Reported by: Michael Manfre Owned by: Simon Charette
Component: contrib.formtools Version: 1.7-beta-2
Severity: Release blocker Keywords: Windows
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

One of many similar errors with Windows, Python 2.7, Django stable/1.7.x, and sqlite.

======================================================================
ERROR: test_form_refresh (django.contrib.formtools.tests.wizard.wizardtests.tests.CookieWizardTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\projects\django\django\django\contrib\formtools\tests\wizard\wizardtests\tests.py", line 49, in tearDown
    temp_storage.delete(file)
  File "C:\projects\django\django\django\core\files\storage.py", line 262, in delete
    os.remove(name)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: u'c:\\users\\manfre\\appdata\\local\\temp\\django_sqv5du\\tmpruqopl\\tests.py'                                                                                                                                     

Change History (9)

comment:1 by Michael Manfre, 10 years ago

Bisect:

fa8b4735287c92b03d23823de8a4e1168d1951d9 is the first bad commit
commit fa8b4735287c92b03d23823de8a4e1168d1951d9
Author: Simon Charette <charette.s@…>
Date: Fri Mar 21 03:38:25 2014 -0400

Fixed #22299 -- Cleanup wizard temp files when possible.

Thanks to @erikr for the review.

:040000 040000 de97d643027f86341b993b19cf2b1896112a9ad5 c488ebce1872f6fe8d51ec97e724d30e569c7ed0 M django
:040000 040000 232d71b4aad76a1a62b7e93015ac0863769a04e4 bf1b2199bdd62a95f0666219607ce2a2a8a8a96f M docs

comment:2 by Tim Graham, 10 years ago

Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

comment:3 by Simon Charette, 10 years ago

Owner: changed from nobody to Simon Charette
Status: newassigned

comment:4 by Simon Charette <charette.s@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In e2112edd9ac6a5f1877a62dd1c88d2d1726350de:

Fixed #22772 -- Defer wizard temporary files deletion.

comment:5 by Simon Charette, 10 years ago

While working on my Windows VM I accidently pushed this commit in Django master instead of my feature branch at charettes/django...

Could you give it a try while it's there? It fixed the "The process cannot access the file because it is being used by another process" error for me.

I might have to just revert this commit.

comment:6 by Michael Manfre, 10 years ago

Tests no longer fail with the provided commit.

comment:7 by Simon Charette, 10 years ago

Well at this point if another core developer could review e2112edd9ac6a5f1877a62dd1c88d2d1726350de I would just backport it to 1.7.x if everything is ok.

comment:8 by Simon Charette <charette.s@…>, 10 years ago

In 2b13576c8f48bde808f58621ff26e5b1ab3ed4c1:

[1.7.x] Fixed #22772 -- Defer wizard temporary files deletion.

Backport of e2112edd9a from master

comment:9 by Simon Charette, 10 years ago

Backported to 1.7.x following @timgraham's review.

Note: See TracTickets for help on using tickets.
Back to Top