]>
git.ipfire.org Git - thirdparty/tornado.git/log
Ben Darnell [Mon, 14 Jan 2013 02:53:12 +0000 (21:53 -0500)]
Remove more py25 testing configs
Ben Darnell [Mon, 14 Jan 2013 02:31:55 +0000 (21:31 -0500)]
Get all the tests passing under py3 without 2to3
Ben Darnell [Mon, 14 Jan 2013 02:19:45 +0000 (21:19 -0500)]
Get autoreload working in py3 without 2to3.
Ben Darnell [Mon, 14 Jan 2013 02:15:45 +0000 (21:15 -0500)]
Checkpoint: tests can now be imported in python 3 without 2to3.
The tests are not passing, but this fixes up all the import-time problems.
The tests still work under 2to3 or python 2.
Ben Darnell [Mon, 14 Jan 2013 00:35:04 +0000 (19:35 -0500)]
Convert print to a function and add future imports.
Automated with 2to3 and custom fixer.
2to3 -f print tornado > print.diff
2to3 -f print -d tornado > print_doctest.diff
maint/scripts/run_fixers.py -f future_import tornado > future.diff
cd tornado
git apply ../{print,print_doctest,future}.diff
Ben Darnell [Mon, 14 Jan 2013 00:16:33 +0000 (19:16 -0500)]
Change "except Type, value" to "except Type as value".
Necessary for py3, supported since py26.
2to3 -n -w -f except tornado
Ben Darnell [Mon, 14 Jan 2013 00:11:03 +0000 (19:11 -0500)]
Convert all unicode literals to tornado.util.u.
Mostly done by the fixer script with manual import updates,
although the raw literal in escape.py needed special handling.
Ben Darnell [Sun, 13 Jan 2013 23:41:26 +0000 (18:41 -0500)]
Add a simple sanity-check test for locale data.
Ben Darnell [Sun, 13 Jan 2013 23:10:01 +0000 (18:10 -0500)]
Add tornado.util.u and a fixer script to start using it.
Ben Darnell [Sun, 13 Jan 2013 23:09:43 +0000 (18:09 -0500)]
Drop py25 from the main tox.ini
Ben Darnell [Sat, 12 Jan 2013 17:19:30 +0000 (12:19 -0500)]
Fix typo in docs
Ben Darnell [Sun, 30 Dec 2012 20:38:09 +0000 (21:38 +0100)]
Fix an import that's been missing since the options/log refactoring.
Add a test for this previously-uncovered code.
Ben Darnell [Thu, 27 Dec 2012 14:50:53 +0000 (15:50 +0100)]
Test with twisted 12.3
Ben Darnell [Sat, 22 Dec 2012 17:08:03 +0000 (12:08 -0500)]
Allow tuples for the IOStream.close exc_info argument.
Update release notes.
Ben Darnell [Sat, 22 Dec 2012 16:49:35 +0000 (11:49 -0500)]
Merge remote-tracking branch 'ajdavis/issue-651'
Ben Darnell [Fri, 21 Dec 2012 04:51:17 +0000 (23:51 -0500)]
Release notes for add_headers change
Ben Darnell [Fri, 21 Dec 2012 04:42:38 +0000 (23:42 -0500)]
Merge remote-tracking branch 'jparise/append-handlers' into merge
bdarnell [Fri, 21 Dec 2012 04:17:47 +0000 (20:17 -0800)]
Merge pull request #654 from davidwilemski/patch-1
Fix typo in releases/next.rst
David Wilemski [Sat, 15 Dec 2012 02:15:53 +0000 (21:15 -0500)]
Fix typo in releases/next.rst
A. Jesse Jiryu Davis [Tue, 11 Dec 2012 16:45:21 +0000 (11:45 -0500)]
Avoid setting IOStream.error to wrong exception, close #651
Ben Darnell [Sun, 9 Dec 2012 00:34:16 +0000 (19:34 -0500)]
Replace a couple of contextmanager functions with ExceptionStackContext.
Ben Darnell [Sun, 9 Dec 2012 00:21:25 +0000 (19:21 -0500)]
Merge remote-tracking branch 'rhettg/master' into work
Ben Darnell [Sat, 8 Dec 2012 23:37:45 +0000 (18:37 -0500)]
Run AsyncHTTPClient callbacks on the IOLoop for a clean stack.
Closes #652.
Ben Darnell [Sun, 9 Dec 2012 00:17:27 +0000 (19:17 -0500)]
TwistedIOLoop now supports overriding handle_callback_exception.
Ben Darnell [Sat, 8 Dec 2012 23:32:17 +0000 (18:32 -0500)]
Remove some now-unnecessary calls to functools.partial
Ben Darnell [Sat, 8 Dec 2012 23:27:12 +0000 (18:27 -0500)]
Add forgotten release note.
Ben Darnell [Sat, 8 Dec 2012 23:25:11 +0000 (18:25 -0500)]
add_callback now takes *args, **kwargs.
This reduces the need for functools.partial or lambda wrappers, and
works better with stack_context in some cases since binding the
arguments within IOLoop lets it see whether the function is already
wrapped.
Rhett Garber [Sat, 8 Dec 2012 00:13:57 +0000 (16:13 -0800)]
Don't catch and hide exceptions caused by callbacks in http client
Ben Darnell [Fri, 7 Dec 2012 19:28:13 +0000 (14:28 -0500)]
curl_httpclient: don't call remove_handler if we never added it.
Re-order IOLoop and self._fds operations for consistency.
Ben Darnell [Fri, 7 Dec 2012 19:19:48 +0000 (14:19 -0500)]
Catch all exceptions, not just {OS,IO}Error in IOLoop.remove_handler.
Attempting to remove a non-existent fd raises IOError on epoll
but KeyError on kqueue; this change swallows any exeption to make
both platforms consistent.
Ben Darnell [Sun, 2 Dec 2012 18:37:54 +0000 (13:37 -0500)]
Add path_{kw,}args attributes to RequestHandler.
Ben Darnell [Sun, 2 Dec 2012 17:33:51 +0000 (12:33 -0500)]
Return a Vary: Accept-Encoding header whenever gzip is enabled.
This is one of two problems found with redbot. The other,
that etags should change when content-encoding is used, is trickier to
fix and seems to be less problematic.
Closes #578.
Ben Darnell [Sun, 2 Dec 2012 16:13:42 +0000 (11:13 -0500)]
Add tests using the Redbot library for HTTP validation and caching.
Ben Darnell [Sun, 2 Dec 2012 02:27:34 +0000 (21:27 -0500)]
Document the use of self.xsrf_token to set the cookie for ajax-only apps.
Closes #645.
Ben Darnell [Sat, 1 Dec 2012 23:17:07 +0000 (18:17 -0500)]
Document the need to pass Connection: close when using no_keep_alive.
Closes #641.
Ben Darnell [Sat, 1 Dec 2012 20:50:40 +0000 (15:50 -0500)]
Add a mock.patch-compatible wrapper for options objects.
Ben Darnell [Tue, 27 Nov 2012 02:46:16 +0000 (21:46 -0500)]
Doc cleanups.
* Fix doc generation for httpclient.py (unescaped \r\n)
* Manually specify signature of Template constructor
* Include IOLoop.time
Closes #644.
Ben Darnell [Sun, 25 Nov 2012 17:01:14 +0000 (12:01 -0500)]
ErrorHandler no longer requires XSRF tokens.
Closes #638.
Ben Darnell [Sun, 25 Nov 2012 16:38:25 +0000 (11:38 -0500)]
Add protocol kwarg to HTTPServer constructor.
Ben Darnell [Sun, 25 Nov 2012 16:26:13 +0000 (11:26 -0500)]
Accept Content-Length headers in 304 responses.
Closes #639.
Ben Darnell [Sun, 25 Nov 2012 03:28:13 +0000 (22:28 -0500)]
Remove now-redundant entries from next.rst, bump version to 2.4.post2.
Ben Darnell [Sun, 25 Nov 2012 02:54:18 +0000 (21:54 -0500)]
Merge branch 'branch2.4'
Conflicts:
setup.py
tornado/__init__.py
tornado/test/auth_test.py
website/sphinx/releases.rst
Ben Darnell [Sun, 25 Nov 2012 02:22:10 +0000 (21:22 -0500)]
Bump version to 2.4.1, update release notes.
Ben Darnell [Fri, 9 Nov 2012 04:29:45 +0000 (23:29 -0500)]
Fix a bug with IOStream.read_until_close with a streaming_callback.
If the underlying socket was already closed the buffered data
would be passed to the final callback rather than the streaming callback.
Conflicts:
website/sphinx/releases/next.rst
Ben Darnell [Sat, 17 Nov 2012 20:15:31 +0000 (15:15 -0500)]
Fix TwitterMixin on Python 3.
Also add tests, and add get_auth_http_client method to all auth mixins.
Closes #634.
Conflicts:
tornado/test/auth_test.py
website/sphinx/releases/next.rst
Ben Darnell [Sat, 17 Nov 2012 21:35:42 +0000 (16:35 -0500)]
Fix a memory leak in stack_context.
The old_contexts reference in StackContexts could maintain a chain of
old irrelevant contexts, so clear it once it's no longer needed.
This was mainly a problem in gen.engine, where additional contexts
would accumulate in memory (but not on the stack) for each asynchronous
operation.
Also clear the deactivate_stack_context in gen.Runner to allow
the StackContext to be garbage-collected sooner.
Ben Darnell [Mon, 19 Nov 2012 15:14:01 +0000 (10:14 -0500)]
Use AsyncHTTPClient's defaults option in AsyncHTTPSTestCase.
Fix test_non_ssl_request, which has apparently been testing the wrong
thing for some time.
Ben Darnell [Mon, 19 Nov 2012 02:35:36 +0000 (21:35 -0500)]
Remove redundant logging of read errors in IOStream.
The logging in read_from_fd is generally redundant with logging at
higher levels - the error would be logged again in _handle_read,
or propagated from _try_inline_read.
Closes #632.
Ben Darnell [Mon, 19 Nov 2012 00:29:18 +0000 (19:29 -0500)]
Allow default HTTPRequest attributes to be set globally via configure.
Closes #379.
Ben Darnell [Sun, 18 Nov 2012 22:13:31 +0000 (17:13 -0500)]
Remove outdated warnings and config instructions from simple_httpclient.
Ben Darnell [Sun, 18 Nov 2012 21:24:49 +0000 (16:24 -0500)]
Merge branch 'branch2.4'
Conflicts:
website/sphinx/database.rst
Ben Darnell [Sun, 18 Nov 2012 21:19:33 +0000 (16:19 -0500)]
Upgrade appengine website to python 2.7.
Ben Darnell [Sun, 18 Nov 2012 21:09:45 +0000 (16:09 -0500)]
Update app engine id for HRD migration.
Ben Darnell [Sun, 18 Nov 2012 20:27:22 +0000 (15:27 -0500)]
Document the deprecation of tornado.database in the 2.4 branch.
Jon Parise [Sun, 18 Nov 2012 19:45:38 +0000 (11:45 -0800)]
_get_host_handlers() now returns all host matches.
This approach has more clearly defined precedence rules than the
previous insertion-time strategy implemented in add_handlers().
It also correctly leaves pattern matching in the hands of the regular
expression evaluator as opposed to directly comparing pattern strings.
Jon Parise [Sun, 18 Nov 2012 18:38:09 +0000 (10:38 -0800)]
Merge branch 'master' into append-handlers
Ben Darnell [Sun, 18 Nov 2012 17:25:13 +0000 (12:25 -0500)]
Make header_callback behavior consistent across both HTTP clients.
SimpleAsyncHTTPClient now sends the first and last lines to the callback,
matching CurlAsyncHTTPClient's behavior.
All secondary callbacks are now wrapped for stack_context.
Closes #637.
Ben Darnell [Sun, 18 Nov 2012 04:37:42 +0000 (23:37 -0500)]
Fix If-None-Match support for StaticFileHandler.
No longer set Cache-Control: public on static files; redbot.org says
it generally doesn't do anything useful.
Ben Darnell [Sat, 17 Nov 2012 21:35:42 +0000 (16:35 -0500)]
Fix a memory leak in stack_context.
The old_contexts reference in StackContexts could maintain a chain of
old irrelevant contexts, so clear it once it's no longer needed.
This was mainly a problem in gen.engine, where additional contexts
would accumulate in memory (but not on the stack) for each asynchronous
operation.
Also clear the deactivate_stack_context in gen.Runner to allow
the StackContext to be garbage-collected sooner.
Ben Darnell [Sat, 17 Nov 2012 20:44:21 +0000 (15:44 -0500)]
Ensure that add_callback fails cleanly if called while IOLoop is closing.
Previously there would (sometimes) be an exception when writing to the
waker pipe.
Closes #635.
Ben Darnell [Sat, 17 Nov 2012 20:15:31 +0000 (15:15 -0500)]
Fix TwitterMixin on Python 3.
Also add tests, and add get_auth_http_client method to all auth mixins.
Closes #634.
bdarnell [Sun, 11 Nov 2012 03:18:28 +0000 (19:18 -0800)]
Merge pull request #627 from jparise/urlspec-repr
Add a helpful __repr__ implementation to URLSpec.
bdarnell [Sun, 11 Nov 2012 03:17:37 +0000 (19:17 -0800)]
Merge pull request #624 from pablopda/master
Move README so github web interface recognize its markup language
Ben Darnell [Fri, 9 Nov 2012 04:29:45 +0000 (23:29 -0500)]
Fix a bug with IOStream.read_until_close with a streaming_callback.
If the underlying socket was already closed the buffered data
would be passed to the final callback rather than the streaming callback.
Jon Parise [Wed, 7 Nov 2012 01:33:24 +0000 (17:33 -0800)]
Allow add_handlers() to append to existing hosts.
This change removes the restriction that all handlers for a given host
pattern be registered in a single call to add_handlers().
Jon Parise [Wed, 7 Nov 2012 00:04:36 +0000 (16:04 -0800)]
Add a helpful __repr__ implementation to URLSpec.
Pablo Perez De Angelis [Fri, 2 Nov 2012 21:29:40 +0000 (18:29 -0300)]
Mv README so github web interface recognize its markup language
Ben Darnell [Thu, 1 Nov 2012 17:23:27 +0000 (10:23 -0700)]
Release notes for 302/303 change.
Ben Darnell [Thu, 1 Nov 2012 05:53:08 +0000 (22:53 -0700)]
simple_httpclient: Treat 302 like 303.
Cherry-picked from https://github.com/bergundy/tornado/commit/
e49b263de2f4aa7b9748531b2ccf6b50b28b1bd5
Closes #623.
Ben Darnell [Tue, 30 Oct 2012 05:33:54 +0000 (22:33 -0700)]
AsyncHTTPTestCase no longer closes AsyncHTTPClients on the global IOLoop.
Code that uses the global IOLoop may retain a global reference to
an AsyncHTTPClient as well, which would become inoperable after a test
had closed it.
Peter Sobot [Tue, 23 Oct 2012 21:06:08 +0000 (18:06 -0300)]
Added more sensical callback time verification.
Peter Sobot [Tue, 23 Oct 2012 18:33:17 +0000 (15:33 -0300)]
Added period check in PeriodicCallback
If a user currently passes in 0ms (hopefully by accident) as the
callback time for a periodic callback, Tornado consumes a huge amount
of CPU and never calls the function.
Ben Darnell [Fri, 19 Oct 2012 01:20:53 +0000 (21:20 -0400)]
Add a comment to runtests.sh about python 3.
Closes #612.
Ben Darnell [Mon, 8 Oct 2012 02:11:37 +0000 (19:11 -0700)]
Actually use add_callback_from_signal from the SIGCHLD handler.
Ben Darnell [Sun, 7 Oct 2012 23:59:36 +0000 (16:59 -0700)]
Fix TwistedIOLoop on epoll.
Twisted's removeAll doesn't like it if a socket is closed without being
unregistered. EPoll generates events slightly differently so be more
careful about doubled connectionLost events.
Ben Darnell [Sun, 7 Oct 2012 21:21:42 +0000 (14:21 -0700)]
Implement TwistedIOLoop, to bridge the gap with Twisted in the other direction.
This also serves as a proof of concept for the refactored IOLoop interface.
Ben Darnell [Sun, 7 Oct 2012 23:02:50 +0000 (16:02 -0700)]
Remove the method IOLoop.running.
Ben Darnell [Sun, 7 Oct 2012 18:16:41 +0000 (11:16 -0700)]
Split IOLoop into a base class and poll-based implementation.
The base class has all the methods with docstrings; nearly all the
implementation is in a new subclass PollIOLoop.
Ben Darnell [Sat, 6 Oct 2012 19:52:34 +0000 (12:52 -0700)]
Move IOLoop subclasses to their own modules under platform.
Ben Darnell [Sat, 6 Oct 2012 19:51:25 +0000 (12:51 -0700)]
Add a little more slack to this timing test.
It seems to fail a lot on VMs.
Ben Darnell [Sun, 7 Oct 2012 04:06:52 +0000 (21:06 -0700)]
Check self.closed() in the inner read loop of IOStream.
This was causing error logs in the keepalive tests (but only on epoll)
Ben Darnell [Sat, 6 Oct 2012 05:09:07 +0000 (22:09 -0700)]
Avoid creating multiple redundant autoreload callbacks.
Ben Darnell [Fri, 5 Oct 2012 04:35:02 +0000 (21:35 -0700)]
One more log spam test: connect then immediately close the connection.
Ben Darnell [Fri, 5 Oct 2012 04:14:41 +0000 (21:14 -0700)]
Add tests and release notes for {% apply %} unicode fix.
Ben Darnell [Fri, 5 Oct 2012 04:08:27 +0000 (21:08 -0700)]
Merge remote-tracking branch 'dmitric/master'
Ben Darnell [Fri, 5 Oct 2012 04:01:56 +0000 (21:01 -0700)]
Fix typo in release notes (thanks jparise!))
Dmitri Cherniak [Thu, 4 Oct 2012 18:07:29 +0000 (14:07 -0400)]
Ensure result from apply block is utf8
Ben Darnell [Thu, 4 Oct 2012 05:36:46 +0000 (22:36 -0700)]
Reduce log spam from closed client connections.
Added a bunch of tests for keepalive functionality and fixed two cases
where we'd log an exception when the client was gone. ECONNRESET
errors in IOStream reads now just close the connection instead of
logging an error (the exception information is still available on
stream.error in the close callback for apps that want it).
HTTPConnection now also checks for a closed connection and cleans up
instead of logging an error.
IOStream now raises a new exception class StreamClosedError instead of
IOError.
Ben Darnell [Mon, 1 Oct 2012 06:57:49 +0000 (23:57 -0700)]
Add time_func parameter to IOLoop, and make it possible to use time.monotonic.
This means that calls to IOLoop.add_timeout that pass a number must be
updated to use IOLoop.time instead of time.time.
There are still some places where we use time.time in the code, but they
are either places where wall time is desired, or non-critical deltas (e.g.
printing elapsed time at the end of a request).
Thanks to apenwarr and mgenti for pull requests and discussion relating to
this change. (#558 and #583)
Ben Darnell [Mon, 1 Oct 2012 05:57:32 +0000 (22:57 -0700)]
IOLoop poller implementations are now subclasses of IOLoop.
Update testing command-line flags to allow configuration of a non-default
IOLoop.
Ben Darnell [Mon, 1 Oct 2012 05:19:59 +0000 (22:19 -0700)]
Extract configure logic from AsyncHTTPClient to a base class.
IOLoop now extends this base class as well, although no other
implementations are provided yet. This does not include the
pseudo-singleton magic from AsyncHTTPClient.
Ben Darnell [Mon, 1 Oct 2012 02:10:16 +0000 (19:10 -0700)]
AsyncHTTPClient: remove legacy magic around max_clients arg.
Fix a bug in which configured kwargs would be applied to a non-configured
class.
Ben Darnell [Sun, 30 Sep 2012 23:13:49 +0000 (16:13 -0700)]
OptionParser now contains a dict rather than subclassing dict.
Ben Darnell [Sun, 30 Sep 2012 23:06:21 +0000 (16:06 -0700)]
Doc updates for the options module
Ben Darnell [Sun, 30 Sep 2012 22:44:45 +0000 (15:44 -0700)]
Rename _Options to OptionParser, and fix bugs with --help
Ben Darnell [Sun, 30 Sep 2012 22:28:33 +0000 (15:28 -0700)]
Add per-option callbacks, and implement --help with them.
Ben Darnell [Sun, 30 Sep 2012 22:05:29 +0000 (15:05 -0700)]
Introduce parse callbacks in the options module.
This is a generalization of the existing magic for logging. Logging
configuration is now moved to log.py.
Ben Darnell [Sun, 30 Sep 2012 19:00:10 +0000 (12:00 -0700)]
AsyncHTTPTestCase: bind the server port earlier so it's available
in user-overridable methods like get_app.
Ben Darnell [Sun, 30 Sep 2012 00:47:41 +0000 (17:47 -0700)]
Add futures to travis and vm tests, update assorted dependency versions.
Ben Darnell [Sun, 30 Sep 2012 00:46:50 +0000 (17:46 -0700)]
Cleanly shut down the ThreadPoolExecutor in Resolver tests.
This was somehow causing a problem on Ubuntu 10.04.