#27777: File object does not consistently open itself in context manager use
--------------------------------------+------------------------------------
Reporter: Raphael Gaschignard | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: File uploads/storage | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham):
* type: Bug => Cleanup/optimization
* stage: Unreviewed => Accepted
Comment:
From a quick look, I'm not sure about if the change can be done in a
backwards compatible way. The attached patch seems what you have in mind
but it causes a regression in one test. Accepting for further
investigation.
{{{
======================================================================
ERROR: test_filefield_write (file_storage.tests.FileFieldStorageTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/python3.5.3/lib/python3.5/unittest/case.py", line 59, in
testPartExecutor
yield
File "/opt/python3.5.3/lib/python3.5/unittest/case.py", line 601, in run
testMethod()
File "/home/tim/code/django/tests/file_storage/tests.py", line 660, in
test_filefield_write
normal.write(b'updated')
io.UnsupportedOperation: write
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27777#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/062.062e9caeb40cb9ddf419138d40e80f5a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.