]>
git.ipfire.org Git - thirdparty/tornado.git/log
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
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.