From 5834c56c64ffe26eec41be3d07d72713a5417660 Mon Sep 17 00:00:00 2001 From: Erik Cederstrand Date: Mon, 7 Oct 2019 09:10:00 +0200 Subject: [PATCH] Restore support for Python 3.5 (#5818) * Advertise that Python >= 3.6 is needed ray/tune/examples/ax_example.py contains f-strings which limits support of this package to Python 3.6 and up. * Python 3.5 does not support f-strings Rewrite by using format() * Lower required version after 9f88fe9d * Remove python_requires again by request * Fix linter warning --- python/ray/tune/examples/ax_example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ray/tune/examples/ax_example.py b/python/ray/tune/examples/ax_example.py index 26ad30cb9..019723f7a 100644 --- a/python/ray/tune/examples/ax_example.py +++ b/python/ray/tune/examples/ax_example.py @@ -41,7 +41,7 @@ def easy_objective(config, reporter): import time time.sleep(0.2) for i in range(config["iterations"]): - x = np.array([config.get(f"x{i+1}") for i in range(6)]) + x = np.array([config.get("x{}".format(i + 1)) for i in range(6)]) reporter( timesteps_total=i, hartmann6=hartmann6(x),