* Mark runtests helper executable
* Bump required version of asgiref
We're probably making our life easier when we keep the Channels
dependencies roughly in sync. As a 1.0 release was made, I suggest to
require it.
* Simplify tox and Travis configuration
I hopefully simplified the tox configuration by following what I did in
the other four Channels projects.
I then had a good look at tox-travis and decided to remove it. It does
add a layer of indirection with, IMHO, not enough gain. To understand
what Travis is doing, one would need to consider two files (and
understand tox-travis) instead of just one file. It also introduces
another point of failure. What pushed me over was that there's a bug
with env matching (https://github.com/ryanhiebert/tox-travis/issues/55)
and tox or tox-travis seem to mask an Exception
(https://travis-ci.org/django/channels/jobs/195950971#L195) that would
be hard to debug.
The draw back is that we duplicate the Django dependency matrix, and the
commands that are executed in Travis and tox. We could add a "--with-qa"
flag to runtests.py to have it execute flake8 and isort to rectify the
latter.
I extracted test dependencies as I did for asgi_redis.
* Document supported versions
* Test against Python 3.4 and multiple Twisted versions
This commit adds tox to be able to test against different dependencies
locally. We agreed that Python 3.4 should be supported across all Channels
projects, so it is also added with this commit.
Furthermore, I think it makes sense to support a broad range of Twisted
releases, as users of daphne are not unlikely to have other Twisted code
running. It's not feasible to test against all releases since 16.0, and
it would require constant maintenance to add new releases as they come
out. So I opted to keep things simple for now, and only test against the
oldest supported and the current Twisted release.
I did consider @jpic's great idea from
https://github.com/django/daphne/pull/19 to just use tox to avoid having
to duplicate the dependency matrix. But it does lead to slower test runs
as it bypasses Travis' caching, and is slightly more verbose.
* Require asgiref 1.0 and use receive instead of receive_many
As both daphne and asgiref had a 1.0 release, I think it makes sense to
require the presumably more stable asgiref 1.0. It's also a good
occasion to fix the deprecation warnings when running the tests by
switching to receive instead of receive_many.
* Document supported Python and Twisted versions
* Fix#72: Configuring the underlying Autobahn Websocket connection factory so that 'null' origins are accepted, effectively allowing connections from Cordova/PhoneGap clients
* Fix#72: Adding test for no origin header use case
* Make benchmark installable module.
* Use passed url in the Benchmarker constructor.
* Correct percentile output.
* Import reactor globally.
Since it used in the benchmarker.
* Fix for session shenanigans with WebsocketDemultiplexer
Session data was getting lost in the demux due to the session getting
saved after only the first connect/disconnect consumer was run.
* fix for flake8
* flake8 again
flake8 again
* User friendly way to close websocket with status
* More generic way to close(whatever) connection by exception
* Fix import ordering for exceptions (isort)
* more consistent metrics
More consistent metrics, in particular for consumers such as Graphite, CloudWatch etc. you don't want aggregated numbers per second, you want number since previous call. Since we don't want to track all the clients, total since start is the next best thing, because it can be easily calculated by the metrics consumer `count_since_last = pervious_count - current_count`
* changing 'queue_depth' to 'messages_pending', also making 'messages' plurar for 'max_age' to keep it consitent
* Added accept at default behavior for websocket generic cbv and pass message instead of dict
* Fix flake8
* Use HttpClient Instead of Client
* Fix lsort