]>
git.ipfire.org Git - thirdparty/tornado.git/log
Ben Darnell [Thu, 21 Feb 2013 03:03:28 +0000 (22:03 -0500)]
Clean up more timeouts when shutting down HTTP clients or finishing tests.
bdarnell [Thu, 21 Feb 2013 02:51:54 +0000 (18:51 -0800)]
Merge pull request #684 from vkosh/master
Remove timeout callback on errors during connect or request.
Vladlen Y. Koshelev [Tue, 19 Feb 2013 22:27:11 +0000 (02:27 +0400)]
Remove timeout callback on errors during connect or request.
Ben Darnell [Tue, 19 Feb 2013 04:20:16 +0000 (23:20 -0500)]
Test the @return_future return value assertion and move it again.
Ben Darnell [Tue, 19 Feb 2013 04:03:19 +0000 (23:03 -0500)]
Exceptions in a @return_future function go to both the caller and the Future.
Add a test for the UnboundLocal error seen here and remove the
no-longer-needed initialization. I'm not 100% sure we want to do both
(due to the risk of callback-doubling), but the old way where the caller
saw one error and the future resolved to a different error was clearly
incorrect, and leaving the future unresolved doesn't seem right either.
bdarnell [Tue, 19 Feb 2013 00:23:36 +0000 (16:23 -0800)]
Merge pull request #683 from vkosh/master
Unshadow list built-in in httputil.HTTPHeaders.get_all()
Vladlen Y. Koshelev [Mon, 18 Feb 2013 21:16:54 +0000 (01:16 +0400)]
Fix docstrings quoting.
Vladlen Y. Koshelev [Mon, 18 Feb 2013 20:39:17 +0000 (00:39 +0400)]
Rename local var so it doesn't shadow the "list" built-in.
Ben Darnell [Mon, 18 Feb 2013 15:46:48 +0000 (10:46 -0500)]
Add pypi classifiers so we'll show up on python3-compatible lists.
Ben Darnell [Mon, 18 Feb 2013 05:28:05 +0000 (00:28 -0500)]
Ensure the result variable is initialized even when an exception is handled.
Ben Darnell [Mon, 18 Feb 2013 04:57:38 +0000 (23:57 -0500)]
Make Resolver's callback argument optional when the Future result is used.
Ben Darnell [Mon, 18 Feb 2013 04:12:15 +0000 (23:12 -0500)]
Make Resolver Configurable and test with a threaded resolver.
Ben Darnell [Mon, 18 Feb 2013 03:46:52 +0000 (22:46 -0500)]
Add a future-based interface to AsyncHTTPClient.fetch.
Ben Darnell [Mon, 18 Feb 2013 00:16:14 +0000 (19:16 -0500)]
simple_httpclient._HTTPConnection now takes a resolver directly.
This makes the "client" parameter optional for websocket connections.
Ben Darnell [Mon, 18 Feb 2013 00:08:10 +0000 (19:08 -0500)]
Make simple_httpclient's hostname_mapping a Resolver wrapper.
Ben Darnell [Sun, 17 Feb 2013 23:40:51 +0000 (18:40 -0500)]
Add a test for simple_httpclient's hostname_mapping.
Ben Darnell [Sun, 17 Feb 2013 23:28:44 +0000 (18:28 -0500)]
Centralize some shared logic bewteen HTTPClient implementations.
Ben Darnell [Sun, 17 Feb 2013 22:54:09 +0000 (17:54 -0500)]
Use the future interface internally for _oauth_get_user.
Added a new method _oauth_get_user_future because the old method was
de facto public for third-party auth plugins.
Ben Darnell [Sun, 17 Feb 2013 22:13:45 +0000 (17:13 -0500)]
Add future interface to most of the rest of the auth module.
_oauth_get_user still uses callbacks internally, and I haven't
changed the old deprecated FacebookMixin.
Ben Darnell [Sun, 17 Feb 2013 21:21:01 +0000 (16:21 -0500)]
Add a Future-based interface to tornado.auth's twitter_request.
This allows new clients to receive exception messages from failed
requests, without breaking compatibility with existing callback-based
clients.
Ben Darnell [Sun, 17 Feb 2013 17:25:22 +0000 (12:25 -0500)]
Factor argument replacement logic out of @return_future
Ben Darnell [Sun, 17 Feb 2013 05:20:01 +0000 (00:20 -0500)]
Add autobahn tests for client side of websockets.
Ben Darnell [Sun, 17 Feb 2013 05:03:45 +0000 (00:03 -0500)]
Add a simple websocket client and unittest
Ben Darnell [Sat, 16 Feb 2013 16:18:50 +0000 (11:18 -0500)]
Add a test for subprocess with stderr as a separate stream
bdarnell [Sat, 16 Feb 2013 16:15:20 +0000 (08:15 -0800)]
Merge pull request #682 from martynsmith/patch-1
Fix typo in stream setup for stderr
Ben Darnell [Sat, 16 Feb 2013 16:07:23 +0000 (11:07 -0500)]
Use xrange instead of range on python 2.
Closes #681.
Martyn Smith [Sat, 16 Feb 2013 02:25:26 +0000 (15:25 +1300)]
Fix typo in stream setup for stderr
Ben Darnell [Sat, 16 Feb 2013 01:30:50 +0000 (20:30 -0500)]
s/xrange/range/ for python 3.
Closes #681.
Ben Darnell [Sat, 16 Feb 2013 00:45:53 +0000 (19:45 -0500)]
Add an assertion for inconsistent StackContexts when used with generators.
Ben Darnell [Thu, 14 Feb 2013 04:03:25 +0000 (23:03 -0500)]
Add a tox config for testing with the pyuv-based IOLoop.
Ben Darnell [Thu, 14 Feb 2013 03:52:17 +0000 (22:52 -0500)]
Document and test the ability to call remove_timeout after it has fired.
Ben Darnell [Thu, 14 Feb 2013 03:35:14 +0000 (22:35 -0500)]
Fix a straggling reference to netutil.TCPServer in comments.
Ben Darnell [Thu, 14 Feb 2013 02:05:41 +0000 (21:05 -0500)]
Prevent __future__ imports in tornado from leaking into user code.
This could happen with the command-line mode of autoreload or
in templates.
Ben Darnell [Wed, 13 Feb 2013 18:31:02 +0000 (13:31 -0500)]
Remove epoll.c from MANIFEST.in
Ben Darnell [Wed, 13 Feb 2013 18:30:18 +0000 (13:30 -0500)]
Bump version number to 2.4.post3
Ben Darnell [Tue, 12 Feb 2013 00:13:25 +0000 (19:13 -0500)]
Fix quadratic performance in gen.engine when yielding a large list.
Ben Darnell [Sat, 9 Feb 2013 20:52:47 +0000 (15:52 -0500)]
Make LogTrapTestCase fail more gracefully in unknown logging configurations.
This allows LogTrapTestCases to be run under nose, which does its own
log buffering.
Closes #674
Ben Darnell [Sat, 9 Feb 2013 18:59:00 +0000 (13:59 -0500)]
Add a workaround for a bug in the latest version of libcurl
Ben Darnell [Sat, 9 Feb 2013 17:55:06 +0000 (12:55 -0500)]
Escape non-ascii bytes in tracebacks line-by-line instead of all at once.
Previously if there were any bytes that needed escaping, the newlines
would get escaped as well, ruining the message formatting.
Closes #675 (again)
Ben Darnell [Sat, 9 Feb 2013 01:14:13 +0000 (20:14 -0500)]
Clarify docstring of IOLoop.stop.
The mention of "after the current iteration" was meant to emphasize that the
stop was not instantaneous, but it could have also been read as a guarantee
that one more poll call would take place.
Closes #672.
Ben Darnell [Sat, 9 Feb 2013 00:40:27 +0000 (19:40 -0500)]
Merge commit 'e3f8aa' from heynemann/master
Closes #677
Ben Darnell [Sat, 9 Feb 2013 00:21:10 +0000 (19:21 -0500)]
Handle non-ascii data in logged exceptions like in the main message.
Closes #675
Bernardo Heynemann [Wed, 6 Feb 2013 17:35:35 +0000 (15:35 -0200)]
Pre-compiling regex that removes control characters.
Given that this regex might be used a lot in the lifetime of a given server (each request that uses get_argument for unicode strings) it seems sensible to store the compiled version of the regex.
Ben Darnell [Wed, 6 Feb 2013 01:00:17 +0000 (20:00 -0500)]
Switch one last test from get_unused_port to bind_unused_port.
Closes #676.
Ben Darnell [Wed, 6 Feb 2013 00:51:51 +0000 (19:51 -0500)]
Update pyflakes version.
The new version no longer complains about all our conditional imports.
Ben Darnell [Mon, 4 Feb 2013 00:28:30 +0000 (19:28 -0500)]
Add a test for non-login use of twitter_request.
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.
Ben Darnell [Mon, 28 Jan 2013 01:16:58 +0000 (20:16 -0500)]
Protect the tornado.gen import in testing.py for app engine.
Ben Darnell [Sun, 27 Jan 2013 23:07:21 +0000 (18:07 -0500)]
Support lists of futures in @gen.engine.
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.
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.
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.
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.
Ben Darnell [Sun, 27 Jan 2013 15:53:39 +0000 (10:53 -0500)]
Fix typo in next.rst.
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.
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.
Ben Darnell [Sat, 26 Jan 2013 18:33:52 +0000 (13:33 -0500)]
Split up next.rst by module.
Ben Darnell [Fri, 25 Jan 2013 04:13:00 +0000 (23:13 -0500)]
Get the test suite passing on windows again.
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.
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.
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
Ben Darnell [Thu, 24 Jan 2013 03:27:00 +0000 (22:27 -0500)]
Preliminary support for ubuntu's python3-pycurl port.
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).
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
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).
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.
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.
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
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
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.
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.
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.
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.
Ben Darnell [Sat, 19 Jan 2013 22:14:25 +0000 (17:14 -0500)]
web_test's wsgi_safe can be a class decorator too.
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.
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'
Ben Darnell [Sat, 19 Jan 2013 19:33:37 +0000 (14:33 -0500)]
Use real class decorators and remove other py25-era workarounds
Ben Darnell [Sat, 19 Jan 2013 18:48:02 +0000 (13:48 -0500)]
Update autopep8 to 0.8.5 and run it.
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)
Ben Darnell [Sat, 19 Jan 2013 18:29:10 +0000 (13:29 -0500)]
Remove the remaining traces of tornado.util.b.
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
Ben Darnell [Sat, 19 Jan 2013 17:58:54 +0000 (12:58 -0500)]
Doc updates for py25 removal
Ben Darnell [Mon, 14 Jan 2013 03:30:22 +0000 (22:30 -0500)]
Remove py25 from travis.yml
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+.
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