]> git.ipfire.org Git - thirdparty/tornado.git/log
thirdparty/tornado.git
12 years agoAdd a script for setting up a windows VM for testing.
Ben Darnell [Sun, 3 Feb 2013 03:40:53 +0000 (22:40 -0500)] 
Add a script for setting up a windows VM for testing.

This works with the images provided by http://modern.ie.

12 years agoProtect the tornado.gen import in testing.py for app engine.
Ben Darnell [Mon, 28 Jan 2013 01:16:58 +0000 (20:16 -0500)] 
Protect the tornado.gen import in testing.py for app engine.

12 years agoSupport lists of futures in @gen.engine.
Ben Darnell [Sun, 27 Jan 2013 23:07:21 +0000 (18:07 -0500)] 
Support lists of futures in @gen.engine.

12 years agoAdd decorator for @gen.engine-like tests.
Ben Darnell [Sun, 27 Jan 2013 22:47:37 +0000 (17:47 -0500)] 
Add decorator for @gen.engine-like tests.

Futures are awkward to use in stop/wait tests, and this makes it possible
to be consistent between tests and regular code.

Uses the (now-renamed) deactivate_stack_context callback
to detect when a test finishes cleanly.

12 years agoRename future_wrap to return_future.
Ben Darnell [Sun, 27 Jan 2013 22:03:15 +0000 (17:03 -0500)] 
Rename future_wrap to return_future.

Allow exceptions from the initial synchronous phase to pass through
to the caller.  Add docs and tests.

12 years agoA couple of small 2.6-isms.
Ben Darnell [Sun, 27 Jan 2013 21:28:35 +0000 (16:28 -0500)] 
A couple of small 2.6-isms.

We can use namedtuple and the new 0o octal literal notation.

12 years agoCentralize formatting of HTTP-style dates.
Ben Darnell [Sun, 27 Jan 2013 19:01:59 +0000 (14:01 -0500)] 
Centralize formatting of HTTP-style dates.

Use time.strftime, which turns out to be a bit faster than either
datetime.strftime or email.utils.formatdate.

12 years agoFix typo in next.rst.
Ben Darnell [Sun, 27 Jan 2013 15:53:39 +0000 (10:53 -0500)] 
Fix typo in next.rst.

12 years agoUse httputil.HTTPHeaders for outgoing headers in RequestHandler.
Ben Darnell [Sat, 26 Jan 2013 20:43:01 +0000 (15:43 -0500)] 
Use httputil.HTTPHeaders for outgoing headers in RequestHandler.

It's still a bit slower, but less than the 10% noted in the old comment.
Case sensitivity here has proven more surprising and problematic than
expected as users try to overwrite headers set by the framework.

12 years agoNote a performance improvement on PyPy in the release notes.
Ben Darnell [Sat, 26 Jan 2013 19:53:12 +0000 (14:53 -0500)] 
Note a performance improvement on PyPy in the release notes.

sys.exc_info() is very slow on pypy.  Commit
24c3d41748728cf4f3ea1509044b4abc7cea666e removed an unconditional
call to sys.exc_info when there is no error.  Performance on
demo/benchmark/benchmark.py went from 3k qps to 5k.

12 years agoSplit up next.rst by module.
Ben Darnell [Sat, 26 Jan 2013 18:33:52 +0000 (13:33 -0500)] 
Split up next.rst by module.

12 years agoGet the test suite passing on windows again.
Ben Darnell [Fri, 25 Jan 2013 04:13:00 +0000 (23:13 -0500)] 
Get the test suite passing on windows again.

12 years agoGet twisted_test running on python 3 too.
Ben Darnell [Thu, 24 Jan 2013 04:23:57 +0000 (23:23 -0500)] 
Get twisted_test running on python 3 too.

Twisted 12.3.0 can be installed from a source checkout on python3.
Some modules, including twisted.web, are not available so skip those
tests separately.

12 years agoDocument --disable-ipv6 fix and only apply it when family==AF_UNSPEC.
Ben Darnell [Thu, 24 Jan 2013 03:35:16 +0000 (22:35 -0500)] 
Document --disable-ipv6 fix and only apply it when family==AF_UNSPEC.

12 years agoMerge pull request #670 from schlamar/patch-1
bdarnell [Thu, 24 Jan 2013 03:32:38 +0000 (19:32 -0800)] 
Merge pull request #670 from schlamar/patch-1

Fix bind_sockets when python is compiled with --disable-ipv6

12 years agoPreliminary support for ubuntu's python3-pycurl port.
Ben Darnell [Thu, 24 Jan 2013 03:27:00 +0000 (22:27 -0500)] 
Preliminary support for ubuntu's python3-pycurl port.

12 years agoAdd vagrant config for ubuntu 12.10.
Ben Darnell [Thu, 24 Jan 2013 02:22:34 +0000 (21:22 -0500)] 
Add vagrant config for ubuntu 12.10.

This release is interesting because it includes a python3 port of
pycurl (which is difficult to use from tox but can at least be tested
manually).

12 years agoUpdate tornado/netutil.py 670/head
Marc Schlaich [Tue, 22 Jan 2013 08:33:03 +0000 (09:33 +0100)] 
Update tornado/netutil.py

`socket.getadrrinfo` yields some strange output if Python is compiled with `--disable-ipv6`, resulting in a `bad family` error.
See http://bugs.python.org/issue16208

12 years agoAdd server_hostname to IOStream.connect, for SNI and cert verification
Ben Darnell [Mon, 21 Jan 2013 03:22:02 +0000 (22:22 -0500)] 
Add server_hostname to IOStream.connect, for SNI and cert verification

SSL hostname verification now happens in SSLIOStream instead of
simple_httpclient (and supporting code has moved to netutil).

12 years agoOn py32+, methods that take ssl_options now also accept SSLContext objects.
Ben Darnell [Mon, 21 Jan 2013 02:28:04 +0000 (21:28 -0500)] 
On py32+, methods that take ssl_options now also accept SSLContext objects.

This is necessary to support SNI and NPN.

12 years agoMove TCPServer to its own module.
Ben Darnell [Mon, 21 Jan 2013 00:58:35 +0000 (19:58 -0500)] 
Move TCPServer to its own module.

It's backwards-incompatible for people who used it directly, but that's
what 3.0 is for. ;)  TCPServer made it impossible to import netutil
from iostream due to cyclic imports, which seems backwards.

12 years agoMerge pull request #669 from mleonhard/master
bdarnell [Mon, 21 Jan 2013 03:32:27 +0000 (19:32 -0800)] 
Merge pull request #669 from mleonhard/master

Fix s3server.py to stop truncating downloads of images and other non-text files

12 years agoFix s3server.py to stop truncating downloads of images and other non-text files 669/head
Michael Leonhard [Mon, 21 Jan 2013 00:48:05 +0000 (16:48 -0800)] 
Fix s3server.py to stop truncating downloads of images and other non-text files

12 years agoFix typos in TwistedIOLoop that always sent both read and write events to all handlers.
Ben Darnell [Sun, 20 Jan 2013 21:05:37 +0000 (16:05 -0500)] 
Fix typos in TwistedIOLoop that always sent both read and write events to all handlers.

12 years agoMake autoreload close the IOLoop through the standard interface.
Ben Darnell [Sun, 20 Jan 2013 20:46:01 +0000 (15:46 -0500)] 
Make autoreload close the IOLoop through the standard interface.

This makes it compatible with TwistedIOLoop.

12 years agoFix some iter{items,keys,values} calls that slipped through the cracks.
Ben Darnell [Sun, 20 Jan 2013 20:40:31 +0000 (15:40 -0500)] 
Fix some iter{items,keys,values} calls that slipped through the cracks.

Add tests for the functions that were thereby revealed to have none.

12 years agoFix memory leak with gen.engine, RequestHandler.flush, and closed connections.
Ben Darnell [Sun, 20 Jan 2013 16:39:18 +0000 (11:39 -0500)] 
Fix memory leak with gen.engine, RequestHandler.flush, and closed connections.

This was unfortunately difficult to reproduce in a unit test, even though
the test program attached to bug 660 easily reproduces it.

Closes #660.

12 years agoweb_test's wsgi_safe can be a class decorator too.
Ben Darnell [Sat, 19 Jan 2013 22:14:25 +0000 (17:14 -0500)] 
web_test's wsgi_safe can be a class decorator too.

12 years agoSave the address family when an HTTPConnection is created.
Ben Darnell [Sat, 19 Jan 2013 22:05:32 +0000 (17:05 -0500)] 
Save the address family when an HTTPConnection is created.

Previously, if a non-IP socket was closed prematurely,
we would still try to reference stream.socket.family to decide
what format self.address was in, resulting in an uncaught exception.

Closes #656.

12 years agoNo more need to check for 'ssl is None' or 'multiprocessing is None'
Ben Darnell [Sat, 19 Jan 2013 19:35:28 +0000 (14:35 -0500)] 
No more  need to check for 'ssl is None' or 'multiprocessing is None'

12 years agoUse real class decorators and remove other py25-era workarounds
Ben Darnell [Sat, 19 Jan 2013 19:33:37 +0000 (14:33 -0500)] 
Use real class decorators and remove other py25-era workarounds

12 years agoUpdate autopep8 to 0.8.5 and run it.
Ben Darnell [Sat, 19 Jan 2013 18:48:02 +0000 (13:48 -0500)] 
Update autopep8 to 0.8.5 and run it.

12 years agoRemove conditional imports for py25.
Ben Darnell [Sat, 19 Jan 2013 18:38:48 +0000 (13:38 -0500)] 
Remove conditional imports for py25.

ssl, json, and multiprocessing are now ubiquitous.

Also misc pyflakes cleanups (unused imports)

12 years agoRemove the remaining traces of tornado.util.b.
Ben Darnell [Sat, 19 Jan 2013 18:29:10 +0000 (13:29 -0500)] 
Remove the remaining traces of tornado.util.b.

12 years agoReplace (most) calls to tornado.util.b() with byte literals.
Ben Darnell [Sat, 19 Jan 2013 18:16:30 +0000 (13:16 -0500)] 
Replace (most) calls to tornado.util.b() with byte literals.

sed -E -e "s/b\('([^']*)'\)/b'\1'/g" -i '' tornado/*.py
sed -E -e 's/b\("([^"]*)"\)/b"\1"/g' -i '' tornado/*.py

12 years agoDoc updates for py25 removal
Ben Darnell [Sat, 19 Jan 2013 17:58:54 +0000 (12:58 -0500)] 
Doc updates for py25 removal

12 years agoRemove py25 from travis.yml
Ben Darnell [Mon, 14 Jan 2013 03:30:22 +0000 (22:30 -0500)] 
Remove py25 from travis.yml

12 years agoRemove our custom epoll module now that we only support 2.6+.
Ben Darnell [Mon, 14 Jan 2013 02:59:21 +0000 (21:59 -0500)] 
Remove our custom epoll module now that we only support 2.6+.

12 years agoRemove more py25 testing configs
Ben Darnell [Mon, 14 Jan 2013 02:53:12 +0000 (21:53 -0500)] 
Remove more py25 testing configs

12 years agoGet all the tests passing under py3 without 2to3
Ben Darnell [Mon, 14 Jan 2013 02:31:55 +0000 (21:31 -0500)] 
Get all the tests passing under py3 without 2to3

12 years agoGet autoreload working in py3 without 2to3.
Ben Darnell [Mon, 14 Jan 2013 02:19:45 +0000 (21:19 -0500)] 
Get autoreload working in py3 without 2to3.

12 years agoCheckpoint: tests can now be imported in python 3 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.

12 years agoConvert print to a function and add future imports.
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

12 years agoChange "except Type, value" to "except Type as value".
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

12 years agoConvert all unicode literals to tornado.util.u.
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.

12 years agoAdd a simple sanity-check test for locale data.
Ben Darnell [Sun, 13 Jan 2013 23:41:26 +0000 (18:41 -0500)] 
Add a simple sanity-check test for locale data.

12 years agoAdd tornado.util.u and a fixer script to start using it.
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.

12 years agoDrop py25 from the main tox.ini
Ben Darnell [Sun, 13 Jan 2013 23:09:43 +0000 (18:09 -0500)] 
Drop py25 from the main tox.ini

12 years agoFix typo in docs
Ben Darnell [Sat, 12 Jan 2013 17:19:30 +0000 (12:19 -0500)] 
Fix typo in docs

12 years agoFix an import that's been missing since the options/log refactoring.
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.

12 years agoTest with twisted 12.3
Ben Darnell [Thu, 27 Dec 2012 14:50:53 +0000 (15:50 +0100)] 
Test with twisted 12.3

12 years agoAllow tuples for the IOStream.close exc_info argument.
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.

12 years agoMerge remote-tracking branch 'ajdavis/issue-651'
Ben Darnell [Sat, 22 Dec 2012 16:49:35 +0000 (11:49 -0500)] 
Merge remote-tracking branch 'ajdavis/issue-651'

12 years agoRelease notes for add_headers change
Ben Darnell [Fri, 21 Dec 2012 04:51:17 +0000 (23:51 -0500)] 
Release notes for add_headers change

12 years agoMerge remote-tracking branch 'jparise/append-handlers' into merge
Ben Darnell [Fri, 21 Dec 2012 04:42:38 +0000 (23:42 -0500)] 
Merge remote-tracking branch 'jparise/append-handlers' into merge

12 years agoMerge pull request #654 from davidwilemski/patch-1
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

12 years agoFix typo in releases/next.rst 654/head
David Wilemski [Sat, 15 Dec 2012 02:15:53 +0000 (21:15 -0500)] 
Fix typo in releases/next.rst

12 years agoAvoid setting IOStream.error to wrong exception, close #651 653/head
A. Jesse Jiryu Davis [Tue, 11 Dec 2012 16:45:21 +0000 (11:45 -0500)] 
Avoid setting IOStream.error to wrong exception, close #651

12 years agoReplace a couple of contextmanager functions with ExceptionStackContext.
Ben Darnell [Sun, 9 Dec 2012 00:34:16 +0000 (19:34 -0500)] 
Replace a couple of contextmanager functions with ExceptionStackContext.

12 years agoMerge remote-tracking branch 'rhettg/master' into work
Ben Darnell [Sun, 9 Dec 2012 00:21:25 +0000 (19:21 -0500)] 
Merge remote-tracking branch 'rhettg/master' into work

12 years agoRun AsyncHTTPClient callbacks on the IOLoop for a clean stack.
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.

12 years agoTwistedIOLoop now supports overriding handle_callback_exception.
Ben Darnell [Sun, 9 Dec 2012 00:17:27 +0000 (19:17 -0500)] 
TwistedIOLoop now supports overriding handle_callback_exception.

12 years agoRemove some now-unnecessary calls to functools.partial
Ben Darnell [Sat, 8 Dec 2012 23:32:17 +0000 (18:32 -0500)] 
Remove some now-unnecessary calls to functools.partial

12 years agoAdd forgotten release note.
Ben Darnell [Sat, 8 Dec 2012 23:27:12 +0000 (18:27 -0500)] 
Add forgotten release note.

12 years agoadd_callback now takes *args, **kwargs.
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.

12 years agoDon't catch and hide exceptions caused by callbacks in http client 652/head
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

12 years agocurl_httpclient: don't call remove_handler if we never added it.
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.

12 years agoCatch all exceptions, not just {OS,IO}Error in IOLoop.remove_handler.
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.

12 years agoAdd path_{kw,}args attributes to RequestHandler.
Ben Darnell [Sun, 2 Dec 2012 18:37:54 +0000 (13:37 -0500)] 
Add path_{kw,}args attributes to RequestHandler.

12 years agoReturn a Vary: Accept-Encoding header whenever gzip is enabled.
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.

12 years agoAdd tests using the Redbot library for HTTP validation and caching.
Ben Darnell [Sun, 2 Dec 2012 16:13:42 +0000 (11:13 -0500)] 
Add tests using the Redbot library for HTTP validation and caching.

12 years agoDocument the use of self.xsrf_token to set the cookie for ajax-only apps.
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.

12 years agoDocument the need to pass Connection: close when using no_keep_alive.
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.

12 years agoAdd a mock.patch-compatible wrapper for options objects.
Ben Darnell [Sat, 1 Dec 2012 20:50:40 +0000 (15:50 -0500)] 
Add a mock.patch-compatible wrapper for options objects.

12 years agoDoc cleanups.
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.

12 years agoErrorHandler no longer requires XSRF tokens.
Ben Darnell [Sun, 25 Nov 2012 17:01:14 +0000 (12:01 -0500)] 
ErrorHandler no longer requires XSRF tokens.

Closes #638.

12 years agoAdd protocol kwarg to HTTPServer constructor.
Ben Darnell [Sun, 25 Nov 2012 16:38:25 +0000 (11:38 -0500)] 
Add protocol kwarg to HTTPServer constructor.

12 years agoAccept Content-Length headers in 304 responses.
Ben Darnell [Sun, 25 Nov 2012 16:26:13 +0000 (11:26 -0500)] 
Accept Content-Length headers in 304 responses.

Closes #639.

12 years agoRemove now-redundant entries from next.rst, bump version to 2.4.post2.
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.

12 years agoMerge branch 'branch2.4'
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

12 years agoBump version to 2.4.1, update release notes. v2.4.1
Ben Darnell [Sun, 25 Nov 2012 02:22:10 +0000 (21:22 -0500)] 
Bump version to 2.4.1, update release notes.

12 years agoFix a bug with IOStream.read_until_close with a streaming_callback.
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

12 years agoFix TwitterMixin on Python 3.
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

12 years agoFix a memory leak in stack_context.
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.

12 years agoUse AsyncHTTPClient's defaults option in AsyncHTTPSTestCase.
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.

12 years agoRemove redundant logging of read errors in IOStream.
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.

12 years agoAllow default HTTPRequest attributes to be set globally via configure.
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.

12 years agoRemove outdated warnings and config instructions from simple_httpclient.
Ben Darnell [Sun, 18 Nov 2012 22:13:31 +0000 (17:13 -0500)] 
Remove outdated warnings and config instructions from simple_httpclient.

12 years agoMerge branch 'branch2.4'
Ben Darnell [Sun, 18 Nov 2012 21:24:49 +0000 (16:24 -0500)] 
Merge branch 'branch2.4'

Conflicts:
website/sphinx/database.rst

12 years agoUpgrade appengine website to python 2.7.
Ben Darnell [Sun, 18 Nov 2012 21:19:33 +0000 (16:19 -0500)] 
Upgrade appengine website to python 2.7.

12 years agoUpdate app engine id for HRD migration.
Ben Darnell [Sun, 18 Nov 2012 21:09:45 +0000 (16:09 -0500)] 
Update app engine id for HRD migration.

12 years agoDocument the deprecation of tornado.database in the 2.4 branch.
Ben Darnell [Sun, 18 Nov 2012 20:27:22 +0000 (15:27 -0500)] 
Document the deprecation of tornado.database in the 2.4 branch.

12 years ago_get_host_handlers() now returns all host matches. 628/head
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.

12 years agoMerge branch 'master' into append-handlers
Jon Parise [Sun, 18 Nov 2012 18:38:09 +0000 (10:38 -0800)] 
Merge branch 'master' into append-handlers

12 years agoMake header_callback behavior consistent across both HTTP clients.
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.

12 years agoFix If-None-Match support for StaticFileHandler.
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.

12 years agoFix a memory leak in stack_context.
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.

12 years agoEnsure that add_callback fails cleanly if called while IOLoop is closing.
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.

12 years agoFix TwitterMixin on Python 3.
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.

12 years agoMerge pull request #627 from jparise/urlspec-repr
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.