Skip to content
Myr

Weakrefs for Reuqest/Response.

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

Closes #186

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 78b5d9e · Browse files · 1 file+3 added−1 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+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:requests/models.py+3 added-1 removed
9 unmodified lines
10import urllib11import zlib12from Cookie import SimpleCookie13from urlparse import urlparse, urlunparse, urljoin14from weakref import ref1516from .packages import urllib317from .packages.urllib3.filepost import encode_multipart_formdata18
221 unmodified lines
240 # Attach Response to Request.241 self.response = r242243 # Give Response some context.243 self.response.request = self244 self.response.request = ref(self)()245 self.response.request.response = ref(self.response)()246247248 def send(self, anyway=False):249 """Sends the HTTP Request. Populates `Request.response`.
247 unmodified lines