Commit Graph

7 Commits

Author SHA1 Message Date
Claude Paroz 865cd35c9b Made more extensive usage of context managers with open. 2012-05-05 14:06:36 +02:00
Claude Paroz 3904b74a3f Fixed #18013 -- Use the new 'as' syntax for exceptions.
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29 20:57:15 +02:00
Karen Tracey df7ffe616a Fixed #8900: Added errno=13 (permission denied) to the class of ignored OSErrors when attempting to delete the old file in file_move_safe.
This error was seen on Windows with Pythons < 2.5.  In the case where the error was seen, the old file is auto-deleted on close anyway by the Windows-specific NamedTemporaryFile support.

No new test because the failure could be seen when running the file_uploads test with Python 2.3/2.4 on Windows.  With this fix file_uploads runs clean in that environment.

While in the neignborhood fixed up the docstrings to better match the reality of what the code does and what the function is named.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@10396 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-05 04:41:39 +00:00
Jacob Kaplan-Moss ae953a8c4e Fixed #8673: fixed a missing import in `django.core.files.move`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8720 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 20:00:55 +00:00
Malcolm Tredinnick a9f0ae706a Fixed #8203 -- Fixed temporary file deleation on Windows and a couple of edge
cases on Unix-like systems. Patch from snaury. Testing and verification on
Windows, Mac and Linux from cgrady and ramikassab.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 17:56:02 +00:00
Jacob Kaplan-Moss 58cd4902a7 Fixed #4948, a race condition in file saving. Thanks to Martin von Löwis, who diagnosed the problem and pointed the way to a fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8306 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 16:51:18 +00:00
Jacob Kaplan-Moss d725cc9734 Fixed #2070: refactored Django's file upload capabilities.
A description of the new features can be found in the new [http://www.djangoproject.com/documentation/upload_handing/ upload handling documentation]; the executive summary is that Django will now happily handle uploads of large files without issues.

This changes the representation of uploaded files from dictionaries to bona fide objects; see BackwardsIncompatibleChanges for details.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-01 15:10:51 +00:00