diff --git a/docs/bigtable-client-intro.rst b/docs/bigtable-client-intro.rst index 3f43371ec1db..55111ad1dfb5 100644 --- a/docs/bigtable-client-intro.rst +++ b/docs/bigtable-client-intro.rst @@ -1,6 +1,12 @@ Base for Everything =================== +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + To use the API, the :class:`Client ` class defines a high-level interface which handles authorization and creating other objects: diff --git a/docs/bigtable-client.rst b/docs/bigtable-client.rst index fb2d9cec88e4..97dc99f1d177 100644 --- a/docs/bigtable-client.rst +++ b/docs/bigtable-client.rst @@ -1,6 +1,12 @@ Client ~~~~~~ +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + .. automodule:: gcloud.bigtable.client :members: :show-inheritance: diff --git a/docs/bigtable-cluster-api.rst b/docs/bigtable-cluster-api.rst index 17fba96840db..1266fa8e893a 100644 --- a/docs/bigtable-cluster-api.rst +++ b/docs/bigtable-cluster-api.rst @@ -1,6 +1,12 @@ Cluster Admin API ================= +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + After creating a :class:`Client `, you can interact with individual clusters, groups of clusters or available zones for a project. diff --git a/docs/bigtable-cluster.rst b/docs/bigtable-cluster.rst index 9c5276dc462a..f2986b820253 100644 --- a/docs/bigtable-cluster.rst +++ b/docs/bigtable-cluster.rst @@ -1,6 +1,12 @@ Cluster ~~~~~~~ +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + .. automodule:: gcloud.bigtable.cluster :members: :show-inheritance: diff --git a/docs/bigtable-column-family.rst b/docs/bigtable-column-family.rst index 6539e0230d15..10eb6307dc56 100644 --- a/docs/bigtable-column-family.rst +++ b/docs/bigtable-column-family.rst @@ -1,6 +1,12 @@ Column Families =============== +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + When creating a :class:`ColumnFamily `, it is possible to set garbage collection rules for expired data. diff --git a/docs/bigtable-data-api.rst b/docs/bigtable-data-api.rst index 779efa991886..13ffd706b373 100644 --- a/docs/bigtable-data-api.rst +++ b/docs/bigtable-data-api.rst @@ -1,6 +1,12 @@ Data API ======== +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + After creating a :class:`Table ` and some column families, you are ready to store and retrieve data. diff --git a/docs/bigtable-row-data.rst b/docs/bigtable-row-data.rst index 3564f4e7a4b4..1d45bb5f2962 100644 --- a/docs/bigtable-row-data.rst +++ b/docs/bigtable-row-data.rst @@ -1,6 +1,12 @@ Row Data ~~~~~~~~ +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + .. automodule:: gcloud.bigtable.row_data :members: :show-inheritance: diff --git a/docs/bigtable-row-filters.rst b/docs/bigtable-row-filters.rst index 9796a4c27239..1b03ef7ef59a 100644 --- a/docs/bigtable-row-filters.rst +++ b/docs/bigtable-row-filters.rst @@ -1,6 +1,12 @@ Bigtable Row Filters ==================== +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + It is possible to use a :class:`RowFilter ` when adding mutations to a diff --git a/docs/bigtable-row.rst b/docs/bigtable-row.rst index afb52f39782b..e5c95728fb42 100644 --- a/docs/bigtable-row.rst +++ b/docs/bigtable-row.rst @@ -1,6 +1,12 @@ Bigtable Row ============ +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + .. automodule:: gcloud.bigtable.row :members: :show-inheritance: diff --git a/docs/bigtable-table-api.rst b/docs/bigtable-table-api.rst index b3108da75a1b..6ef4dba1e7e0 100644 --- a/docs/bigtable-table-api.rst +++ b/docs/bigtable-table-api.rst @@ -1,6 +1,12 @@ Table Admin API =============== +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + After creating a :class:`Cluster `, you can interact with individual tables, groups of tables or column families within a table. diff --git a/docs/bigtable-table.rst b/docs/bigtable-table.rst index 93704aae5d3a..414d567bfd03 100644 --- a/docs/bigtable-table.rst +++ b/docs/bigtable-table.rst @@ -1,6 +1,12 @@ Table ~~~~~ +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + .. automodule:: gcloud.bigtable.table :members: :show-inheritance: diff --git a/docs/bigtable-usage.rst b/docs/bigtable-usage.rst index 95faba854e69..61966ac21795 100644 --- a/docs/bigtable-usage.rst +++ b/docs/bigtable-usage.rst @@ -1,6 +1,12 @@ Using the API ============= +.. warning:: + + `gRPC`_ is required for using the Cloud Bigtable API. As of May 2016, + `grpcio`_ is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + API requests are sent to the `Google Cloud Bigtable`_ API via RPC over HTTP/2. In order to support this, we'll rely on `gRPC`_. We are working with the gRPC team to rapidly make the install story more user-friendly. @@ -23,3 +29,4 @@ In the hierarchy of API concepts .. _Google Cloud Bigtable: https://cloud.google.com/bigtable/docs/ .. _gRPC: http://www.grpc.io/ +.. _grpcio: https://pypi.python.org/pypi/grpcio diff --git a/docs/happybase-batch.rst b/docs/happybase-batch.rst index 3b512e2bb347..ebeab35082f5 100644 --- a/docs/happybase-batch.rst +++ b/docs/happybase-batch.rst @@ -1,6 +1,12 @@ HappyBase Batch ~~~~~~~~~~~~~~~ +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + .. automodule:: gcloud.bigtable.happybase.batch :members: :show-inheritance: diff --git a/docs/happybase-connection.rst b/docs/happybase-connection.rst index 700b0b9cfcfa..ccdd762d9f44 100644 --- a/docs/happybase-connection.rst +++ b/docs/happybase-connection.rst @@ -1,6 +1,12 @@ HappyBase Connection ~~~~~~~~~~~~~~~~~~~~ +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + .. automodule:: gcloud.bigtable.happybase.connection :members: :show-inheritance: diff --git a/docs/happybase-package.rst b/docs/happybase-package.rst index 315ef766f32f..19d15c4788e2 100644 --- a/docs/happybase-package.rst +++ b/docs/happybase-package.rst @@ -1,6 +1,12 @@ HappyBase Package ~~~~~~~~~~~~~~~~~ +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + .. automodule:: gcloud.bigtable.happybase.__init__ :members: :show-inheritance: diff --git a/docs/happybase-pool.rst b/docs/happybase-pool.rst index 40e44a7def52..566008445cc5 100644 --- a/docs/happybase-pool.rst +++ b/docs/happybase-pool.rst @@ -1,6 +1,12 @@ HappyBase Connection Pool ~~~~~~~~~~~~~~~~~~~~~~~~~ +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + .. automodule:: gcloud.bigtable.happybase.pool :members: :show-inheritance: diff --git a/docs/happybase-table.rst b/docs/happybase-table.rst index d8f6875eb12c..44cd8f6bb86c 100644 --- a/docs/happybase-table.rst +++ b/docs/happybase-table.rst @@ -1,6 +1,12 @@ HappyBase Table ~~~~~~~~~~~~~~~ +.. warning:: + + gRPC is required for using the Cloud Bigtable API. As of May 2016, + ``grpcio`` is only supported in Python 2.7, so importing + :mod:`gcloud.bigtable` in other versions of Python will fail. + .. automodule:: gcloud.bigtable.happybase.table :members: :show-inheritance: diff --git a/gcloud/bigtable/__init__.py b/gcloud/bigtable/__init__.py index 2533a0c69c5b..6b4e26681733 100644 --- a/gcloud/bigtable/__init__.py +++ b/gcloud/bigtable/__init__.py @@ -16,3 +16,23 @@ from gcloud.bigtable.client import Client + + +_ERR_MSG = """\ +gRPC is required for using the Cloud Bigtable API, but +importing the gRPC library (grpcio in PyPI) has failed. + +As of June 2016, grpcio is only supported in Python 2.7, +which unfortunately means the Cloud Bigtable API isn't +available if you're using Python 3 or Python < 2.7. + +If you're using Python 2.7 and importing / installing +grpcio has failed, this likely means you have a non-standard version +of Python installed. Check http://grpc.io if you're +having trouble installing the grpcio package. +""" + +try: + import grpc.beta.implementations +except ImportError as exc: # pragma: NO COVER + raise ImportError(_ERR_MSG, exc) diff --git a/scripts/verify_included_modules.py b/scripts/verify_included_modules.py index fcba7d96dfa7..15d387506484 100644 --- a/scripts/verify_included_modules.py +++ b/scripts/verify_included_modules.py @@ -126,9 +126,11 @@ def main(): public_mods = set(public_mods) if not sphinx_mods <= public_mods: - message = ('Unexpected error. There were modules referenced by ' - 'Sphinx that are not among the public modules.') - print(message, file=sys.stderr) + unexpected_mods = sphinx_mods - public_mods + message = ['Unexpected error. There were modules referenced by ' + 'Sphinx that are not among the public modules.'] + message.extend(['- %s' % (mod,) for mod in unexpected_mods]) + print('\n'.join(message), file=sys.stderr) sys.exit(1) undocumented_mods = public_mods - sphinx_mods diff --git a/setup.py b/setup.py index 0fe05e45fce6..08f6b5c75315 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ import os +import sys from setuptools import setup from setuptools import find_packages @@ -23,6 +24,9 @@ 'gax-google-pubsub-v1', ] +if sys.version_info[:2] == (2, 7): + REQUIREMENTS.extend(GRPC_EXTRAS) + setup( name='gcloud', version='0.14.0',