Skip to content
Myr

Ensure that .raw() is present after unpickling.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Some people will assume that .raw() is present, and they shouldn't get AttributeErrors when they make that assumption on a pickled Response. However, @kennethreitz has asked that we not be too dependent on urllib3. For that reason, set to None.

authored by Cory Benfield · committed by Cory Benfield · parent 03f444e · Browse files · 1 file+1 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−0 removed

  • other:+1 added−0 removed

1 file+1 added−0 removed

modified:requests/models.py+1 added
573 unmodified lines
574 setattr(self, name, value)575576 # pickled objects do not have .raw577 setattr(self, '_content_consumed', True)578 setattr(self, 'raw', None)579580 def __repr__(self):581 return '<Response [%s]>' % (self.status_code)582
219 unmodified lines