From 23e02d8433c5c418e382f161b80b8eac88d22e3a Mon Sep 17 00:00:00 2001 From: mf2199 <38331387+mf2199@users.noreply.github.com> Date: Mon, 20 Apr 2020 18:17:01 -0400 Subject: [PATCH 1/2] Added v1beta1 deprecation annotation --- google/cloud/firestore_v1beta1/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/google/cloud/firestore_v1beta1/__init__.py b/google/cloud/firestore_v1beta1/__init__.py index f681d84e6a..a1d80278f1 100644 --- a/google/cloud/firestore_v1beta1/__init__.py +++ b/google/cloud/firestore_v1beta1/__init__.py @@ -15,6 +15,7 @@ """Python idiomatic client for Google Cloud Firestore.""" from pkg_resources import get_distribution +import warnings __version__ = get_distribution("google-cloud-firestore").version @@ -40,6 +41,13 @@ from google.cloud.firestore_v1beta1.watch import Watch +_V1BETA1_DEPRECATED_MESSAGE = ( + "The 'v1beta1' API endpoint is deprecated. " + "The client/library which supports it will be removed in a future release." +) +warnings.warn(_V1BETA1_DEPRECATED_MESSAGE, DeprecationWarning) + + __all__ = [ "__version__", "ArrayRemove", From 6e011f92efff7792c27e8997bdccbecbbb8e8a0f Mon Sep 17 00:00:00 2001 From: mf2199 <38331387+mf2199@users.noreply.github.com> Date: Mon, 20 Apr 2020 18:17:01 -0400 Subject: [PATCH 2/2] firestore: add v1beta1 deprecation annotation --- google/cloud/firestore_v1beta1/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/google/cloud/firestore_v1beta1/__init__.py b/google/cloud/firestore_v1beta1/__init__.py index f681d84e6a..a1d80278f1 100644 --- a/google/cloud/firestore_v1beta1/__init__.py +++ b/google/cloud/firestore_v1beta1/__init__.py @@ -15,6 +15,7 @@ """Python idiomatic client for Google Cloud Firestore.""" from pkg_resources import get_distribution +import warnings __version__ = get_distribution("google-cloud-firestore").version @@ -40,6 +41,13 @@ from google.cloud.firestore_v1beta1.watch import Watch +_V1BETA1_DEPRECATED_MESSAGE = ( + "The 'v1beta1' API endpoint is deprecated. " + "The client/library which supports it will be removed in a future release." +) +warnings.warn(_V1BETA1_DEPRECATED_MESSAGE, DeprecationWarning) + + __all__ = [ "__version__", "ArrayRemove",