From 08881bc7de814f8d8511ccd821652e82f6f22aa7 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sat, 18 Mar 2017 12:57:46 -0700 Subject: [PATCH] Releasing 1.1.0 --- CHANGELOG.txt | 15 +++++++++++++++ channels/__init__.py | 2 +- docs/javascript.rst | 17 +++++++++++++---- docs/releases/1.1.0.rst | 18 ++++++++++++------ js_client/package.json | 2 +- 5 files changed, 42 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 53d26cf..a29356a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,21 @@ Full release notes, with more details and upgrade information, are available at: https://channels.readthedocs.io/en/latest/releases +1.1.0 (2017-03-18) +------------------ + +* Channels now includes a JavaScript wrapper that wraps reconnection and + multiplexing for you on the client side. + +* Test classes have been moved from ``channels.tests`` to ``channels.test``. + +* Bindings now support non-integer fields for primary keys on models. + +* The ``enforce_ordering`` decorator no longer suffers a race condition where + it would drop messages under high load. + +* ``runserver`` no longer errors if the ``staticfiles`` app is not enabled in Django. + 1.0.3 (2017-02-01) ------------------ diff --git a/channels/__init__.py b/channels/__init__.py index f3e910f..81b231f 100644 --- a/channels/__init__.py +++ b/channels/__init__.py @@ -1,4 +1,4 @@ -__version__ = "1.0.3" +__version__ = "1.1.0" default_app_config = 'channels.apps.ChannelsConfig' DEFAULT_CHANNEL_LAYER = 'default' diff --git a/docs/javascript.rst b/docs/javascript.rst index 3d8344f..b99765f 100644 --- a/docs/javascript.rst +++ b/docs/javascript.rst @@ -4,14 +4,24 @@ Channels WebSocket wrapper Channels ships with a javascript WebSocket wrapper to help you connect to your websocket and send/receive messages. -First, you must include the javascript library in your template:: +First, you must include the javascript library in your template; if you're using +Django's staticfiles, this is as easy as:: {% load staticfiles %} {% static "channels/js/websocketbridge.js" %} +If you are using an alternative method of serving static files, the compiled +source code is located at ``channels/static/channels/js/websocketbridge.js`` in +a Channels installation. We compile the file for you each release; it's ready +to serve as-is. + +The library is deliberately quite low-level and generic; it's designed to +be compatible with any JavaScript code or framework, so you can build more +specific integration on top of it. + To process messages:: - + const webSocketBridge = new channels.WebSocketBridge(); webSocketBridge.connect(); webSocketBridge.listen(function(action, stream) { @@ -36,10 +46,9 @@ To demultiplex specific streams:: console.info(action, stream); }); - To send a message to a specific stream:: webSocketBridge.stream('mystream').send({prop1: 'value1', prop2: 'value1'}) -The library is also available as npm module, under the name +The library is also available as a npm module, under the name `django-channels `_ diff --git a/docs/releases/1.1.0.rst b/docs/releases/1.1.0.rst index d461951..5d72136 100644 --- a/docs/releases/1.1.0.rst +++ b/docs/releases/1.1.0.rst @@ -1,27 +1,33 @@ 1.1.0 Release Notes =================== -.. note:: - The 1.1.0 release is still in development. +Channels 1.1.0 introduces a couple of major but backwards-compatible changes, +including most notably the inclusion of a standard, framework-agnostic JavaScript +library for easier integration with your site. -Channels 1.1.0 introduces a couple of major but backwards-compatible changes. -It was released on UNKNOWN. Major Changes ------------- +* Channels now includes a JavaScript wrapper that wraps reconnection and + multiplexing for you on the client side. For more on how to use it, see the + :doc:`/javascript` documentation. + * Test classes have been moved from ``channels.tests`` to ``channels.test`` to better match Django. Old imports from ``channels.tests`` will continue to work but will trigger a deprecation warning, and ``channels.tests`` will be removed completely in version 1.3. + Minor Changes & Bugfixes ------------------------ -* Bindings now support non-integer fields for primary keys on models +* Bindings now support non-integer fields for primary keys on models. * The ``enforce_ordering`` decorator no longer suffers a race condition where - it would drop messages under high load + it would drop messages under high load. + +* ``runserver`` no longer errors if the ``staticfiles`` app is not enabled in Django. Backwards Incompatible Changes diff --git a/js_client/package.json b/js_client/package.json index b62c20e..8eff412 100644 --- a/js_client/package.json +++ b/js_client/package.json @@ -1,6 +1,6 @@ { "name": "django-channels", - "version": "0.0.2", + "version": "1.1.0", "description": "", "repository": { "type": "git",