From 7237ea70c41d0a86c925734ee9e606914588cfa9 Mon Sep 17 00:00:00 2001 From: Eric Liang Date: Sat, 25 May 2019 10:45:26 -0700 Subject: [PATCH] [rllib] [RFC] Deprecate Python 2 / RLlib (#4832) --- python/ray/rllib/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) 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():