From a5eca20845e6825682d1b01c1be3c9c245b311e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 15 Oct 2019 09:39:08 +0300 Subject: [PATCH] Deprecate Python 3.6 support, 3.8.0 is out --- homeassistant/bootstrap.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index 422eab8ed4a8fc..e399205ec708e9 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -93,6 +93,17 @@ async def async_from_config_dict( stop = time() _LOGGER.info("Home Assistant initialized in %.2fs", stop - start) + if sys.version_info[:3] < (3, 7, 0): + msg = ( + "Python 3.6 support is deprecated and will " + "be removed in the first release after December 15, 2019. Please " + "upgrade Python to 3.7.0 or higher." + ) + _LOGGER.warning(msg) + hass.components.persistent_notification.async_create( + msg, "Python version", "python_version" + ) + return hass