Skip to content

Commit

Permalink
Print EOL warning on import (#2824)
Browse files Browse the repository at this point in the history
* Print EOL msg on import
  • Loading branch information
seanpmorgan authored Apr 6, 2023
1 parent e458390 commit c35cde6
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
typeguard>=2.7
typeguard>=2.7,<3.0.0
packaging
2 changes: 2 additions & 0 deletions tensorflow_addons/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
# ==============================================================================
"""Useful extra functionality for TensorFlow maintained by SIG-addons."""
from tensorflow_addons.utils.ensure_tf_install import _check_tf_version
from tensorflow_addons.utils.tfa_eol_msg import _print_eol_warning

_print_eol_warning()
_check_tf_version()

# Local project imports
Expand Down
33 changes: 33 additions & 0 deletions tensorflow_addons/utils/tfa_eol_msg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================

import warnings


def _print_eol_warning():
"""
Prints TensorFlow Addons End of Life Warning
"""
warnings.warn(
"\n\nTensorFlow Addons (TFA) has ended development and introduction of new features.\n"
"TFA has entered a minimal maintenance and release mode until a planned end of life in May 2024.\n"
"Please modify downstream libraries to take dependencies from other repositories in our TensorFlow community "
"(e.g. Keras, Keras-CV, and Keras-NLP). \n\n"
"For more information see: https://github.com/tensorflow/addons/issues/2807 \n",
UserWarning,
)


_print_eol_warning()

0 comments on commit c35cde6

Please sign in to comment.