Add a comment on why we need to use a property.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/e9c7e7ef Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/e9c7e7ef Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/e9c7e7ef Branch: refs/heads/trunk Commit: e9c7e7ef10aab669bb89e5940dba2f69a85bfd1b Parents: 3141188 Author: Tomaz Muraus <[email protected]> Authored: Sun Jan 7 18:19:33 2018 +0100 Committer: Tomaz Muraus <[email protected]> Committed: Sun Jan 7 18:20:24 2018 +0100 ---------------------------------------------------------------------- libcloud/common/base.py | 2 ++ libcloud/http.py | 2 ++ 2 files changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/e9c7e7ef/libcloud/common/base.py ---------------------------------------------------------------------- diff --git a/libcloud/common/base.py b/libcloud/common/base.py index 6dc0589..17ca286 100644 --- a/libcloud/common/base.py +++ b/libcloud/common/base.py @@ -280,6 +280,8 @@ class RawResponse(Response): @property def body(self): + # Note: We use property to avoid saving whole response body into RAM + # See https://github.com/apache/libcloud/pull/1132 for details return self.response.body @property http://git-wip-us.apache.org/repos/asf/libcloud/blob/e9c7e7ef/libcloud/http.py ---------------------------------------------------------------------- diff --git a/libcloud/http.py b/libcloud/http.py index 5e85026..e691937 100644 --- a/libcloud/http.py +++ b/libcloud/http.py @@ -322,4 +322,6 @@ class HttpLibResponseProxy(object): @property def body(self): + # NOTE: We use property to avoid saving whole response body into RAM + # See https://github.com/apache/libcloud/pull/1132 for details return self._response.content
