chibisov / drf-extensions

DRF-extensions is a collection of custom extensions for Django REST Framework
http://chibisov.github.io/drf-extensions/docs
MIT License
1.48k stars 208 forks source link

"'Response' object has no attribute '_headers'" #314

Closed LiamK closed 3 years ago

LiamK commented 3 years ago

I think I found an issue.
After updates (of everything basically) things appear stable, however the API was reporting "'Response' object has no attribute '_headers'"

I commented out line 91 in rest_framework_extensions/cache/decorators.py

response._headers.copy()

and it went away. I'm guessing this is caused by a change in Django 3.2. The introduced a HttpResponse.headers field, but I tried replacing it like this and got a (different) error (not enough values to unpack (expected 3, got 2)) response.headers.copy()

Django==3.2 djangorestframework==3.12.4 drf-extensions==0.7.0 Python 3.9.1

daggaz commented 3 years ago

duplicate of #306

domdinicola commented 3 years ago

duplicate of https://github.com/chibisov/drf-extensions/issues/313

auvipy commented 3 years ago

i will try to cut on monday

auvipy commented 3 years ago

done. please consider donating for my time