From 99db2a5afec7697b5bf33ce541de16592a2008d9 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Tue, 14 Jun 2022 12:21:32 +0200 Subject: [PATCH] Update requests to 2.28.0 (#73406) * Update requests to 2.28.0 * Fix mypy warning * Fix Facebook messenger tests --- homeassistant/components/facebook/notify.py | 3 +-- homeassistant/components/neato/hub.py | 2 +- homeassistant/package_constraints.txt | 2 +- pyproject.toml | 2 +- requirements.txt | 2 +- requirements_test.txt | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/facebook/notify.py b/homeassistant/components/facebook/notify.py index ea8848a5af21..e205e1a66cc8 100644 --- a/homeassistant/components/facebook/notify.py +++ b/homeassistant/components/facebook/notify.py @@ -3,7 +3,6 @@ from http import HTTPStatus import json import logging -from aiohttp.hdrs import CONTENT_TYPE import requests import voluptuous as vol @@ -74,7 +73,7 @@ class FacebookNotificationService(BaseNotificationService): BASE_URL, data=json.dumps(body), params=payload, - headers={CONTENT_TYPE: CONTENT_TYPE_JSON}, + headers={"Content-Type": CONTENT_TYPE_JSON}, timeout=10, ) if resp.status_code != HTTPStatus.OK: diff --git a/homeassistant/components/neato/hub.py b/homeassistant/components/neato/hub.py index cb639de4acba..6ee00b2a8b43 100644 --- a/homeassistant/components/neato/hub.py +++ b/homeassistant/components/neato/hub.py @@ -32,7 +32,7 @@ class NeatoHub: def download_map(self, url: str) -> HTTPResponse: """Download a new map image.""" - map_image_data = self.my_neato.get_map_image(url) + map_image_data: HTTPResponse = self.my_neato.get_map_image(url) return map_image_data async def async_update_entry_unique_id(self, entry: ConfigEntry) -> str: diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index bec79680e0d9..5939a513d009 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -27,7 +27,7 @@ pyserial==3.5 python-slugify==4.0.1 pyudev==0.22.0 pyyaml==6.0 -requests==2.27.1 +requests==2.28.0 scapy==2.4.5 sqlalchemy==1.4.37 typing-extensions>=3.10.0.2,<5.0 diff --git a/pyproject.toml b/pyproject.toml index cf5ac7a37c28..f17015cc9ba3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ dependencies = [ "pip>=21.0,<22.2", "python-slugify==4.0.1", "pyyaml==6.0", - "requests==2.27.1", + "requests==2.28.0", "typing-extensions>=3.10.0.2,<5.0", "voluptuous==0.13.1", "voluptuous-serialize==2.5.0", diff --git a/requirements.txt b/requirements.txt index fe2bf87ad254..ba7c9e4dd139 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,7 @@ cryptography==36.0.2 pip>=21.0,<22.2 python-slugify==4.0.1 pyyaml==6.0 -requests==2.27.1 +requests==2.28.0 typing-extensions>=3.10.0.2,<5.0 voluptuous==0.13.1 voluptuous-serialize==2.5.0 diff --git a/requirements_test.txt b/requirements_test.txt index a3986b8a7546..2ccbd6ab4400 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -42,6 +42,6 @@ types-pkg-resources==0.1.3 types-python-slugify==0.1.2 types-pytz==2021.1.2 types-PyYAML==5.4.6 -types-requests==2.25.1 +types-requests==2.27.30 types-toml==0.1.5 types-ujson==0.1.1