Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ matrix:
env: TOXENV=py35
- python: "3.6"
env: TOXENV=py36
# - python: "3.6-dev"
# env: TOXENV=py36
- python: "3.7"
env: TOXENV=py37
dist: xenial
# allow_failures:
# - python: "3.5"
# env: TOXENV=typing
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/device_tracker/aruba.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

_LOGGER = logging.getLogger(__name__)

REQUIREMENTS = ['pexpect==4.0.1']
REQUIREMENTS = ['pexpect==4.6.0']

_DEVICES_REGEX = re.compile(
r'(?P<name>([^\s]+)?)\s+' +
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/device_tracker/asuswrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
CONF_HOST, CONF_PASSWORD, CONF_USERNAME, CONF_PORT, CONF_MODE,
CONF_PROTOCOL)

REQUIREMENTS = ['pexpect==4.0.1']
REQUIREMENTS = ['pexpect==4.6.0']

_LOGGER = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/device_tracker/cisco_ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

_LOGGER = logging.getLogger(__name__)

REQUIREMENTS = ['pexpect==4.0.1']
REQUIREMENTS = ['pexpect==4.6.0']

PLATFORM_SCHEMA = vol.All(
PLATFORM_SCHEMA.extend({
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/device_tracker/unifi_direct.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
CONF_HOST, CONF_PASSWORD, CONF_USERNAME,
CONF_PORT)

REQUIREMENTS = ['pexpect==4.0.1']
REQUIREMENTS = ['pexpect==4.6.0']

_LOGGER = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/media_player/pandora.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
STATE_IDLE)
from homeassistant import util

REQUIREMENTS = ['pexpect==4.0.1']
REQUIREMENTS = ['pexpect==4.6.0']
_LOGGER = logging.getLogger(__name__)

# SUPPORT_VOLUME_SET is close to available but we need volume up/down
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/vacuum/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

VACUUM_SEND_COMMAND_SERVICE_SCHEMA = VACUUM_SERVICE_SCHEMA.extend({
vol.Required(ATTR_COMMAND): cv.string,
vol.Optional(ATTR_PARAMS): vol.Any(cv.Dict, cv.ensure_list),
vol.Optional(ATTR_PARAMS): vol.Any(dict, cv.ensure_list),
})

SERVICE_TO_METHOD = {
Expand Down
3 changes: 2 additions & 1 deletion homeassistant/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def get_component(hass, comp_or_platform) -> Optional[ModuleType]:
# This prevents that when only
# custom_components/switch/some_platform.py exists,
# the import custom_components.switch would succeed.
if module.__spec__ and module.__spec__.origin == 'namespace':
# __file__ was unset for namespaces before Python 3.7
if getattr(module, '__file__', None) is None:
continue

_LOGGER.info("Loaded %s from %s", comp_or_platform, path)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/package_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ certifi>=2018.04.16
jinja2>=2.10
pip>=8.0.3
pytz>=2018.04
pyyaml>=3.11,<4
pyyaml>=3.13,<4
requests==2.19.1
voluptuous==0.11.1

Expand Down
4 changes: 2 additions & 2 deletions requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ certifi>=2018.04.16
jinja2>=2.10
pip>=8.0.3
pytz>=2018.04
pyyaml>=3.11,<4
pyyaml>=3.13,<4
requests==2.19.1
voluptuous==0.11.1

Expand Down Expand Up @@ -630,7 +630,7 @@ pdunehd==1.3
# homeassistant.components.device_tracker.cisco_ios
# homeassistant.components.device_tracker.unifi_direct
# homeassistant.components.media_player.pandora
pexpect==4.0.1
pexpect==4.6.0

# homeassistant.components.rpi_pfio
pifacecommon==4.1.2
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ paho-mqtt==1.3.1
# homeassistant.components.device_tracker.cisco_ios
# homeassistant.components.device_tracker.unifi_direct
# homeassistant.components.media_player.pandora
pexpect==4.0.1
pexpect==4.6.0

# homeassistant.components.pilight
pilight==0.1.1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
'jinja2>=2.10',
'pip>=8.0.3',
'pytz>=2018.04',
'pyyaml>=3.11,<4',
'pyyaml>=3.13,<4',
'requests==2.19.1',
'voluptuous==0.11.1',
]
Expand Down
6 changes: 6 additions & 0 deletions tests/components/mqtt/test_server.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
"""The tests for the MQTT component embedded server."""
from unittest.mock import Mock, MagicMock, patch
import sys

import pytest

from homeassistant.setup import setup_component
import homeassistant.components.mqtt as mqtt

from tests.common import get_test_home_assistant, mock_coro


# Until https://github.com/beerfactory/hbmqtt/pull/139 is released
@pytest.mark.skipif(sys.version_info[:2] >= (3, 7),
reason='Package incompatible with Python 3.7')
class TestMQTT:
"""Test the MQTT component."""

Expand Down
6 changes: 6 additions & 0 deletions tests/components/sensor/test_geo_rss_events.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
"""The test for the geo rss events sensor platform."""
import unittest
from unittest import mock
import sys

import feedparser
import pytest

from homeassistant.setup import setup_component
from tests.common import load_fixture, get_test_home_assistant
Expand All @@ -22,6 +25,9 @@
}


# Until https://github.com/kurtmckee/feedparser/pull/131 is released.
@pytest.mark.skipif(sys.version_info[:2] >= (3, 7),
reason='Package incompatible with Python 3.7')
class TestGeoRssServiceUpdater(unittest.TestCase):
"""Test the GeoRss service updater."""

Expand Down
6 changes: 4 additions & 2 deletions tests/test_util/aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

from aiohttp.client_exceptions import ClientResponseError

retype = type(re.compile(''))


class AiohttpClientMocker:
"""Mock Aiohttp client requests."""
Expand Down Expand Up @@ -40,7 +42,7 @@ def request(self, method, url, *,
if content is None:
content = b''

if not isinstance(url, re._pattern_type):
if not isinstance(url, retype):
url = URL(url)
if params:
url = url.with_query(params)
Expand Down Expand Up @@ -146,7 +148,7 @@ def match_request(self, method, url, params=None):
return False

# regular expression matching
if isinstance(self._url, re._pattern_type):
if isinstance(self._url, retype):
return self._url.search(str(url)) is not None

if (self._url.scheme != url.scheme or self._url.host != url.host or
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py35, py36, lint, pylint, typing
envlist = py35, py36, py37, lint, pylint, typing
skip_missing_interpreters = True

[testenv]
Expand Down