From 29d4dca56ab49d9dcd9414c9ce76b56d5aa12a7d Mon Sep 17 00:00:00 2001 From: TopdRob Date: Fri, 20 Oct 2017 04:24:49 +0200 Subject: [PATCH] Update requests requirement (#9876) * Update request requirement Update request requirement from version v2.14.2 to v2.18.4 * Fix dependency vizio integration 3rd patry packages were removed from requests. Changed dependency from requests to urllib3 * forgot = forgot = when adding the requirement * re-run script/gen_requirements_all.py re-run script/gen_requirements_all.py * Unvendoring urllib3 from requests In v2.16.0 and newer of requests they unverdored urllib3. * undefined name 'InsecureRequestWarning' * Removed requirement to 'urllib3==1.22 * removed import requests * removed urllib3.exceptions.InsecureRequestWarning removed urllib3.exceptions.InsecureRequestWarning travis lint --- homeassistant/components/media_player/vizio.py | 5 ++--- homeassistant/package_constraints.txt | 2 +- requirements_all.txt | 2 +- setup.py | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/media_player/vizio.py b/homeassistant/components/media_player/vizio.py index 4ae8f037a4f..5d6e6fcf6dd 100644 --- a/homeassistant/components/media_player/vizio.py +++ b/homeassistant/components/media_player/vizio.py @@ -75,11 +75,10 @@ def setup_platform(hass, config, add_devices, discovery_info=None): return False if config.get(CONF_SUPPRESS_WARNING): - import requests - from requests.packages.urllib3.exceptions import InsecureRequestWarning + from requests.packages import urllib3 _LOGGER.warning('InsecureRequestWarning is disabled ' 'because of Vizio platform configuration.') - requests.packages.urllib3.disable_warnings(InsecureRequestWarning) + urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) add_devices([device], True) diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 783aca0ceac..7da87160684 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -1,4 +1,4 @@ -requests==2.14.2 +requests==2.18.4 pyyaml>=3.11,<4 pytz>=2017.02 pip>=8.0.3 diff --git a/requirements_all.txt b/requirements_all.txt index 98abf7b57e8..84c4668cf79 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1,5 +1,5 @@ # Home Assistant core -requests==2.14.2 +requests==2.18.4 pyyaml>=3.11,<4 pytz>=2017.02 pip>=8.0.3 diff --git a/setup.py b/setup.py index 9ced64df954..cd7043650ad 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ DOWNLOAD_URL = ('{}/archive/' PACKAGES = find_packages(exclude=['tests', 'tests.*']) REQUIRES = [ - 'requests==2.14.2', + 'requests==2.18.4', 'pyyaml>=3.11,<4', 'pytz>=2017.02', 'pip>=8.0.3',