Skip to content

Commit 55944f6

Browse files
yoshi-automationbusunkim96
authored andcommitted
docs(documentai): add 2.7 deprecation warning (via synth) (#10041)
1 parent b663b61 commit 55944f6

File tree

2 files changed

+3438
-5
lines changed

2 files changed

+3438
-5
lines changed

documentai/google/cloud/documentai_v1beta1/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,23 @@
1616

1717

1818
from __future__ import absolute_import
19+
import sys
20+
import warnings
1921

2022
from google.cloud.documentai_v1beta1 import types
2123
from google.cloud.documentai_v1beta1.gapic import document_understanding_service_client
2224
from google.cloud.documentai_v1beta1.gapic import enums
2325

2426

27+
if sys.version_info[:2] == (2, 7):
28+
message = (
29+
"A future version of this library will drop support for Python 2.7."
30+
"More details about Python 2 support for Google Cloud Client Libraries"
31+
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
32+
)
33+
warnings.warn(message, DeprecationWarning)
34+
35+
2536
class DocumentUnderstandingServiceClient(
2637
document_understanding_service_client.DocumentUnderstandingServiceClient
2738
):

0 commit comments

Comments
 (0)