From dcb4a0a81e0af667ed2cb643974db4ab35841749 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Mon, 21 Oct 2019 23:32:12 +0200 Subject: [PATCH] Add Python 2 deprecation notice (#784) * Add Python 2 deprecation notice * Update __main__.py --- esphome/__main__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/esphome/__main__.py b/esphome/__main__.py index 403bf89401..bf2d68d834 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -509,6 +509,11 @@ def run_esphome(argv): _LOGGER.error("Missing configuration parameter, see esphome --help.") return 1 + if IS_PY2: + _LOGGER.warning("You're using ESPHome with python 2. Support for python 2 is deprecated " + "and will be removed in 1.15.0. Please reinstall ESPHome with python 3.6 " + "or higher.") + if args.command in PRE_CONFIG_ACTIONS: try: return PRE_CONFIG_ACTIONS[args.command](args)