Bump aioHTTP 3.7.3 - YARL 1.6.3 (#45180)

This commit is contained in:
Pascal Vizeli 2021-01-15 13:19:22 +01:00 committed by GitHub
parent b5690053a9
commit e1427c45f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 8 deletions

View File

@ -1,6 +1,6 @@
PyJWT==1.7.1
PyNaCl==1.3.0
aiohttp==3.7.1
aiohttp==3.7.3
aiohttp_cors==0.7.0
astral==1.10.1
async_timeout==3.0.1
@ -29,7 +29,7 @@ scapy==2.4.4
sqlalchemy==1.3.22
voluptuous-serialize==2.4.0
voluptuous==0.12.1
yarl==1.4.2
yarl==1.6.3
zeroconf==0.28.8
pycryptodome>=3.6.6

View File

@ -1,7 +1,7 @@
-c homeassistant/package_constraints.txt
# Home Assistant Core
aiohttp==3.7.1
aiohttp==3.7.3
astral==1.10.1
async_timeout==3.0.1
attrs==19.3.0
@ -20,4 +20,4 @@ requests==2.25.1
ruamel.yaml==0.15.100
voluptuous==0.12.1
voluptuous-serialize==2.4.0
yarl==1.4.2
yarl==1.6.3

View File

@ -32,7 +32,7 @@ PROJECT_URLS = {
PACKAGES = find_packages(exclude=["tests", "tests.*"])
REQUIRES = [
"aiohttp==3.7.1",
"aiohttp==3.7.3",
"astral==1.10.1",
"async_timeout==3.0.1",
"attrs==19.3.0",
@ -52,7 +52,7 @@ REQUIRES = [
"ruamel.yaml==0.15.100",
"voluptuous==0.12.1",
"voluptuous-serialize==2.4.0",
"yarl==1.4.2",
"yarl==1.6.3",
]
MIN_PY_VERSION = ".".join(map(str, hass_const.REQUIRED_PYTHON_VER))

View File

@ -1,6 +1,7 @@
"""Test security filter middleware."""
from aiohttp import web
import pytest
import urllib3
from homeassistant.components.http.security_filter import setup_security_filter
@ -53,7 +54,7 @@ async def test_ok_requests(request_path, request_params, aiohttp_client):
],
)
async def test_bad_requests(
request_path, request_params, fail_on_query_string, aiohttp_client, caplog
request_path, request_params, fail_on_query_string, aiohttp_client, caplog, loop
):
"""Test request paths that should be filtered."""
app = web.Application()
@ -62,7 +63,22 @@ async def test_bad_requests(
setup_security_filter(app)
mock_api_client = await aiohttp_client(app)
resp = await mock_api_client.get(request_path, params=request_params)
# Manual params handling
if request_params:
raw_params = "&".join(f"{val}={key}" for val, key in request_params.items())
man_params = f"?{raw_params}"
else:
man_params = ""
http = urllib3.PoolManager()
resp = await loop.run_in_executor(
None,
http.request,
"GET",
f"http://{mock_api_client.host}:{mock_api_client.port}/{request_path}{man_params}",
request_params,
)
assert resp.status == 400

View File

@ -0,0 +1 @@
This is just a text

View File

@ -0,0 +1 @@
I sing a song