GoogleCloudPlatform / appengine-gcs-client

App Engine-Cloud Storage custom client library
Apache License 2.0
124 stars 112 forks source link

Support for pip install for Python3 #78

Open matwilso opened 5 years ago

matwilso commented 5 years ago

The Google Cloud Storage docs (here) show how to read and write to Cloud Storage using this library. I tried to install this with pip, but when I try to use python3, it fails as in this SO post, because the changes in https://github.com/GoogleCloudPlatform/appengine-gcs-client/pull/33 have not been uploaded to PyPI.

I saw here (https://github.com/GoogleCloudPlatform/appengine-gcs-client/pull/33), that they suggest using the google-cloud-python library. If that is indeed the recommend library, then the GCS docs should be updated. If it is not, the version number in setup.py needs to be bumped up and the new version needs to be uploaded to PyPI.

matwilso commented 5 years ago

Update: I just tried a workaround of installing from this repo directly:

pip install git+https://github.com/GoogleCloudPlatform/appengine-gcs-client.git#subdirectory=python/src

But it looks like there are some other Python3 incompatibilities, like httplib vs. http.client. It is going to be a bit more involved to add Python3 support. I get the error:

~/code/.ll4ma_env/lib/python3.6/site-packages/cloudstorage/api_utils.py in <module>()
     22 
     23 import copy
---> 24 import httplib
     25 import logging
     26 import math

ModuleNotFoundError: No module named 'httplib'
frankyn commented 5 years ago

Thanks for the feedback @matwilso. Will follow-up internally.

EngineerCoding commented 5 years ago

Could we possibly get a status update about this? I really need this for my project (or otherwise I am considering to simply use the google-cloud-storage lib instead of this one). I know we devs are always busy, but it would pleasant to know whether this is going to be fixed in the near-future or in 2020 for example.

frankyn commented 5 years ago

Afaik, It isn't planned at this time. I recommend you use the google-cloud-storage package as it's actively maintained.