From e4874fd7c75f8369a03f46a74b1bae85899ce8f6 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 9 Feb 2018 05:57:05 +0100 Subject: [PATCH] Update aiohttp 2.3.10 / yarl 1.1.0 (#12244) * Update aiohttp 2.3.10 / yarl 1.1.0 * Update setup.py * Update package_constraints.txt * Update google.py * Update static.py --- homeassistant/components/http/static.py | 4 ++-- homeassistant/components/tts/google.py | 2 +- homeassistant/package_constraints.txt | 4 ++-- requirements_all.txt | 4 ++-- setup.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/http/static.py b/homeassistant/components/http/static.py index 74a5a8818a4..b34df1897f0 100644 --- a/homeassistant/components/http/static.py +++ b/homeassistant/components/http/static.py @@ -6,7 +6,7 @@ from aiohttp import hdrs from aiohttp.web import FileResponse, middleware from aiohttp.web_exceptions import HTTPNotFound from aiohttp.web_urldispatcher import StaticResource -from yarl import unquote +from yarl import URL _FINGERPRINT = re.compile(r'^(.+)-[a-z0-9]{32}\.(\w+)$', re.IGNORECASE) @@ -16,7 +16,7 @@ class CachingStaticResource(StaticResource): @asyncio.coroutine def _handle(self, request): - filename = unquote(request.match_info['filename']) + filename = URL(request.match_info['filename']).path try: # PyLint is wrong about resolve not being a member. # pylint: disable=no-member diff --git a/homeassistant/components/tts/google.py b/homeassistant/components/tts/google.py index 85b223864e9..084a7229212 100644 --- a/homeassistant/components/tts/google.py +++ b/homeassistant/components/tts/google.py @@ -87,7 +87,7 @@ class GoogleProvider(Provider): url_param = { 'ie': 'UTF-8', 'tl': language, - 'q': yarl.quote(part), + 'q': yarl.URL(part).raw_path, 'tk': part_token, 'total': len(message_parts), 'idx': idx, diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 995002df7e9..ee3a37bbd53 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -5,8 +5,8 @@ pip>=8.0.3 jinja2>=2.10 voluptuous==0.10.5 typing>=3,<4 -aiohttp==2.3.7 -yarl==0.18.0 +aiohttp==2.3.10 +yarl==1.1.0 async_timeout==2.0.0 chardet==3.0.4 astral==1.5 diff --git a/requirements_all.txt b/requirements_all.txt index 166f835c029..4c8f0f50498 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -6,8 +6,8 @@ pip>=8.0.3 jinja2>=2.10 voluptuous==0.10.5 typing>=3,<4 -aiohttp==2.3.7 -yarl==0.18.0 +aiohttp==2.3.10 +yarl==1.1.0 async_timeout==2.0.0 chardet==3.0.4 astral==1.5 diff --git a/setup.py b/setup.py index f250dd739f7..5af84fc8e0e 100755 --- a/setup.py +++ b/setup.py @@ -55,8 +55,8 @@ REQUIRES = [ 'jinja2>=2.10', 'voluptuous==0.10.5', 'typing>=3,<4', - 'aiohttp==2.3.7', # If updated, check if yarl also needs an update! - 'yarl==0.18.0', + 'aiohttp==2.3.10', # If updated, check if yarl also needs an update! + 'yarl==1.1.0', 'async_timeout==2.0.0', 'chardet==3.0.4', 'astral==1.5',