diff --git a/kedro/__init__.py b/kedro/__init__.py index be9febd329..9c6ac0a7b6 100644 --- a/kedro/__init__.py +++ b/kedro/__init__.py @@ -3,4 +3,24 @@ configuration and pipeline assembly. """ +import sys +import warnings + __version__ = "0.18.11" + + +class KedroPythonVersionWarning(UserWarning): + pass + + +if not sys.warnoptions: + warnings.simplefilter("error", KedroPythonVersionWarning) + +if sys.version_info >= (3, 11): + warnings.warn( + """Kedro is not yet fully compatible with this Python version. +To proceed at your own risk and ignore this warning, +run Kedro with `python -W "default:Kedro is not yet fully compatible" -m kedro ...` +or set the PYTHONWARNINGS environment variable accordingly.""", + KedroPythonVersionWarning, + )