From 4f93aaa3a7b88cefe44df03dd76f18ae2b3e1fad Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Mon, 1 Aug 2022 17:20:41 +0000 Subject: [PATCH] feat(ingest): add deprecation warning for Python 3.6 (#5519) --- metadata-ingestion/src/datahub/__init__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/metadata-ingestion/src/datahub/__init__.py b/metadata-ingestion/src/datahub/__init__.py index 9ffe977182..c787de400f 100644 --- a/metadata-ingestion/src/datahub/__init__.py +++ b/metadata-ingestion/src/datahub/__init__.py @@ -1,3 +1,6 @@ +import sys +import warnings + # Published at https://pypi.org/project/acryl-datahub/. __package_name__ = "acryl-datahub" __version__ = "0.0.0.dev0" @@ -11,3 +14,11 @@ def nice_version_name() -> str: if is_dev_mode(): return "unavailable (installed in develop mode)" return __version__ + + +if sys.version_info < (3, 7): + warnings.warn( + "DataHub will require Python 3.7 or newer in a future release. " + "Please upgrade your Python version to continue using DataHub.", + FutureWarning, + )