diff --git a/python/ray/rllib/__init__.py b/python/ray/rllib/__init__.py index 05f88ac65..92844e485 100644 --- a/python/ray/rllib/__init__.py +++ b/python/ray/rllib/__init__.py @@ -3,6 +3,7 @@ from __future__ import division from __future__ import print_function import logging +import sys # Note: do not introduce unnecessary library dependencies here, e.g. gym. # This file is imported from the tune module in order to register RLlib agents. @@ -30,6 +31,11 @@ def _setup_logger(): logger.addHandler(handler) logger.propagate = False + if sys.version_info[0] < 3: + logger.warn( + "RLlib Python 2 support is deprecated, and will be removed " + "in a future release.") + def _register_all():