Skip to content

Commit

Permalink
Added section on upgrading from the 0.x releases
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Oct 18, 2015
1 parent c2e21c6 commit d925450
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Older versions of Flask-SocketIO had a completely different set of
requirements. Those versions had a dependency on
`gevent-socketio <https://gevent-socketio.readthedocs.org/en/latest/>`_ and
`gevent-websocket <https://pypi.python.org/pypi/gevent-websocket/>`_, which
are not required in release 1.0 and instead are optional.
are not required in release 1.0.

In spite of the change in dependencies, there aren't many significant
changes introduced in version 1.0. Below is a detailed list of
Expand Down Expand Up @@ -90,6 +90,29 @@ the actual differences:
prior to 1.0. This has been fixed and now this event fires as expected.
- Support for client-side callbacks was introduced in release 1.0.

Upgrading to Flask-SocketIO 1.x from older releases
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

On the client side, you need to upgrade your Socket.IO Javascript client from
the 0.9.x releases to the 1.3.x or newer releases.

On the server side, there are a few points to consider:

- If you wish to continue using gevent, then uninstall gevent-socketio from
your virtual environment, as this package is not used anymore and may
collide with its replacement, python-socketio.
- If you want to have slightly better performance and stability, then it is
recommended that you switch to eventlet. To do this, uninstall gevent,
gevent-socketio and gevent-websocket, and install eventlet.
- If your application uses monkey patching and you switched to eventlet, call
`eventlet.monkey_patch()` instead of gevent's `monkey.patch_all()`. Also,
any calls to gevent must be replaced with equivalent calls to eventlet.
- Any uses of `request.namespace` must be replaced with direct calls into the
Flask-SocketIO functions. For example, `request.namespace.rooms` must be
replaced with the `rooms()` function.
- Any uses of internal gevent-socketio objects must be removed, as this
package is not a dependency anymore.

Initialization
--------------

Expand Down

0 comments on commit d925450

Please sign in to comment.