From 59a684e93129bb44ec34f91feeb40639c6d2fcf9 Mon Sep 17 00:00:00 2001 From: Bert Kleewein Date: Wed, 20 Oct 2021 13:02:14 -0700 Subject: [PATCH 1/2] Fix python 2.7 Signed-off-by: Bert Kleewein --- src/paho/mqtt/client.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/paho/mqtt/client.py b/src/paho/mqtt/client.py index 366bcb8c..1c0236e4 100644 --- a/src/paho/mqtt/client.py +++ b/src/paho/mqtt/client.py @@ -81,6 +81,12 @@ else: EAGAIN = errno.EAGAIN +# Python 2.7 does not have BlockingIOError. Fall back to IOError +try: + BlockingIOError +except NameError: + BlockingIOError = IOError + MQTTv31 = 3 MQTTv311 = 4 MQTTv5 = 5 From 1f3cd093b6c3ff96f3b63fb55744553381a2d663 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Thu, 21 Oct 2021 11:04:20 +0100 Subject: [PATCH 2/2] Doc update, bump version. --- ChangeLog.txt | 6 ++++++ src/paho/mqtt/__init__.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 7ddccb83..ab57c1a8 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,9 @@ +v1.6.1 - 2021-10-21 +=================== + +- Fix Python 2.7 compatilibity. + + v1.6.0 - 2021-10-20 =================== diff --git a/src/paho/mqtt/__init__.py b/src/paho/mqtt/__init__.py index 425488c9..0d349fc3 100644 --- a/src/paho/mqtt/__init__.py +++ b/src/paho/mqtt/__init__.py @@ -1,4 +1,4 @@ -__version__ = "1.6.0" +__version__ = "1.6.1" class MQTTException(Exception):