mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Bump aioHTTP 3.7.3 - YARL 1.6.3 (#45180)
This commit is contained in:
parent
b5690053a9
commit
e1427c45f2
@ -1,6 +1,6 @@
|
|||||||
PyJWT==1.7.1
|
PyJWT==1.7.1
|
||||||
PyNaCl==1.3.0
|
PyNaCl==1.3.0
|
||||||
aiohttp==3.7.1
|
aiohttp==3.7.3
|
||||||
aiohttp_cors==0.7.0
|
aiohttp_cors==0.7.0
|
||||||
astral==1.10.1
|
astral==1.10.1
|
||||||
async_timeout==3.0.1
|
async_timeout==3.0.1
|
||||||
@ -29,7 +29,7 @@ scapy==2.4.4
|
|||||||
sqlalchemy==1.3.22
|
sqlalchemy==1.3.22
|
||||||
voluptuous-serialize==2.4.0
|
voluptuous-serialize==2.4.0
|
||||||
voluptuous==0.12.1
|
voluptuous==0.12.1
|
||||||
yarl==1.4.2
|
yarl==1.6.3
|
||||||
zeroconf==0.28.8
|
zeroconf==0.28.8
|
||||||
|
|
||||||
pycryptodome>=3.6.6
|
pycryptodome>=3.6.6
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
-c homeassistant/package_constraints.txt
|
-c homeassistant/package_constraints.txt
|
||||||
|
|
||||||
# Home Assistant Core
|
# Home Assistant Core
|
||||||
aiohttp==3.7.1
|
aiohttp==3.7.3
|
||||||
astral==1.10.1
|
astral==1.10.1
|
||||||
async_timeout==3.0.1
|
async_timeout==3.0.1
|
||||||
attrs==19.3.0
|
attrs==19.3.0
|
||||||
@ -20,4 +20,4 @@ requests==2.25.1
|
|||||||
ruamel.yaml==0.15.100
|
ruamel.yaml==0.15.100
|
||||||
voluptuous==0.12.1
|
voluptuous==0.12.1
|
||||||
voluptuous-serialize==2.4.0
|
voluptuous-serialize==2.4.0
|
||||||
yarl==1.4.2
|
yarl==1.6.3
|
||||||
|
4
setup.py
4
setup.py
@ -32,7 +32,7 @@ PROJECT_URLS = {
|
|||||||
PACKAGES = find_packages(exclude=["tests", "tests.*"])
|
PACKAGES = find_packages(exclude=["tests", "tests.*"])
|
||||||
|
|
||||||
REQUIRES = [
|
REQUIRES = [
|
||||||
"aiohttp==3.7.1",
|
"aiohttp==3.7.3",
|
||||||
"astral==1.10.1",
|
"astral==1.10.1",
|
||||||
"async_timeout==3.0.1",
|
"async_timeout==3.0.1",
|
||||||
"attrs==19.3.0",
|
"attrs==19.3.0",
|
||||||
@ -52,7 +52,7 @@ REQUIRES = [
|
|||||||
"ruamel.yaml==0.15.100",
|
"ruamel.yaml==0.15.100",
|
||||||
"voluptuous==0.12.1",
|
"voluptuous==0.12.1",
|
||||||
"voluptuous-serialize==2.4.0",
|
"voluptuous-serialize==2.4.0",
|
||||||
"yarl==1.4.2",
|
"yarl==1.6.3",
|
||||||
]
|
]
|
||||||
|
|
||||||
MIN_PY_VERSION = ".".join(map(str, hass_const.REQUIRED_PYTHON_VER))
|
MIN_PY_VERSION = ".".join(map(str, hass_const.REQUIRED_PYTHON_VER))
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
"""Test security filter middleware."""
|
"""Test security filter middleware."""
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
import pytest
|
import pytest
|
||||||
|
import urllib3
|
||||||
|
|
||||||
from homeassistant.components.http.security_filter import setup_security_filter
|
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(
|
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."""
|
"""Test request paths that should be filtered."""
|
||||||
app = web.Application()
|
app = web.Application()
|
||||||
@ -62,7 +63,22 @@ async def test_bad_requests(
|
|||||||
setup_security_filter(app)
|
setup_security_filter(app)
|
||||||
|
|
||||||
mock_api_client = await aiohttp_client(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
|
assert resp.status == 400
|
||||||
|
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
This is just a text
|
@ -0,0 +1 @@
|
|||||||
|
I sing a song
|
Loading…
x
Reference in New Issue
Block a user