]>
git.ipfire.org Git - thirdparty/tornado.git/log
Carl Sverre [Thu, 12 Feb 2015 04:00:02 +0000 (20:00 -0800)]
Coroutine exception __context__ leak in python 3
In Python 3 every exception has an auto-attached __context__ exception if it was
raised while an existing exception was being handled. This is often a very
useful property and allows users to see the underlying cause of many problems.
However, when dealing with async code via coroutines this feature can suddenly
become a pretty big issue. Namely, if you generator.throw back into a coroutine
to raise an exception in the correct scope, and that coroutine raises an
exception at a later time you can have nested exceptions which shouldn't
logically be nested.
This patch resolves this issue in the coroutine code by moving the gen.throw
outside of the exception handler. By doing this the user-code scope is able to
later raise exceptions without worrying about inheriting prior exception
context.
Ben Darnell [Wed, 11 Feb 2015 03:23:30 +0000 (22:23 -0500)]
Merge pull request #1290 from nosyjoe/branch4.0-mrbeam
Avoid busy waiting in ioloop when system time is skipped forward
Philipp Engel [Tue, 16 Dec 2014 14:43:06 +0000 (15:43 +0100)]
modified method _schedule_next of PeriodicCallback to handle sudden changes of the system time differently:
* calculating next timeout value directly while advancing by a multiple of callback_time
* when the system time changes, jumps into the future make the _schedule_next method do a busy wait.
* on slow machines (RPi), jumps of a few months into the future can block the loop for a few minutes
=> added a check for big differences in current system time and the current value of the next scheduled timeout
On a first boot of an older RPi image, tornado sometime starts before the date&time were updated through NTP, hence blocking the ioloop for several minutes.
Ben Darnell [Mon, 9 Feb 2015 05:22:28 +0000 (00:22 -0500)]
Enable sphinx doctests on travis-ci
Ben Darnell [Mon, 9 Feb 2015 05:19:47 +0000 (00:19 -0500)]
Make many doc code blocks into sphinx doctests.
Ben Darnell [Sun, 8 Feb 2015 21:09:00 +0000 (16:09 -0500)]
Enable the sphinx doctest extension.
Ben Darnell [Sun, 8 Feb 2015 20:02:49 +0000 (15:02 -0500)]
More flake8 cleanup.
The only remaining flake8 errors are for line length.
Ben Darnell [Sun, 8 Feb 2015 19:40:04 +0000 (14:40 -0500)]
Run autopep8
Ben Darnell [Sun, 8 Feb 2015 18:55:02 +0000 (13:55 -0500)]
Update requirement versions; add flake8 and twine
Ben Darnell [Sun, 8 Feb 2015 18:26:56 +0000 (13:26 -0500)]
Allow unicode strings in import_object in python 2.
Fixes #1316.
Ben Darnell [Sat, 7 Feb 2015 18:19:37 +0000 (13:19 -0500)]
Merge pull request #1327 from josephok/master
some modifications in demos/benchmark so it can run both in py2 and py3
Ben Darnell [Sat, 7 Feb 2015 18:18:08 +0000 (13:18 -0500)]
Merge pull request #1325 from ccampbell/master
Skip falsy values for some SimpleCookie flags
Ben Darnell [Sat, 7 Feb 2015 18:15:19 +0000 (13:15 -0500)]
Bump master branch version number
Ben Darnell [Sat, 7 Feb 2015 17:47:11 +0000 (12:47 -0500)]
Set version number to 4.1
Ben Darnell [Sat, 7 Feb 2015 17:46:33 +0000 (12:46 -0500)]
Finalize 4.1 release notes.
Joseph [Fri, 6 Feb 2015 02:29:13 +0000 (10:29 +0800)]
some modifications in demos/benchmark so it can run both in py2 and py3
Craig Campbell [Tue, 3 Feb 2015 21:05:48 +0000 (16:05 -0500)]
Add unit tests for new cookie behavior
Craig Campbell [Tue, 3 Feb 2015 21:05:01 +0000 (16:05 -0500)]
Skip falsy values for SimpleCookie flags
Fixes #1324
Ben Darnell [Sun, 1 Feb 2015 19:27:54 +0000 (14:27 -0500)]
Set version number to 4.1b2
Ben Darnell [Sun, 1 Feb 2015 19:17:25 +0000 (14:17 -0500)]
Update docs for UIModule.
A. Jesse Jiryu Davis [Fri, 30 Jan 2015 20:08:08 +0000 (15:08 -0500)]
Use self.io_loop in with_timeout tests.
Ben Darnell [Sun, 1 Feb 2015 15:52:30 +0000 (10:52 -0500)]
Silence a warning on freebsd.
This was already changed for other platforms but the error behaves
a bit differently on freebsd.
Ben Darnell [Sun, 1 Feb 2015 04:00:20 +0000 (23:00 -0500)]
Merge branch 'master' of github.com:tornadoweb/tornado
Ben Darnell [Sun, 1 Feb 2015 03:52:07 +0000 (22:52 -0500)]
Disable twisted_web tests on python 3.
The twisted.web modules are importable as of Twisted 15.0.0,
but appear to still have internal str/bytes issues.
Ben Darnell [Fri, 30 Jan 2015 17:15:17 +0000 (12:15 -0500)]
Merge pull request #1319 from hfaran/patch-1
Add syntax highlighting to Hello World example
Ben Darnell [Fri, 30 Jan 2015 16:49:34 +0000 (11:49 -0500)]
Fix a DeprecationWarning in twisted_test with Twisted 15.0.
Hamza Faran [Fri, 30 Jan 2015 10:47:16 +0000 (02:47 -0800)]
Add syntax highlighting to Hello World example
Ben Darnell [Sun, 25 Jan 2015 15:44:11 +0000 (10:44 -0500)]
Merge branch 'stable'
Ben Darnell [Sun, 25 Jan 2015 15:35:59 +0000 (10:35 -0500)]
Merge pull request #1312 from FreeAquar/patch-1
a wrong describle
FreeAquar [Sun, 25 Jan 2015 09:01:47 +0000 (17:01 +0800)]
a wrong describle
Ben Darnell [Sun, 25 Jan 2015 00:50:04 +0000 (19:50 -0500)]
Replace most testing uses of 'localhost' with '127.0.0.1'.
This may work around a suspected ipv6-related issue on travis.
Ben Darnell [Sun, 25 Jan 2015 00:21:34 +0000 (19:21 -0500)]
Include the ability to yield asyncio and twisted objects in highlights
Ben Darnell [Sun, 25 Jan 2015 00:12:08 +0000 (19:12 -0500)]
Set version number to 4.1b1
Ben Darnell [Sat, 24 Jan 2015 23:38:18 +0000 (18:38 -0500)]
Fix doc coverage for WaitIterator.
Ben Darnell [Sat, 24 Jan 2015 23:35:18 +0000 (18:35 -0500)]
Clean up release notes
Ben Darnell [Sat, 24 Jan 2015 23:18:09 +0000 (18:18 -0500)]
Update release notes and docs.
Ben Darnell [Sat, 24 Jan 2015 22:29:03 +0000 (17:29 -0500)]
Merge remote-tracking branch 'Caligatio/ws_message_callback'
Conflicts:
tornado/websocket.py
Ben Darnell [Sat, 24 Jan 2015 22:14:20 +0000 (17:14 -0500)]
Give curl_httpclient its own logger for its verbose debug output.
This makes it easier to filter it separately.
This commit is an updated recreation of
https://github.com/SuminAndrew/tornado/commit/
88809314e853fb69610cf44095612e78b0882c3e
to account for code movement.
Closes #1093.
Ben Darnell [Sat, 24 Jan 2015 22:06:34 +0000 (17:06 -0500)]
Merge pull request #1286 from vovanec/patch-1
Added support for custom web socket protocols.
Ben Darnell [Mon, 19 Jan 2015 20:38:59 +0000 (15:38 -0500)]
Introduce gen.sleep().
Closes #1146.
Ben Darnell [Mon, 19 Jan 2015 18:50:12 +0000 (13:50 -0500)]
Singledispatch and twisted don't work well together on py26.
Only install singledispatch on py27.
Ben Darnell [Mon, 19 Jan 2015 17:34:19 +0000 (12:34 -0500)]
Document convert_yielded.
Ben Darnell [Mon, 19 Jan 2015 16:43:52 +0000 (11:43 -0500)]
Add bidirectional asyncio future conversion.
Ben Darnell [Mon, 19 Jan 2015 16:20:45 +0000 (11:20 -0500)]
Add a convert_yield adapter for twisted Deferreds.
Ben Darnell [Mon, 19 Jan 2015 15:20:33 +0000 (10:20 -0500)]
Document the AsyncIOLoop.asyncio_loop attribute for public use.
Ben Darnell [Mon, 19 Jan 2015 04:54:41 +0000 (23:54 -0500)]
Use functools.singledispatch for convert_yielded when available.
Register a converter for asyncio.Future and add tests.
Ben Darnell [Mon, 19 Jan 2015 03:54:34 +0000 (22:54 -0500)]
Refactor coroutine yield handling.
Extract a convert_yielded function that can be extended with other types.
Ben Darnell [Mon, 19 Jan 2015 01:40:09 +0000 (20:40 -0500)]
Call the WebSocketHandler.on_close method regardless of which side closed.
Closes #1173.
Ben Darnell [Sun, 18 Jan 2015 22:06:53 +0000 (17:06 -0500)]
Convert WaitIterator to use while-like iteration instead of for-like.
Make current_future and current_index attributes instead of methods.
Restructure the internals to avoid quadratic performance.
Ben Darnell [Sun, 18 Jan 2015 21:33:11 +0000 (16:33 -0500)]
Fix test; cleanup whitespace.
Ben Darnell [Sun, 18 Jan 2015 21:28:46 +0000 (16:28 -0500)]
Merge remote-tracking branch 'jordanbettis/feature-waitany' into wait-any
Ben Darnell [Sun, 18 Jan 2015 21:20:55 +0000 (16:20 -0500)]
Work around an occasional EPROTOTYPE error on OSX.
Ben Darnell [Sun, 18 Jan 2015 18:33:45 +0000 (13:33 -0500)]
Fix broken link in docs.
Ben Darnell [Sun, 18 Jan 2015 18:13:41 +0000 (13:13 -0500)]
A new IOLoop is automatically "current" if there isn't already one.
IOLoop keyword arguments throughout the library are now deprecated
in favor of IOLoop.current(). This is because the gen module
uses IOLoop.current() with no opportunity to pass in a different
instance, making it impossible in some cases to use a non-current
IOLoop with AsyncHTTPClient.
Closes #1252.
Ben Darnell [Sun, 18 Jan 2015 17:17:35 +0000 (12:17 -0500)]
Update next-release notes.
Ben Darnell [Sun, 18 Jan 2015 17:07:54 +0000 (12:07 -0500)]
Add a blanket try/except when parsing multipart form bodies.
This mirrors the behavior for form-urlencoded bodies, as well as the
handling of selected errors in parse_multipart_form_data.
Closes #1267.
Ben Darnell [Sun, 18 Jan 2015 16:35:20 +0000 (11:35 -0500)]
Document PeriodicCallback.is_running.
Ben Darnell [Sun, 18 Jan 2015 16:34:26 +0000 (11:34 -0500)]
Merge pull request #1303 from ami-GS/external
add is_running to get PeriodicCallback state
Ben Darnell [Sun, 18 Jan 2015 16:31:26 +0000 (11:31 -0500)]
Prevent a double-timeout in TCPClient.
This fixes a non-deterministic failure in the tests.
Also fix another less-common failure in test.util.refusing_port.
Daiki Aminaka [Sun, 18 Jan 2015 08:58:54 +0000 (17:58 +0900)]
add is_running to get callback state
Ben Darnell [Sat, 17 Jan 2015 22:38:35 +0000 (17:38 -0500)]
Allow SSLError or socket.error in this test.
Ben Darnell [Sat, 17 Jan 2015 22:25:15 +0000 (17:25 -0500)]
Fix LogCounter on py26
Ben Darnell [Sat, 17 Jan 2015 21:43:37 +0000 (16:43 -0500)]
Fix another unexamined Future
Ben Darnell [Sat, 17 Jan 2015 21:39:29 +0000 (16:39 -0500)]
Merge branch 'log_future'
Ben Darnell [Sat, 17 Jan 2015 21:37:49 +0000 (16:37 -0500)]
Consider the tests failed if they log any non-filtered warnings or errors.
Ben Darnell [Sat, 17 Jan 2015 20:26:03 +0000 (15:26 -0500)]
Log more uncaught exceptions instead of suppressing them.
Add more docs about Future exception logging.
Ben Darnell [Fri, 16 Jan 2015 03:53:08 +0000 (22:53 -0500)]
travis-ci: don't install pycurl on pypy3.
Ben Darnell [Fri, 16 Jan 2015 03:37:03 +0000 (22:37 -0500)]
Merge pull request #1299 from ysimonson/feature/ignore-xsrf-errors
Handle bad xsrf tokens more gracefully
Ben Darnell [Wed, 14 Jan 2015 13:59:21 +0000 (08:59 -0500)]
Merge commit 'bbd1f9'
Conflicts:
.travis.yml
vovanec [Mon, 12 Jan 2015 16:06:44 +0000 (08:06 -0800)]
Addressed comments from Ben
Addressed comments from Ben. Added get_websocket_protocol() to WebSocketClientConnection class as well.
Yusuf Simonson [Mon, 12 Jan 2015 15:45:52 +0000 (10:45 -0500)]
More aggressive capturing of xsrf cookie errors
Ben Darnell [Mon, 12 Jan 2015 03:22:16 +0000 (22:22 -0500)]
Make Application.start_request match HTTPServerConnectionDelegate.start_request.
This was always intended, but unfortunately the change to HTTPServer
is backwards-incompatible.
Ben Darnell [Mon, 12 Jan 2015 01:15:36 +0000 (20:15 -0500)]
Merge pull request #1270 from djvis/master
Use server_hostname parameter in call to ssl_wrap_socket
Ben Darnell [Sun, 11 Jan 2015 23:58:53 +0000 (18:58 -0500)]
Catch up on next-release notes.
Ben Darnell [Sun, 11 Jan 2015 18:50:58 +0000 (13:50 -0500)]
Correct handling of HTTP version numbers.
Per RFC 7230 section 2.6, we always output HTTP/1.1 even if the
request was HTTP/1.0 (and we accept any 1.x version).
Ben Darnell [Sun, 11 Jan 2015 18:29:57 +0000 (13:29 -0500)]
Fix regression in support for both CRLF and bare LF in headers.
Closes #1297.
Ben Darnell [Sun, 11 Jan 2015 18:00:00 +0000 (13:00 -0500)]
Fix httputil_test on python 3.2.
Ben Darnell [Sun, 11 Jan 2015 17:40:51 +0000 (12:40 -0500)]
Fix header parsing with unicode newline-like characters.
We were using python's unicode.splitlines(), which recognizes
more characters than just CRLF and could cause problems if those
characters appeared in header values.
Fixes #1291.
Ben Darnell [Sun, 11 Jan 2015 16:21:42 +0000 (11:21 -0500)]
Refactor connection-closed tests.
On CI servers, port numbers get reused frequently, so a closed
port cannot be relied upon to refuse connections for long.
We now use an open client-side socket's ephemeral port,
which will always refuse connections and cannot be reused
for as log as the socket is open.
Ben Darnell [Sun, 11 Jan 2015 15:29:36 +0000 (10:29 -0500)]
Merge pull request #1296 from asvetlov/master
Mention in Sec-WebSocket-Version all versions supported by tornado
Ben Darnell [Sun, 11 Jan 2015 15:27:07 +0000 (10:27 -0500)]
Merge pull request #1294 from lmas/master
Fixed TCPServer not setting the correct read_chunk_size.
Ben Darnell [Sat, 10 Jan 2015 16:11:30 +0000 (11:11 -0500)]
Merge pull request #1285 from lwzm/master
Ensure that HTTPServerRequest.body is a byte string
Ben Darnell [Sat, 10 Jan 2015 15:47:19 +0000 (10:47 -0500)]
Clarify docs: `return` in generator is new in 3.3.
Ben Darnell [Sat, 10 Jan 2015 15:08:46 +0000 (10:08 -0500)]
Merge pull request #1300 from arihantagarwal/arihant
Changed 'return' to 'raise gen.Return()' to fix Issue #1292
Arihant Agarwal [Sat, 10 Jan 2015 06:02:24 +0000 (11:32 +0530)]
Changed 'return' to 'raise gen.Return()' to fix Issue #1292, explanation added.
Yusuf Simonson [Wed, 7 Jan 2015 16:01:55 +0000 (11:01 -0500)]
Handle bad xsrf tokens more gracefully
Andrew Svetlov [Mon, 5 Jan 2015 19:15:40 +0000 (21:15 +0200)]
Mention in Sec-WebSocket-Version all versions supported by tornado
As RFC 6455 recommends for asnwer for unsopported protocol.
A. Svensson [Sun, 4 Jan 2015 10:33:17 +0000 (11:33 +0100)]
Fixed TCPServer not setting the correct read_chunk_size.
vovanec [Wed, 24 Dec 2014 19:43:00 +0000 (11:43 -0800)]
Added support for custom web socket protocols.
Added support for custom web socket protocols.
To add custom protocol implementation user should override get_websocket_protocol_subclass() method in WebSocketHandler subclass.
felloak [Tue, 23 Dec 2014 08:28:36 +0000 (16:28 +0800)]
Ensure that HTTPServerRequest.body is a byte string
HTTPServerRequest.body should be bytes but it is an empty string that
occurs in Python3 when pass no body to HTTPServerRequest.
Daniel James Visentin [Tue, 23 Dec 2014 01:34:04 +0000 (12:34 +1100)]
Skip test if check_hostname functionality not available
Daniel James Visentin [Tue, 23 Dec 2014 01:09:48 +0000 (12:09 +1100)]
Add test to ensure stream start_tls calls use the server_hostname parameter
Ben Darnell [Thu, 18 Dec 2014 15:16:18 +0000 (10:16 -0500)]
Merge pull request #1281 from nordaux/master
Fixed error that the web.asynchronous doesn't complete python3 concurrent.Futures
Andrew Glinskiy [Thu, 18 Dec 2014 14:38:20 +0000 (16:38 +0200)]
Fixed error that the web.asynchronous doesn't complete python3 concurrent.Futures
Ben Darnell [Wed, 17 Dec 2014 16:09:16 +0000 (11:09 -0500)]
Merge pull request #1279 from chrisseto/patch-1
Fix typo in `stream_request_body`
Chris Seto [Wed, 17 Dec 2014 15:55:05 +0000 (10:55 -0500)]
Fix typo in `stream_request_body`
Ben Darnell [Tue, 16 Dec 2014 02:22:52 +0000 (21:22 -0500)]
Merge pull request #1261 from lilydjwg/fix-ipv6-host
fix matching an IPv6 address as host
依云 [Sun, 14 Dec 2014 10:12:26 +0000 (18:12 +0800)]
move code to seperate function 'split_host_and_port'
依云 [Sun, 14 Dec 2014 10:01:26 +0000 (18:01 +0800)]
remove executable permission from tornado.web
依云 [Sun, 14 Dec 2014 10:00:08 +0000 (18:00 +0800)]
Merge branch 'master' into fix-ipv6-host