diff --git a/tensorflow/api_template_v1.__init__.py b/tensorflow/api_template_v1.__init__.py index 6d1c40a2428..2962a7a60e2 100644 --- a/tensorflow/api_template_v1.__init__.py +++ b/tensorflow/api_template_v1.__init__.py @@ -27,11 +27,27 @@ import sys as _sys # pylint: disable=g-bad-import-order from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import from tensorflow.python.tools import module_util as _module_util +from tensorflow.python.platform import tf_logging as _logging # API IMPORTS PLACEHOLDER # WRAPPER_PLACEHOLDER +if "dev" in __version__: # pylint: disable=undefined-variable + _logging.warning(""" + + TensorFlow's `tf-nightly` package will soon be updated to TensorFlow 2.0. + + Please upgrade your code to TensorFlow 2.0: + * https://www.tensorflow.org/beta/guide/migration_guide + + Or install the latest stable TensorFlow 1.X release: + * `pip install -U "tensorflow==1.*"` + + Otherwise your code may be broken by the change. + + """) + # Make sure directory containing top level submodules is in # the __path__ so that "from tensorflow.foo import bar" works. # We're using bitwise, but there's nothing special about that.