From 8dfa4d429dce94b671dc3e3755e52ab82733f61a Mon Sep 17 00:00:00 2001 From: "Richard S. Leung" Date: Fri, 16 Jul 2021 09:44:26 +0900 Subject: [PATCH] docs: remove and replace deprecated function download_as_string() (#508) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove deprecated function download_as_string(), replace with download_as_bytes(). [1] [1] https://github.com/googleapis/python-storage/blob/master/google/cloud/storage/blob.py#L138 Fixes #504 🦕 --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index bb15ee569..4b64e1023 100644 --- a/README.rst +++ b/README.rst @@ -98,7 +98,7 @@ how to create a bucket. bucket = client.get_bucket('bucket-id-here') # Then do other things... blob = bucket.get_blob('remote/path/to/file.txt') - print(blob.download_as_string()) + print(blob.download_as_bytes()) blob.upload_from_string('New contents!') blob2 = bucket.blob('remote/path/storage.txt') blob2.upload_from_filename(filename='/local/path.txt')