Opened 10 months ago

Closed 10 months ago

Last modified 10 months 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: manfre Owned by: charettes
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 Changed 10 months ago by manfre

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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 Changed 10 months ago by timo

  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Bug

comment:3 Changed 10 months ago by charettes

  • Owner changed from nobody to charettes
  • Status changed from new to assigned

comment:4 Changed 10 months ago by Simon Charette <charette.s@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In e2112edd9ac6a5f1877a62dd1c88d2d1726350de:

Fixed #22772 -- Defer wizard temporary files deletion.

comment:5 Changed 10 months ago by charettes

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 Changed 10 months ago by manfre

Tests no longer fail with the provided commit.

comment:7 Changed 10 months ago by charettes

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 Changed 10 months ago by Simon Charette <charette.s@…>

In 2b13576c8f48bde808f58621ff26e5b1ab3ed4c1:

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

Backport of e2112edd9a from master

comment:9 Changed 10 months ago by charettes

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

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