Commits

Jeffrey Gelens committed 19d04a3

ujson is optional now #46

Comments (0)

Files changed (7)

-recursive-include examples *
 include LICENSE
 include AUTHORS
-include CHANGELOG
 include README.rst
 include MANIFEST.in
 ^^^^^^^^^^^
 
 `gevent-websocket`_ is pretty fast, but can be accelerated further by
-installing `wsaccel <https://github.com/methane/wsaccel>`_::
+installing `wsaccel <https://github.com/methane/wsaccel>`_ and `ujson` or `simplejson`::
 
-    $ pip install wsaccel
+    $ pip install wsaccel ujson
 
 `gevent-websocket`_ automatically detects ``wsaccell`` and uses the Cython
 implementation for UTF8 validation and later also frame masking and

geventwebsocket/__init__.py

-VERSION = (0, 9, 1, 'final', 0)
+VERSION = (0, 9, 3, 'final', 0)
 
 __all__ = [
     'WebSocketApplication',

geventwebsocket/protocols/wamp.py

 import inspect
-import ujson as json
 import random
 import string
 import types
 
+import ipdb; ipdb.set_trace()
+try:
+    import ujson as json
+except ImportError:
+    try:
+        import simplejson as json
+    except ImportError:
+        import json
+
 from ..exceptions import WebSocketError
 from .base import BaseProtocol
 

perf-requirements.txt

 cython
 wsaccel
+ujson
 
 -r requirements.txt
 gevent==1.0
 greenlet==0.4.1
-ujson==1.33
     packages=find_packages(exclude=["examples", "tests"]),
     license=open('LICENSE').read(),
     zip_safe=False,
-    install_requires=(
-        "gevent",
-        "ujson"
-    ),
+    install_requires=("gevent"),
     classifiers=[
         "Environment :: Web Environment",
         "Intended Audience :: Developers",