summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliris <liris.pp@gmail.com>2014-04-25 12:29:37 +0900
committerliris <liris.pp@gmail.com>2014-04-25 12:29:37 +0900
commitfd95aabd706b93b3b8862a9ae0cc1cc3c656d04c (patch)
treee1889ab8f9bf834ce83095961178de37baf02854
parente197939d13361706a6773c64bdc451cf59e49189 (diff)
downloadwebsocket-client-py3.tar.gz
-rw-r--r--README.rst5
-rw-r--r--setup.py2
-rw-r--r--websocket/__init__.py5
3 files changed, 10 insertions, 2 deletions
diff --git a/README.rst b/README.rst
index 5792a36..966645c 100644
--- a/README.rst
+++ b/README.rst
@@ -127,6 +127,11 @@ example::
ChangeLog
============
+
+- v0.13.1
+
+ - fix backword compatibility for WebSocketApp on Python 3(ISSUE#80)
+
- v0.13.0
- MemoryError when receiving large amount of data (~60 MB) at once(ISSUE#59)
diff --git a/setup.py b/setup.py
index bd2cdea..92302ac 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
from setuptools import setup
-VERSION = "0.13.0"
+VERSION = "0.13.1"
setup(
diff --git a/websocket/__init__.py b/websocket/__init__.py
index 2607549..66de4dc 100644
--- a/websocket/__init__.py
+++ b/websocket/__init__.py
@@ -972,7 +972,10 @@ class WebSocketApp(object):
elif op_code == ABNF.OPCODE_CONT and self.on_cont_message:
self._callback(self.on_cont_message, frame.data, frame.fin)
else:
- self._callback(self.on_message, frame.data)
+ data = frame.data
+ if frame.opcode == ABNF.OPCODE_TEXT:
+ data = data.decode("utf-8")
+ self._callback(self.on_message, data)
except Exception as e:
self._callback(self.on_error, e)
finally: