Skip to content

Commit

Permalink
Removing storage Blob / Object boto naming aliases.
Browse files Browse the repository at this point in the history
Addresses part of googleapis#544.
  • Loading branch information
dhermes committed Jan 26, 2015
1 parent 4570c43 commit 3588ed7
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions gcloud/storage/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,6 @@ def download_to_file(self, file_obj):
download.StreamInChunks(callback=lambda *args: None,
finish_callback=lambda *args: None)

# NOTE: Alias for boto-like API.
get_contents_to_file = download_to_file

def download_to_filename(self, filename):
"""Download the contents of this blob into a named file.
Expand All @@ -263,9 +260,6 @@ def download_to_filename(self, filename):
)
os.utime(file_obj.name, (mtime, mtime))

# NOTE: Alias for boto-like API.
get_contents_to_filename = download_to_filename

def download_as_string(self):
"""Download the contents of this blob as a string.
Expand All @@ -277,9 +271,6 @@ def download_as_string(self):
self.download_to_file(string_buffer)
return string_buffer.getvalue()

# NOTE: Alias for boto-like API.
get_contents_as_string = download_as_string

def upload_from_file(self, file_obj, rewind=False, size=None,
content_type=None, num_retries=6):
"""Upload the contents of this blob from a file-like object.
Expand Down Expand Up @@ -352,9 +343,6 @@ def upload_from_file(self, file_obj, rewind=False, size=None,
else:
http_wrapper.MakeRequest(conn.http, request, retries=num_retries)

# NOTE: Alias for boto-like API.
set_contents_from_file = upload_from_file

def upload_from_filename(self, filename):
"""Upload this blob's contents from the content of a named file.
Expand All @@ -377,9 +365,6 @@ def upload_from_filename(self, filename):
with open(filename, 'rb') as file_obj:
self.upload_from_file(file_obj, content_type=content_type)

# NOTE: Alias for boto-like API.
set_contents_from_filename = upload_from_filename

def upload_from_string(self, data, content_type='text/plain'):
"""Upload contents of this blob from the provided string.
Expand Down Expand Up @@ -407,9 +392,6 @@ def upload_from_string(self, data, content_type='text/plain'):
content_type=content_type)
return self

# NOTE: Alias for boto-like API.
set_contents_from_string = upload_from_string

def make_public(self):
"""Make this blob public giving all users read access.
Expand Down

0 comments on commit 3588ed7

Please sign in to comment.