From 1ab942e0a2a1ede1a8c3c44268fb6d00ecc1c83b Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 5 Oct 2017 21:47:51 -0700 Subject: [PATCH] Deprecate Python 3.4 support (#9684) * Deprecate Python 3.4 support * Update text --- homeassistant/bootstrap.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index 3ff4d99fb98973..b62b86b30d2ef9 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -83,6 +83,18 @@ def async_from_config_dict(config: Dict[str, Any], This method is a coroutine. """ start = time() + + if enable_log: + async_enable_logging(hass, verbose, log_rotate_days, log_file) + + if sys.version_info[:2] < (3, 5): + _LOGGER.warning( + 'Python 3.4 support has been deprecated and will be removed in ' + 'the begining of 2018. Please upgrade Python or your operating ' + 'system. More info: https://home-assistant.io/blog/2017/10/06/' + 'deprecating-python-3.4-support/' + ) + core_config = config.get(core.DOMAIN, {}) try: @@ -93,9 +105,6 @@ def async_from_config_dict(config: Dict[str, Any], yield from hass.async_add_job(conf_util.process_ha_config_upgrade, hass) - if enable_log: - async_enable_logging(hass, verbose, log_rotate_days, log_file) - hass.config.skip_pip = skip_pip if skip_pip: _LOGGER.warning("Skipping pip installation of required modules. "