Opened 15 years ago
Closed 13 years ago
#15197 closed Bug (fixed)
yaml serialization to HttpResponse fails
| Reported by: | fourga38 | Owned by: | Hiroki Kiyohara |
|---|---|---|---|
| Component: | Core (Serialization) | Version: | 1.2 |
| Severity: | Normal | Keywords: | yaml |
| Cc: | hirokiky@… | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
In django.core.serializers.pyyaml, the getvalue() method should check if self.stream has also a getvalue() method, which is not the case of HttpResponse objects.
Attachments (4)
Change History (19)
comment:1 by , 15 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 15 years ago
| Severity: | → Normal |
|---|---|
| Type: | → Bug |
comment:3 by , 14 years ago
| UI/UX: | unset |
|---|
comment:5 by , 13 years ago
| Cc: | added |
|---|---|
| Has patch: | set |
comment:6 by , 13 years ago
| Needs tests: | set |
|---|
comment:7 by , 13 years ago
| Owner: | changed from to |
|---|
by , 13 years ago
| Attachment: | test_serializers_http.patch added |
|---|
Added a test using HttpResponse to streamTest
comment:8 by , 13 years ago
| Needs tests: | unset |
|---|
comment:9 by , 13 years ago
Thanks for your work. Here is an alternative approach. However, adding a new method to HttpResponse is not to be taken lightly, therefore I'd like to have another core dev approval for this.
comment:10 by , 13 years ago
Thank you. It's nice to be able to get the value with same method from both StringIO and HttpResponse. We may use them with same name 'stream'. However, I fell, adding a new method to HttpResponse is far from this ticket. This problem should be solved in new ticket (e.g. Adding getvalue to HttpResponse).
comment:11 by , 13 years ago
You're totally right. I'm attaching a revised patch. Ticket #18523 created.
comment:12 by , 13 years ago
Nice. I have been convinced. I wait another core dev approval for this too.
comment:13 by , 13 years ago
It doesn't need a second approval if we don't change HttpResponse API. Just mark it as Ready for checkin and I will commit it soon.
comment:15 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Change UI/UX from NULL to False.