]>
git.ipfire.org Git - thirdparty/tornado.git/log
Ben Darnell [Mon, 14 Apr 2014 01:25:10 +0000 (21:25 -0400)]
Add a `streaming` option to _run_read_callback and move all calls to _consume
into that method.
Ben Darnell [Mon, 14 Apr 2014 00:52:26 +0000 (20:52 -0400)]
Fix IOStream.reading when Futures are used.
Reduce some duplication in IOStream _handle_read and _try_inline_read.
bdarnell [Sun, 13 Apr 2014 15:22:55 +0000 (11:22 -0400)]
Merge pull request #1034 from kouki-dan/work
Delete description for cookie capacity
Kouki Saito [Wed, 9 Apr 2014 10:31:27 +0000 (19:31 +0900)]
Delete description for cookie capacity
bdarnell [Wed, 9 Apr 2014 01:13:22 +0000 (21:13 -0400)]
Merge pull request #1030 from matthew-brett/fix-osx-no-compiler
Add SystemError to errors from compilation
bdarnell [Wed, 9 Apr 2014 01:12:12 +0000 (21:12 -0400)]
Merge pull request #1029 from daftshady/master
fixed broken reference link
Matthew Brett [Tue, 8 Apr 2014 18:23:21 +0000 (11:23 -0700)]
Add SystemError to errors from compilation
OSX generates a SystemError from a missing compiler; trap with other
compilation errors.
daftshady [Tue, 8 Apr 2014 17:50:36 +0000 (02:50 +0900)]
fixed broken reference link
bdarnell [Tue, 8 Apr 2014 12:04:37 +0000 (08:04 -0400)]
Fix typo
Closes #1028
Ben Darnell [Sun, 6 Apr 2014 13:17:59 +0000 (14:17 +0100)]
Add timeouts for idle keepalive connections in HTTPServer.
Add gen.with_timeout wrapper.
Ben Darnell [Sun, 6 Apr 2014 12:10:16 +0000 (13:10 +0100)]
Add a configurable header size limit to HTTPServer and simple_httpclient.
Ben Darnell [Sun, 6 Apr 2014 11:43:33 +0000 (12:43 +0100)]
Add max_bytes parameter to read_until and read_until_regex.
Ben Darnell [Sun, 6 Apr 2014 10:53:50 +0000 (11:53 +0100)]
Guard against framing errors when applications manually specify a Content-Type
that doesn't match the data they send.
Split HTTPMessageException into HTTPInputException and HTTPOutputException.
bdarnell [Mon, 31 Mar 2014 14:54:15 +0000 (10:54 -0400)]
Merge pull request #1023 from zakkie/feature/fix-testcase
put assertion outside of the exception handler
Akihiro Yamazaki [Sun, 30 Mar 2014 14:15:46 +0000 (23:15 +0900)]
correct testcases
Ben Darnell [Sat, 29 Mar 2014 17:23:32 +0000 (17:23 +0000)]
Implement flow control for streaming RequestHandlers.
Ben Darnell [Sat, 29 Mar 2014 16:22:55 +0000 (16:22 +0000)]
Add a chunk_size limitation to HTTP1Connection.
HTTPMessageDelegate will no longer receive more than chunk_size bytes
in a single call.
Ben Darnell [Sat, 29 Mar 2014 15:45:52 +0000 (15:45 +0000)]
Add a 'partial' flag to IOStream.read_bytes.
This is a more coroutine-friendly alternative to streaming_callback.
Ben Darnell [Sat, 29 Mar 2014 15:01:14 +0000 (15:01 +0000)]
Add body_producer argument to httpclient.HTTPRequest.
This allows for sending non-contiguous or asynchronously-produced
request bodies, including chunked encoding when the content-length
is not known in advance.
Ben Darnell [Sat, 29 Mar 2014 14:03:15 +0000 (14:03 +0000)]
Add option to disable the Resolver tests with an environment variable.
The resolver tests depend on external network resources; the twisted
resolver will time out when the network is unvailable instead of
returning an immediate failure like the other implementations.
Akihiro Yamazaki [Thu, 27 Mar 2014 15:27:39 +0000 (00:27 +0900)]
use "with self.assertRaises" pattern
Akihiro Yamazaki [Thu, 27 Mar 2014 00:37:29 +0000 (09:37 +0900)]
put assertion outside of the exception handler
bdarnell [Wed, 26 Mar 2014 01:56:01 +0000 (21:56 -0400)]
Merge pull request #1022 from shinriyo/master
tab to space
shinriyo [Wed, 26 Mar 2014 01:04:07 +0000 (10:04 +0900)]
tab to space
tab to space and indent fix
Ben Darnell [Mon, 24 Mar 2014 02:22:39 +0000 (22:22 -0400)]
When a streaming-body request finishes early, stop reading the request data.
delegate.data_received should no longer be called after conn.finish().
Ben Darnell [Mon, 24 Mar 2014 01:31:33 +0000 (21:31 -0400)]
Introduce streaming request body support for RequestHandler.
bdarnell [Mon, 24 Mar 2014 01:28:29 +0000 (21:28 -0400)]
Merge pull request #1020 from dhcmrlchtdj/fix-template-doc
Fix a mistake in template document.
Andrey Sumin [Sun, 23 Mar 2014 14:19:17 +0000 (18:19 +0400)]
suggest to use libcurl with async dns resolver in httpclient docs
huangxiaokai [Sun, 23 Mar 2014 10:25:25 +0000 (18:25 +0800)]
Fix a mistake in template document.
Ben Darnell [Sat, 22 Mar 2014 17:48:59 +0000 (13:48 -0400)]
Introduce a fast path for coroutines that run to completion without yielding.
This mitigates the performance impact of allowing coroutines in
RequestHandler._execute when that capability is not actually used.
bdarnell [Sat, 22 Mar 2014 17:20:06 +0000 (13:20 -0400)]
Merge pull request #1019 from minrk/clear_instance
add IOLoop.clear_instance
MinRK [Fri, 21 Mar 2014 17:59:25 +0000 (10:59 -0700)]
add IOLoop.clear_instance
like clear_current, but for the global IOLoop instance
Ben Darnell [Mon, 17 Mar 2014 04:25:10 +0000 (00:25 -0400)]
Simplify RequestHandler._execute by making it a coroutine.
Ben Darnell [Mon, 17 Mar 2014 02:17:38 +0000 (22:17 -0400)]
Stop overriding _execute in WebSocketHandler; use get() instead.
Revise HTTP1Connection detach protocol.
As a side effect, this now decodes the arguments to open() in the same
way as the arguments to get().
Ben Darnell [Sun, 16 Mar 2014 22:43:49 +0000 (18:43 -0400)]
Add chunk and callback arguments to write_headers.
This restores an optimization that allows small responses to be written out
in the same system call as the headers.
Ben Darnell [Sun, 16 Mar 2014 16:57:54 +0000 (12:57 -0400)]
Make Application an HTTPServerConnectionDelegate.
HTTPServer now forwards delegate events to its request callback
if it implements this interface. This allows the application to be
in the loop as the request is being read.
Ben Darnell [Sun, 16 Mar 2014 04:21:51 +0000 (00:21 -0400)]
HTTPServer: Support requests that are received in multiple chunks.
Ben Darnell [Sun, 16 Mar 2014 03:42:16 +0000 (23:42 -0400)]
Allow gzip to be used with WSGIApplication.
Now that transfer encodings have been moved to http1connection,
the content-level output transforms can be used with wsgi.
Ben Darnell [Sun, 16 Mar 2014 03:39:59 +0000 (23:39 -0400)]
Move chunked-response generation into http1connection.
Ben Darnell [Sun, 16 Mar 2014 03:00:13 +0000 (23:00 -0400)]
Pass start_line to headers_received as a tuple instead of a string.
Ben Darnell [Sun, 16 Mar 2014 02:30:23 +0000 (22:30 -0400)]
Unify WSGI support with the HTTPConnection abstraction.
Deprecate WSGIApplication in favor of a WSGIAdapter that can wrap
an ordinary Application.
Remove the wsgi module's separate HTTPRequest variant and tornado.web's
wsgi special cases.
Ben Darnell [Sun, 16 Mar 2014 00:11:02 +0000 (20:11 -0400)]
Move outgoing HTTP header generation to HTTP1Connection.
Ben Darnell [Sat, 15 Mar 2014 04:50:25 +0000 (00:50 -0400)]
Update links for comments about json list output.
The vulnerability in the older link affects only ancient browsers,
but there are other issues that are more recent.
Fixes #1009.
Ben Darnell [Sat, 15 Mar 2014 04:45:09 +0000 (00:45 -0400)]
Refactor unittest/unittest2 imports to fix issues with unittest2 on py3.
Never use unittest2 on python 3 (it appears to not interoperate with
the standard unittest module). On python 2, use the same logic in
tornado.testing and tornado.test.util to select an implementation.
Fixes #1005.
Ben Darnell [Thu, 13 Mar 2014 14:15:41 +0000 (10:15 -0400)]
Improve simple_httpclient ssl configuration to pass howsmyssl.com.
Remove insecure cipher suites and disable TLS compression. The option
to disable compression was only added in Python 3.3 so we do not
pass the test on older versions, but we come as close as possible with
the APIs available.
Closes #1014.
Ben Darnell [Thu, 13 Mar 2014 14:04:36 +0000 (10:04 -0400)]
Fix command-line tornado.httpclient on python 3.
bdarnell [Tue, 11 Mar 2014 04:09:28 +0000 (00:09 -0400)]
Merge pull request #1012 from dlutxx/br310
remove a redundant assignment in read_until_close.
bdarnell [Tue, 11 Mar 2014 02:32:17 +0000 (22:32 -0400)]
Merge pull request #1008 from yaccz/fix/1007
twisted can be installed without twisted.names fixes #1007
xuxiang [Mon, 10 Mar 2014 10:22:39 +0000 (18:22 +0800)]
remove useless code of BaseIOStream
yac [Sat, 8 Mar 2014 00:20:09 +0000 (01:20 +0100)]
twisted can be installed without twisted.names fixes #1007
INADA Naoki [Tue, 4 Mar 2014 06:54:42 +0000 (15:54 +0900)]
Remove `write_buffer_size` read-only property.
bdarnell [Mon, 3 Mar 2014 15:59:18 +0000 (10:59 -0500)]
Merge pull request #996 from cardoe/exception-fix
use errno attr instead of index into args for errno
INADA Naoki [Mon, 3 Mar 2014 05:06:37 +0000 (14:06 +0900)]
Add max_write_buffer_size to iostream.
INADA Naoki [Mon, 3 Mar 2014 04:58:09 +0000 (13:58 +0900)]
Add iostream.write_buffer_size property.
Ben Darnell [Mon, 3 Mar 2014 04:10:48 +0000 (23:10 -0500)]
Add a test for HTTPServer's recently-acquired support for chunked requests.
Ben Darnell [Mon, 3 Mar 2014 03:42:11 +0000 (22:42 -0500)]
Add support for gzipped request bodies to HTTPServer.
Ben Darnell [Mon, 3 Mar 2014 02:26:15 +0000 (21:26 -0500)]
Move gzip decompression from simple_httpclient to http1connection.
Ben Darnell [Mon, 3 Mar 2014 02:15:22 +0000 (21:15 -0500)]
Some cleanup and renamings.
Replaced some server-specific names and cut down on overuse of "process"
as a generic verb.
Ben Darnell [Sun, 2 Mar 2014 20:42:19 +0000 (15:42 -0500)]
Use HTTP1Connection in SimpleAsyncHTTPClient.
This incidentally adds support for chunked request bodies on the server side.
Ben Darnell [Sun, 2 Mar 2014 16:06:06 +0000 (11:06 -0500)]
Exclude another timing-sensitive test from the travis build.
bdarnell [Sun, 2 Mar 2014 16:03:29 +0000 (11:03 -0500)]
Merge pull request #999 from mengzhuo/master
update Template Loader with 'with' statement
Meng Zhuo [Sun, 2 Mar 2014 14:20:49 +0000 (22:20 +0800)]
update Template Loader with 'with' statment
Doug Goldstein [Fri, 28 Feb 2014 14:48:26 +0000 (08:48 -0600)]
define and use errno_from_exception abstraction
If an OSError or IOError are instantiated without an errno value, e.g.
e = OSError(). The existing code would give an IndexError: tuple index
out of range. However there have been cases that the errno attribute
wasn't populated so instead of switching to it this introduces a helper
function to ensure we get the errno value through whatever means
possible.
Ben Darnell [Mon, 24 Feb 2014 05:53:53 +0000 (00:53 -0500)]
Move HTTPServerRequest-specific logic from http1connection to httpserver.
Ben Darnell [Sun, 23 Feb 2014 21:39:29 +0000 (16:39 -0500)]
Refactor HTTP1Connection to use coroutines.
Ben Darnell [Sun, 23 Feb 2014 20:57:18 +0000 (15:57 -0500)]
Fix doc references to HTTPRequest.
Ben Darnell [Sun, 23 Feb 2014 20:30:47 +0000 (15:30 -0500)]
Fix close_callback handling when the Future read interface is used.
Ben Darnell [Sun, 23 Feb 2014 17:28:02 +0000 (12:28 -0500)]
Move some logic from HTTPRequest to HTTP1Connection.
This removes some imports from httputil that are not allowed on app engine.
Ben Darnell [Sun, 23 Feb 2014 16:59:56 +0000 (11:59 -0500)]
HTTP refactoring part 1: move shareable parts out of httpserver.py.
tornado.httpserver.HTTPRequest -> tornado.httputil.HTTPServerRequest
tornado.httpsrever.HTTPConnection -> tornado.http1connection.HTTP1Connection
Ben Darnell [Sun, 23 Feb 2014 17:49:11 +0000 (12:49 -0500)]
Fix bit-rotted app engine tests.
sys.argv is no longer empty in dev_appserver.
Ben Darnell [Sun, 23 Feb 2014 04:25:51 +0000 (23:25 -0500)]
Add a warning label to WSGIContainer.
Ben Darnell [Sat, 22 Feb 2014 01:42:10 +0000 (20:42 -0500)]
Disable port-allocation test on mac to avoid annoying firewall prompts.
bdarnell [Sat, 22 Feb 2014 01:27:30 +0000 (20:27 -0500)]
Merge pull request #977 from schlamar/fix-port-allocation
Fixed automatic port allocation in bind_sockets.
schlamar [Thu, 23 Jan 2014 11:23:53 +0000 (12:23 +0100)]
Fixed automatic port allocation in bind_sockets.
bind_sockets should use the same port on IPv4 and IPv6 if port=None.
Ben Darnell [Wed, 19 Feb 2014 04:52:58 +0000 (23:52 -0500)]
Catch up on next-release notes.
Ben Darnell [Wed, 19 Feb 2014 04:15:19 +0000 (23:15 -0500)]
Document the fact that tornado.options configures logging by default.
Add tests and comments for how to disable this configuration.
Make it slightly easier to disable by making the command line
flag case-insensitive and allowing `None` instead of the string "none"
when setting the flag in code.
Closes #952.
Ben Darnell [Tue, 18 Feb 2014 05:08:09 +0000 (00:08 -0500)]
Add python 3.4 tests to tox
Ben Darnell [Mon, 17 Feb 2014 23:46:40 +0000 (18:46 -0500)]
Add support for the websocket close status code and reason fields.
Closes #890.
Ben Darnell [Mon, 17 Feb 2014 04:59:17 +0000 (23:59 -0500)]
Compress all text/* content types, not just a whitelist.
Closes #982.
Ben Darnell [Mon, 17 Feb 2014 04:41:15 +0000 (23:41 -0500)]
Add a py26-trollius test case and fix a bug with timedelta on 2.6.
Ben Darnell [Mon, 17 Feb 2014 04:06:18 +0000 (23:06 -0500)]
Add a fast path to stack_context when there are no active contexts.
This case is increasingly common now that coroutines are decoupled
from stack contexts.
Ben Darnell [Mon, 17 Feb 2014 03:05:55 +0000 (22:05 -0500)]
Remove _iostream_return_future from write and connect as well.
Ben Darnell [Mon, 17 Feb 2014 02:39:19 +0000 (21:39 -0500)]
Bring Future support for IOStream read operations into IOStream itself.
This speeds things up in comparison to the _iostream_return_future
decorator by removing unnecessary abstraction and especially by allowing
Futures to bypass some of the hoops IOStream jumps through to ensure a
clean slate for its callbacks.
Ben Darnell [Mon, 17 Feb 2014 01:34:02 +0000 (20:34 -0500)]
Microoptimizations for coroutines
* Lazily initialize data structures for YieldPoints
* Get rid of Runner.exc_info
Ben Darnell [Mon, 17 Feb 2014 01:29:37 +0000 (20:29 -0500)]
Fold TracebackFuture into Future.
Since it is no longer possible for TracebackFuture to modify
concurrent.futures.Future instead, there is no need for separate
classes. Removing the subclass speeds things up a bit by removing
a level of indirection.
Also microoptimized a few methods of Future.
Ben Darnell [Sun, 26 Jan 2014 18:55:57 +0000 (13:55 -0500)]
gen: Defer creation of stack context until a YieldPoint is reached.
The runner alone can catch all necessary exceptions as long as Futures
are used; stack contexts are only needed for YieldPoints (especially
Callback/Wait; Task could be changed to use a local-only stack
context).
This is slightly backwards incompatible for code that assumes the existence
of a stack context without yielding anything.
Ben Darnell [Mon, 27 Jan 2014 00:11:51 +0000 (19:11 -0500)]
Detect stack context inconsistency in gen.Runner.
The existing checks in StackContext.__exit__ are run after the damage has
been done and may raise exceptions in the wrong place; gen.Runner
is a more reliable place to detect this problem.
Throwing the exception into the generator provides a better stack trace
for the problem and also simplifies some of the complexity of testing for
this feature.
Ben Darnell [Sun, 26 Jan 2014 20:25:10 +0000 (15:25 -0500)]
gen.Runner now communicates back to the decorator via a Future instead of a callback.
This allows for failures to be reported without relying on stack_context.
Ben Darnell [Sun, 26 Jan 2014 20:16:36 +0000 (15:16 -0500)]
Consolidate implementations of gen.engine and gen.coroutine.
The shared implementation is nearly identical to the old gen.coroutine,
with a small tweak for the callback argument.
Ben Darnell [Mon, 20 Jan 2014 22:57:57 +0000 (17:57 -0500)]
Pivot tornado.gen to use Futures natively.
This improves performance of applications using @coroutine and Futures,
at the expense of some performance degradation for the older YieldPoint
interfaces.
Ben Darnell [Sun, 26 Jan 2014 03:18:08 +0000 (22:18 -0500)]
tornado.concurrent.Future is now always thread-unsafe.
This improves performance and provides more consistent semantics
(independent of the presence or absence of the concurrent.futures
package).
The parts of Tornado that accept Futures will accept both Tornado's
thread-unsafe Futures and the thread-safe concurrent.futures.Future.
Ben Darnell [Mon, 20 Jan 2014 22:23:20 +0000 (17:23 -0500)]
Add a benchmark for coroutine processing.
Ben Darnell [Sat, 25 Jan 2014 23:15:55 +0000 (18:15 -0500)]
Improve the stack traces given for timeouts with @gen_test.
Ben Darnell [Sat, 25 Jan 2014 22:16:17 +0000 (17:16 -0500)]
Raise an error if IOLoop.start() is called while it is already running.
Ben Darnell [Sat, 25 Jan 2014 18:43:27 +0000 (13:43 -0500)]
Add support in AsyncTestCase for detecting undecorated generators.
Fix a test that was not being run because of this issue.
bdarnell [Sat, 25 Jan 2014 01:59:44 +0000 (17:59 -0800)]
Merge pull request #979 from mike4999/simple_fix
Fix for RequestHandler.write to check for NoneType in argument
Michael Atambo [Fri, 24 Jan 2014 11:04:00 +0000 (14:04 +0300)]
This is a fix to check the argument to RequestHandler.write()
is one of the accepted types: dict, bytes or unicode and raise a TypeError otherwise
Ben Darnell [Mon, 20 Jan 2014 03:59:37 +0000 (22:59 -0500)]
Return a Future from IOStream methods.
This makes it easier to use IOStreams directly from coroutines.
Closes #953.
bdarnell [Mon, 20 Jan 2014 16:58:09 +0000 (08:58 -0800)]
Merge pull request #976 from daftshady/master
removed unnecessary else statements
Ben Darnell [Mon, 20 Jan 2014 16:57:16 +0000 (11:57 -0500)]
Pin sphinx version to 1.2 in tests.
Sphinx 1.2.1 has a bug that breaks our build:
https://bitbucket.org/birkenfeld/sphinx/pull-request/212/fix-an-exception-introduced-by/diff