#27150: Document that a name should be provided when wrapping file-like objects
that don't have one with File
--------------------------------------+------------------------------------
     Reporter:  pacahon               |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Documentation         |                  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 timgraham):

 * component:  Core (Other) => Documentation
 * type:  Bug => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 See #26495 for a case where this came up. Unless investigation yields
 otherwise, I think documenting that you should pass a name for file-like
 objects that don't have one is the best course of action. I'm not sure if
 raising an error for that case might be acceptable (there might be use
 cases where providing `name` isn't needed) but if so, they would likely be
 even more helpful.

--
Ticket URL: <https://code.djangoproject.com/ticket/27150#comment:3>
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/065.a44c2d4c807450adcbb3910e124616ed%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to