Upgrade sqlalchemy to 1.2.1 (#11666)

This commit is contained in:
Fabian Affolter 2018-01-15 23:24:34 +01:00 committed by Paulus Schoutsen
parent b0860ce5f0
commit d219f244d2
3 changed files with 21 additions and 23 deletions

View file

@ -8,33 +8,33 @@ For more details about this component, please refer to the documentation at
https://home-assistant.io/components/recorder/
"""
import asyncio
from collections import namedtuple
import concurrent.futures
from datetime import datetime, timedelta
import logging
import queue
import threading
import time
from collections import namedtuple
from datetime import datetime, timedelta
from typing import Optional, Dict
from typing import Dict, Optional
import voluptuous as vol
from homeassistant.core import (
HomeAssistant, callback, CoreState)
from homeassistant.const import (
ATTR_ENTITY_ID, CONF_ENTITIES, CONF_EXCLUDE, CONF_DOMAINS,
CONF_INCLUDE, EVENT_HOMEASSISTANT_STOP, EVENT_HOMEASSISTANT_START,
EVENT_STATE_CHANGED, EVENT_TIME_CHANGED, MATCH_ALL)
ATTR_ENTITY_ID, CONF_DOMAINS, CONF_ENTITIES, CONF_EXCLUDE, CONF_INCLUDE,
EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP, EVENT_STATE_CHANGED,
EVENT_TIME_CHANGED, MATCH_ALL)
from homeassistant.core import CoreState, HomeAssistant, callback
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entityfilter import generate_filter
from homeassistant.helpers.typing import ConfigType
import homeassistant.util.dt as dt_util
from . import purge, migration
from . import migration, purge
from .const import DATA_INSTANCE
from .util import session_scope
REQUIREMENTS = ['sqlalchemy==1.2.0']
REQUIREMENTS = ['sqlalchemy==1.2.1']
_LOGGER = logging.getLogger(__name__)
@ -140,9 +140,9 @@ def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Handle calls to the purge service."""
instance.do_adhoc_purge(service.data[ATTR_KEEP_DAYS])
hass.services.async_register(DOMAIN, SERVICE_PURGE,
async_handle_purge_service,
schema=SERVICE_PURGE_SCHEMA)
hass.services.async_register(
DOMAIN, SERVICE_PURGE, async_handle_purge_service,
schema=SERVICE_PURGE_SCHEMA)
return (yield from instance.async_db_ready)
@ -169,10 +169,9 @@ class Recorder(threading.Thread):
self.engine = None # type: Any
self.run_info = None # type: Any
self.entity_filter = generate_filter(include.get(CONF_DOMAINS, []),
include.get(CONF_ENTITIES, []),
exclude.get(CONF_DOMAINS, []),
exclude.get(CONF_ENTITIES, []))
self.entity_filter = generate_filter(
include.get(CONF_DOMAINS, []), include.get(CONF_ENTITIES, []),
exclude.get(CONF_DOMAINS, []), exclude.get(CONF_ENTITIES, []))
self.exclude_t = exclude.get(CONF_EVENT_TYPES, [])
self.get_session = None
@ -238,8 +237,7 @@ class Recorder(threading.Thread):
self.queue.put(None)
self.join()
self.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP,
shutdown)
self.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, shutdown)
if self.hass.state == CoreState.running:
hass_started.set_result(None)
@ -249,8 +247,8 @@ class Recorder(threading.Thread):
"""Notify that hass has started."""
hass_started.set_result(None)
self.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_START,
notify_hass_started)
self.hass.bus.async_listen_once(
EVENT_HOMEASSISTANT_START, notify_hass_started)
if self.keep_days and self.purge_interval:
@callback

View file

@ -1098,7 +1098,7 @@ speedtest-cli==1.0.7
# homeassistant.components.recorder
# homeassistant.scripts.db_migrator
sqlalchemy==1.2.0
sqlalchemy==1.2.1
# homeassistant.components.statsd
statsd==3.2.1

View file

@ -165,7 +165,7 @@ somecomfort==0.5.0
# homeassistant.components.recorder
# homeassistant.scripts.db_migrator
sqlalchemy==1.2.0
sqlalchemy==1.2.1
# homeassistant.components.statsd
statsd==3.2.1