From 49b2e7303edeb0f72283788609ef9cfe507fd041 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 27 May 2017 12:55:46 +0300 Subject: [PATCH 1/2] * Hotfix for recently updated Python Requests package (2.16.0) --- HISTORY.rst | 5 +++++ platformio/__main__.py | 9 ++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index e10513ed..7c4fc0cc 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,11 @@ Release Notes PlatformIO 3.0 -------------- +3.3.1 (2017-05-27) +~~~~~~~~~~~~~~~~~~ + +* Hotfix for recently updated Python Requests package (2.16.0) + 3.3.0 (2017-03-27) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/__main__.py b/platformio/__main__.py index 72502afa..8dcd88a2 100644 --- a/platformio/__main__.py +++ b/platformio/__main__.py @@ -89,11 +89,10 @@ def main(): # https://urllib3.readthedocs.org # /en/latest/security.html#insecureplatformwarning try: - requests.packages.urllib3.disable_warnings() - except AttributeError: - raise exception.PlatformioException( - "Invalid installation of Python `requests` package`. See " - "< https://github.com/platformio/platformio-core/issues/252 >") + import urllib3 + urllib3.disable_warnings() + except (AttributeError, ImportError): + pass # handle PLATFORMIO_FORCE_COLOR if str(getenv("PLATFORMIO_FORCE_COLOR", "")).lower() == "true": From 228db871b4b145b3e7d9e2042943b966c64238c7 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 27 May 2017 12:56:14 +0300 Subject: [PATCH 2/2] Bump version to 3.3.1 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index d5bbee86..8ecd2706 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 3, 0) +VERSION = (3, 3, 1) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio"