]> git.ipfire.org Git - thirdparty/tornado.git/log
thirdparty/tornado.git
13 years agoMerge pull request #396 from justinrosenthal/master
bdarnell [Mon, 14 Nov 2011 06:52:36 +0000 (22:52 -0800)] 
Merge pull request #396 from justinrosenthal/master

Prevent duplicate callbacks when PeriodicCallback is stopped and restarted before _next_timeout

13 years agoMerge pull request #397 from swies/master
bdarnell [Mon, 14 Nov 2011 06:51:51 +0000 (22:51 -0800)] 
Merge pull request #397 from swies/master

Invalid Cookie header crashes get_cookie

13 years agoMerge pull request #398 from phleet/patch-1
bdarnell [Mon, 14 Nov 2011 06:50:25 +0000 (22:50 -0800)] 
Merge pull request #398 from phleet/patch-1

Documentation fix for AsyncTestCase

13 years agoAdd very basic testing for app engine
Ben Darnell [Mon, 14 Nov 2011 05:22:21 +0000 (21:22 -0800)] 
Add very basic testing for app engine

13 years agoThread safety for shared data structures (templates and static file hashes)
Ben Darnell [Mon, 14 Nov 2011 04:15:44 +0000 (20:15 -0800)] 
Thread safety for shared data structures (templates and static file hashes)

These data structures were basically safe before thanks to the GIL, but could
lead to wasted work in multithreaded environments (such as the new python2.7
app engine)

Also fixed a bug that made debug mode not invalidate static files.

13 years agoAdd an option to the test runner to kill the process on SIGINT
Ben Darnell [Mon, 14 Nov 2011 02:07:32 +0000 (18:07 -0800)] 
Add an option to the test runner to kill the process on SIGINT
instead of raising an exception.

This makes it easier to work with tests that get into uninterruptible
states (such as threading.Lock deadlocks)

13 years agoDocumentation fix for AsyncTestCase 398/head
Jamie Wong [Sun, 13 Nov 2011 06:56:52 +0000 (22:56 -0800)] 
Documentation fix for AsyncTestCase

13 years agoLocal copy of sphix coverage plugin is no longer needed in version 1.1
Ben Darnell [Sat, 12 Nov 2011 04:35:26 +0000 (20:35 -0800)] 
Local copy of sphix coverage plugin is no longer needed in version 1.1

13 years agofix crash on invalid Cookie header 397/head
Patrick Swieskowski [Sun, 6 Nov 2011 16:56:00 +0000 (08:56 -0800)] 
fix crash on invalid Cookie header

13 years agoPrevent duplicate callbacks when PeriodicCallback is stopped and restarted before... 396/head
Justin Rosenthal [Fri, 4 Nov 2011 06:31:49 +0000 (23:31 -0700)] 
Prevent duplicate callbacks when PeriodicCallback is stopped and restarted before _next_timeout

13 years agoUse a AND instead of an OR to determine if the bits are set on the event 389/head
David Koblas [Tue, 25 Oct 2011 22:24:41 +0000 (15:24 -0700)] 
Use a AND instead of an OR to determine if the bits are set on the event
mask.  Also, handle some basic error cases in the event bits and twisted
callback.

13 years agoAdd return statements missing from HEAD/204 fix
Ben Darnell [Tue, 25 Oct 2011 17:50:22 +0000 (10:50 -0700)] 
Add return statements missing from HEAD/204 fix

13 years agoFix zero-byte writes in IOStream.
Ben Darnell [Tue, 25 Oct 2011 05:02:15 +0000 (22:02 -0700)] 
Fix zero-byte writes in IOStream.

Previously zero-byte writes would cause the CPU to run at 100% and
would never call their callback (if any).

13 years agoFix hang on HEAD requests and on 204/304 responses with no content-length.
Ben Darnell [Sun, 23 Oct 2011 21:43:20 +0000 (14:43 -0700)] 
Fix hang on HEAD requests and on 204/304 responses with no content-length.

Closes #386.

13 years agoSigh... More websocket protocol changes.
Ben Darnell [Sun, 23 Oct 2011 20:39:19 +0000 (13:39 -0700)] 
Sigh... More websocket protocol changes.

Closes #385.

13 years agoAdd configs for testing on Vagrant-managed VMs.
Ben Darnell [Fri, 7 Oct 2011 08:06:01 +0000 (01:06 -0700)] 
Add configs for testing on Vagrant-managed VMs.

13 years agoBump version number in the master branch
Ben Darnell [Fri, 7 Oct 2011 08:07:58 +0000 (01:07 -0700)] 
Bump version number in the master branch

13 years agoSet version number to 2.1.1 v2.1.1
Ben Darnell [Tue, 4 Oct 2011 16:59:49 +0000 (09:59 -0700)] 
Set version number to 2.1.1

13 years agoAdd release notes for 2.1.1
Ben Darnell [Tue, 4 Oct 2011 16:50:47 +0000 (09:50 -0700)] 
Add release notes for 2.1.1

13 years agoAlways advance _next_timeout in PeriodicCallback._schedule_next().
Ben Darnell [Tue, 4 Oct 2011 15:54:38 +0000 (08:54 -0700)] 
Always advance _next_timeout in PeriodicCallback._schedule_next().

On fast machines (and platforms where time.time() has low resolution),
it's possible to make it through an IOLoop iteration with time.time()
unchanged, which would cause the callback to be run multiple times
regardless of the requested interval.

Closes #366.

13 years agoMerge pull request #372 from WGH-/patch-1
bdarnell [Tue, 4 Oct 2011 05:45:18 +0000 (22:45 -0700)] 
Merge pull request #372 from WGH-/patch-1

tornado/iostream.py - long type in read_bytes

13 years agoErrors from socket.connect() should be treated the same way as async failures.
Ben Darnell [Tue, 4 Oct 2011 05:28:33 +0000 (22:28 -0700)] 
Errors from socket.connect() should be treated the same way as async failures.

On freebsd non-blocking connect() may return certain errors (such as
ECONNREFUSED from localhost) immediately instead of returning EINPROGRESS
and then giving the error later.

Also improve the test for ipv6 compatibility, since freebsd returns a different
error than other platforms when ipv6 is not available.

13 years agoEdited tornado/iostream.py via GitHub 372/head
WGH- [Mon, 3 Oct 2011 17:03:14 +0000 (21:03 +0400)] 
Edited tornado/iostream.py via GitHub

13 years agoFix a case in which chunked responses could be closed prematurely.
Ben Darnell [Thu, 22 Sep 2011 17:38:35 +0000 (10:38 -0700)] 
Fix a case in which chunked responses could be closed prematurely.

The bug manifests with certain patterns of fast-path/slow-path writes
on the IOStream, so it's difficult to test (it was more likely to occur in
2.0 than in 2.1).

http://groups.google.com/group/python-tornado/browse_thread/thread/7228881f7af38070

13 years agoFix connection-close detection for epoll.
Ben Darnell [Thu, 22 Sep 2011 07:10:43 +0000 (00:10 -0700)] 
Fix connection-close detection for epoll.

Previously, closed connections with epoll sent an IOLoop.ERROR event
while there was still data in the OS's socket buffers.  Event handlers
that did not drain the entire socket buffer before processing the
close event would lose data. (this was primarily an issue for
SimpleAsyncHTTPClient)

IOLoop.ERROR no longer includes EPOLLRDHUP (which is only supposed to be
used in edge-triggered mode: https://lkml.org/lkml/2003/7/12/132), so closed
connections while reading are signaled as zero-byte reads once the buffer
is drained (this was already the behavior of the select-based IOLoop).
Closed connections while writing are still signaled with EPOLLHUP.

Backwards-compatibility note:  Listening for IOLoop.ERROR alone is no longer
sufficient for detecting closed connections on an otherwise unused socket.
IOLoop.ERROR must always be used in combination with READ or WRITE.

13 years agoBump version number in the master branch
Ben Darnell [Thu, 22 Sep 2011 07:31:28 +0000 (00:31 -0700)] 
Bump version number in the master branch

13 years agoSet version number to 2.1 v2.1.0
Ben Darnell [Wed, 21 Sep 2011 04:21:52 +0000 (21:21 -0700)] 
Set version number to 2.1

13 years agoMove next.rst to v2.1.0.rst
Ben Darnell [Wed, 21 Sep 2011 04:21:07 +0000 (21:21 -0700)] 
Move next.rst to v2.1.0.rst

13 years agoMerge pull request #363 from daharon/master
bdarnell [Mon, 19 Sep 2011 17:45:37 +0000 (10:45 -0700)] 
Merge pull request #363 from daharon/master

Make HTTPHeaders.__contains__() case-insensitive, like the rest of the object

13 years agoMake HTTPHeaders.__contains__() case-insensitive, like the rest of the object. 363/head
Daniel Aharon [Mon, 19 Sep 2011 16:32:27 +0000 (09:32 -0700)] 
Make HTTPHeaders.__contains__() case-insensitive, like the rest of the object.

13 years agoAdd a test for the bug fixed in commit e811959
Ben Darnell [Sun, 18 Sep 2011 23:44:32 +0000 (16:44 -0700)] 
Add a test for the bug fixed in commit e811959

13 years agoFix the handling of messages of length 126 in the draft-10 Websocket implementation.
Florian Diebold [Sat, 17 Sep 2011 22:17:47 +0000 (00:17 +0200)] 
Fix the handling of messages of length 126 in the draft-10 Websocket implementation.

13 years agoFix the IOStream close callback not getting called if there are pending callbacks.
Florian Diebold [Sun, 4 Sep 2011 16:47:01 +0000 (18:47 +0200)] 
Fix the IOStream close callback not getting called if there are pending callbacks.

_maybe_add_error_listener only does anything if _state is None.

13 years agoClose leaking listener socket in tests
Ben Darnell [Sun, 18 Sep 2011 05:00:00 +0000 (22:00 -0700)] 
Close leaking listener socket in tests

13 years agoMore release note updates
Ben Darnell [Sat, 17 Sep 2011 20:14:11 +0000 (13:14 -0700)] 
More release note updates

13 years agoUpdate ca-certs file to remove Diginotar
Ben Darnell [Thu, 15 Sep 2011 18:22:22 +0000 (11:22 -0700)] 
Update ca-certs file to remove Diginotar

13 years agoPut overview documentation back in HTTPServer docstring, and other doc
Ben Darnell [Thu, 15 Sep 2011 05:30:11 +0000 (22:30 -0700)] 
Put overview documentation back in HTTPServer docstring, and other doc
and import cleanups

13 years agoMerge remote-tracking branch 'alekstorm/tcpserver' into merge
Ben Darnell [Thu, 15 Sep 2011 04:22:32 +0000 (21:22 -0700)] 
Merge remote-tracking branch 'alekstorm/tcpserver' into merge

13 years agoRemove doc warnings about tornado.auth in python3
Ben Darnell [Mon, 12 Sep 2011 06:16:08 +0000 (23:16 -0700)] 
Remove doc warnings about tornado.auth in python3

13 years agoAdd crude tests for the auth module, and fix python3 issues with oauth1
Ben Darnell [Mon, 12 Sep 2011 05:50:13 +0000 (22:50 -0700)] 
Add crude tests for the auth module, and fix python3 issues with oauth1

13 years agoMove `TCPServer` to `netutil`, change `handle_stream` callback to overridden method... 353/head
Alek Storm [Mon, 12 Sep 2011 05:32:43 +0000 (05:32 +0000)] 
Move `TCPServer` to `netutil`, change `handle_stream` callback to overridden method hook, move IP address hack for unix domain sockets to `HTTPConnection`

13 years agoMerge branch 'branch2.0'
Ben Darnell [Mon, 12 Sep 2011 03:42:22 +0000 (20:42 -0700)] 
Merge branch 'branch2.0'

13 years agoAdd support for callbacks that take more than a single positional argument.
Ben Darnell [Sun, 11 Sep 2011 22:50:34 +0000 (15:50 -0700)] 
Add support for callbacks that take more than a single positional argument.

Closes #351.

13 years agoAdd support for lists of YieldPoints in the gen framework.
Ben Darnell [Sun, 11 Sep 2011 22:09:25 +0000 (15:09 -0700)] 
Add support for lists of YieldPoints in the gen framework.

13 years agoMerge pull request #356 from alekstorm/files
bdarnell [Sat, 10 Sep 2011 23:38:21 +0000 (16:38 -0700)] 
Merge pull request #356 from alekstorm/files

Convert dictionaries representing HTTP files to HTTPFile objects

13 years agoConvert dictionaries representing HTTP files to HTTPFile objects, with dictionary... 356/head
Alek Storm [Sat, 10 Sep 2011 23:27:40 +0000 (23:27 +0000)] 
Convert dictionaries representing HTTP files to HTTPFile objects, with dictionary access for attributes retained for backwards compatibility

13 years agoMove web._O to util.ObjectDict
Alek Storm [Sat, 10 Sep 2011 23:25:10 +0000 (23:25 +0000)] 
Move web._O to util.ObjectDict

13 years agoAdd reference docs for all template directives.
Ben Darnell [Sat, 10 Sep 2011 22:10:31 +0000 (15:10 -0700)] 
Add reference docs for all template directives.

Closes #355.

13 years agoReorder tox environments so the most important/likely-to-fail ones run first.
Ben Darnell [Sat, 10 Sep 2011 21:18:51 +0000 (14:18 -0700)] 
Reorder tox environments so the most important/likely-to-fail ones run first.

13 years agoAdd on_connection_close hook to chat demo to clean up after closed connections.
Ben Darnell [Fri, 9 Sep 2011 05:51:45 +0000 (22:51 -0700)] 
Add on_connection_close hook to chat demo to clean up after closed connections.

Closes #354.

13 years agoExtract cookie-signing methods from RequestHandler so they can be used
Ben Darnell [Fri, 9 Sep 2011 05:45:30 +0000 (22:45 -0700)] 
Extract cookie-signing methods from RequestHandler so they can be used
outside the web stack.

Closes #339.

13 years agoAdd streaming_callback to IOStream.read_bytes and read_until_close.
Ben Darnell [Fri, 9 Sep 2011 05:07:32 +0000 (22:07 -0700)] 
Add streaming_callback to IOStream.read_bytes and read_until_close.

Closes #300.

13 years agoFactor HTTP-specific code into HTTPServer subclass of TCPServer
Alek Storm [Thu, 8 Sep 2011 00:09:52 +0000 (00:09 +0000)] 
Factor HTTP-specific code into HTTPServer subclass of TCPServer

13 years agoRemove unused variables (discovered by pyflakes)
Ben Darnell [Mon, 5 Sep 2011 21:00:51 +0000 (14:00 -0700)] 
Remove unused variables (discovered by pyflakes)

13 years agoImprove exception handling for gen module.
Ben Darnell [Mon, 5 Sep 2011 20:23:57 +0000 (13:23 -0700)] 
Improve exception handling for gen module.

13 years agoAllow any sequence in gen.WaitAll, not just lists.
Ben Darnell [Mon, 5 Sep 2011 19:15:50 +0000 (12:15 -0700)] 
Allow any sequence in gen.WaitAll, not just lists.

13 years agoAdd test for 100-continue functionality, and fix it on python 3
Ben Darnell [Mon, 5 Sep 2011 19:12:07 +0000 (12:12 -0700)] 
Add test for 100-continue functionality, and fix it on python 3

Closes #350.

13 years agoDocument tornado.platform.twisted, and rename ioloop parameter to io_loop
Ben Darnell [Mon, 5 Sep 2011 01:00:06 +0000 (18:00 -0700)] 
Document tornado.platform.twisted, and rename ioloop parameter to io_loop
for consistency with other modules.

13 years agoReorganize release notes
Ben Darnell [Mon, 5 Sep 2011 00:47:39 +0000 (17:47 -0700)] 
Reorganize release notes

13 years agoAccumulated release note updates.
Ben Darnell [Sun, 4 Sep 2011 22:51:25 +0000 (15:51 -0700)] 
Accumulated release note updates.

13 years agoUpdate docs with new methods
Ben Darnell [Sun, 4 Sep 2011 22:39:55 +0000 (15:39 -0700)] 
Update docs with new methods

13 years agoFix error in docs
Ben Darnell [Sun, 4 Sep 2011 19:52:43 +0000 (12:52 -0700)] 
Fix error in docs

13 years agoAdd gen.WaitAll
Ben Darnell [Sun, 4 Sep 2011 18:26:36 +0000 (11:26 -0700)] 
Add gen.WaitAll

13 years agoAdd tornado.gen module for simpler generator-based async code.
Ben Darnell [Sun, 4 Sep 2011 07:59:57 +0000 (00:59 -0700)] 
Add tornado.gen module for simpler generator-based async code.

13 years agoVarious minor test changes for windows.
Ben Darnell [Sat, 3 Sep 2011 20:27:28 +0000 (13:27 -0700)] 
Various minor test changes for windows.

13 years agoRemove test_connect_timeout, which was only passing before due to a bug
Ben Darnell [Sat, 3 Sep 2011 19:20:43 +0000 (12:20 -0700)] 
Remove test_connect_timeout, which was only passing before due to a bug
in the timeout implementation.

13 years agoMerge pull request #349 from milkinc/master
bdarnell [Wed, 31 Aug 2011 03:27:19 +0000 (20:27 -0700)] 
Merge pull request #349 from milkinc/master

Correct on_connect timeout for simple http client

13 years agoMerge pull request #347 from ContextLogic/optiongroup
bdarnell [Wed, 31 Aug 2011 03:26:04 +0000 (20:26 -0700)] 
Merge pull request #347 from ContextLogic/optiongroup

'group' parameter in options.define()

13 years agoCorrected on_connect timeout for simplehttpclient 349/head
Jeff Hodsdon [Wed, 31 Aug 2011 02:05:55 +0000 (19:05 -0700)] 
Corrected on_connect timeout for simplehttpclient

13 years agoIn define(), added option to define our own option group, which is used in print_help(). 347/head
Jeeyoung Kim [Tue, 30 Aug 2011 21:47:34 +0000 (14:47 -0700)] 
In define(), added option to define our own option group, which is used in print_help().

13 years agoMerge pull request #346 from mikejthompson/master
bdarnell [Tue, 30 Aug 2011 05:14:54 +0000 (22:14 -0700)] 
Merge pull request #346 from mikejthompson/master

adding 'cookies' property to wsgi.HTTPRequest

13 years agoadd 'cookies' property to wsgi.HTTPRequest 346/head
Mike Thompson [Tue, 30 Aug 2011 04:18:35 +0000 (21:18 -0700)] 
add 'cookies' property to wsgi.HTTPRequest

13 years agoWatch the main module for tornado.autoreload's -m mode
Ben Darnell [Mon, 29 Aug 2011 01:42:35 +0000 (18:42 -0700)] 
Watch the main module for tornado.autoreload's -m mode

13 years agoMerge commit '864044' into merge 273/head
Ben Darnell [Sun, 28 Aug 2011 06:59:48 +0000 (23:59 -0700)] 
Merge commit '864044' into merge

13 years agoFix typos (argh!). #319
Maciej Małecki [Mon, 22 Aug 2011 22:24:36 +0000 (00:24 +0200)] 
Fix typos (argh!). #319

13 years agoUse subprocess.Popen on Windows, fixes #319
Maciej Małecki [Mon, 22 Aug 2011 13:01:01 +0000 (15:01 +0200)] 
Use subprocess.Popen on Windows, fixes #319

13 years agoAdd a version of database.Connection.execute that returns the rowcount.
Ben Darnell [Sun, 28 Aug 2011 06:24:56 +0000 (23:24 -0700)] 
Add a version of database.Connection.execute that returns the rowcount.

Closes #333.

13 years agoMerge remote-tracking branch 'alekstorm/static_args' into merge
Ben Darnell [Sun, 28 Aug 2011 06:08:48 +0000 (23:08 -0700)] 
Merge remote-tracking branch 'alekstorm/static_args' into merge

13 years agoMerge branch 'master' into merge
Ben Darnell [Sun, 28 Aug 2011 06:04:26 +0000 (23:04 -0700)] 
Merge branch 'master' into merge

13 years agoReinstate RequestHandler.cookies property
Ben Darnell [Sun, 28 Aug 2011 06:02:57 +0000 (23:02 -0700)] 
Reinstate RequestHandler.cookies property

13 years agoimplement request_time in simplehttp_client (and tests) 307/head
Jehiah Czebotar [Sun, 28 Aug 2011 00:51:45 +0000 (20:51 -0400)] 
implement request_time in simplehttp_client (and tests)

13 years agoMerge pull request #344 from akrymski/master
bdarnell [Sat, 27 Aug 2011 19:31:17 +0000 (12:31 -0700)] 
Merge pull request #344 from akrymski/master

javascript not being gzipped

13 years agoapplication/json was missing from GZIP CONTENT_TYPES 344/head
Artemi Krymski [Sat, 27 Aug 2011 15:02:00 +0000 (16:02 +0100)] 
application/json was missing from GZIP CONTENT_TYPES

13 years agoImprove template execution performance. 343/head
Wojciech Polak [Thu, 25 Aug 2011 15:29:32 +0000 (17:29 +0200)] 
Improve template execution performance.

13 years agoMerge pull request #342 from davidwilemski/master
bdarnell [Wed, 24 Aug 2011 03:24:28 +0000 (20:24 -0700)] 
Merge pull request #342 from davidwilemski/master

Template documentation fix

13 years agoFixed typo in template documentation 342/head
David Wilemski [Wed, 24 Aug 2011 03:14:08 +0000 (23:14 -0400)] 
Fixed typo in template documentation

13 years agoSupport max_age as an alias for max-age in set_cookie(**kwargs)
Ben Darnell [Tue, 23 Aug 2011 17:38:11 +0000 (10:38 -0700)] 
Support max_age as an alias for max-age in set_cookie(**kwargs)

13 years agotimedelta.total_seconds() is new in python2.7, so do the math ourselves.
Ben Darnell [Tue, 23 Aug 2011 05:45:27 +0000 (22:45 -0700)] 
timedelta.total_seconds() is new in python2.7, so do the math ourselves.

13 years agoImplemented read_until_regex in tornado. This is similar to read_until(), except...
Jeeyoung Kim [Mon, 22 Aug 2011 22:14:39 +0000 (15:14 -0700)] 
Implemented read_until_regex in tornado. This is similar to read_until(), except it looks for a specific delimiter. This function is used to parse the header of the website, where it is delimited by '\n' only (like http://news.ycombinator.com/rss)

13 years agoMerge pull request #340 from alekstorm/template_namespace
bdarnell [Sun, 21 Aug 2011 23:54:43 +0000 (16:54 -0700)] 
Merge pull request #340 from alekstorm/template_namespace

Add 'namespace' parameter to template.BaseLoader constructor

13 years agoWhen following redirects, release connection resources immediately
Ben Darnell [Sun, 21 Aug 2011 22:53:00 +0000 (15:53 -0700)] 
When following redirects, release connection resources immediately

13 years agoAdd 'namespace' parameter to template.BaseLoader constructor 340/head
Alek Storm [Sat, 20 Aug 2011 15:20:16 +0000 (15:20 +0000)] 
Add 'namespace' parameter to template.BaseLoader constructor

Specifies custom entries in the global namespace of loaded templates.

13 years agoMove 'cookies' property from RequestHandler to HTTPRequest 336/head
Alek Storm [Thu, 18 Aug 2011 06:01:50 +0000 (06:01 +0000)] 
Move 'cookies' property from RequestHandler to HTTPRequest

13 years agoAdd 'static_handler_args' application setting to pass extra keyword arguments 335/head
Alek Storm [Wed, 17 Aug 2011 00:19:40 +0000 (00:19 +0000)] 
Add 'static_handler_args' application setting to pass extra keyword arguments
to static file handler constructor.

13 years agoAdd static_handler_class application setting, and move most of static_url
Ben Darnell [Sun, 14 Aug 2011 21:38:42 +0000 (14:38 -0700)] 
Add static_handler_class application setting, and move most of static_url
into the handler class where it can be overridden.

13 years agoAdd tests for static file functionality
Ben Darnell [Sun, 14 Aug 2011 21:20:09 +0000 (14:20 -0700)] 
Add tests for static file functionality

13 years agoIn case the callback_uri and the uri that called authenticate_redirect
Ben Darnell [Sun, 14 Aug 2011 19:03:07 +0000 (12:03 -0700)] 
In case the callback_uri and the uri that called authenticate_redirect
are different, use the callback as the openid realm.

13 years agoRelease note updates
Ben Darnell [Sun, 14 Aug 2011 18:40:10 +0000 (11:40 -0700)] 
Release note updates

13 years agoClean up after the _check_file refactoring.
Ben Darnell [Sun, 14 Aug 2011 17:55:10 +0000 (10:55 -0700)] 
Clean up after the _check_file refactoring.

13 years agoAdd the option to run application hooks before autoreloading.
Ben Darnell [Sun, 14 Aug 2011 17:38:52 +0000 (10:38 -0700)] 
Add the option to run application hooks before autoreloading.

Closes #331