]>
git.ipfire.org Git - thirdparty/tornado.git/log
clowwindy [Wed, 8 May 2013 03:28:03 +0000 (11:28 +0800)]
Update httpclient.py
fix typo
Ben Darnell [Sun, 5 May 2013 16:58:34 +0000 (12:58 -0400)]
Create UIModule proxies on demand instead of in RequestHandler init.
It would be nice to do something similar for UI methods, but it's tricker
and they are less common (there are three UIModules defined by default
for every handler).
Ben Darnell [Sun, 5 May 2013 16:31:30 +0000 (12:31 -0400)]
Add a test that covers creation and binding of UIModules and methods.
Ben Darnell [Sun, 5 May 2013 15:46:55 +0000 (11:46 -0400)]
Precompile the regex used on severy set_header call.
The regex was cached by the re module, but the overhead of looking it
up in the cache added up to almost 1% of the time in benchmark.py.
Ben Darnell [Sun, 5 May 2013 14:45:36 +0000 (10:45 -0400)]
Rewrite HTTPHeaders normalization to limit the growth of the cache.
Reorganize the code into a dict subclass for speed: cache hits are now
just a dict lookup, with no python function call. (this saves about 1%
on demos/benchmark/benchmark.py on cpython 2.7)
Remove the regex-based fast path, which has not had any real impact since
we added the dict cache.
Ben Darnell [Sun, 5 May 2013 14:18:13 +0000 (10:18 -0400)]
Catch and ignore EINVAL errors from setsockopt.
This seems to happen a lot in benchmark runs when sockets are closed
after a request.
Ben Darnell [Sun, 5 May 2013 13:55:37 +0000 (09:55 -0400)]
Clear the NODELAY flag in set_nodelay(False).
Ben Darnell [Sun, 5 May 2013 01:50:31 +0000 (21:50 -0400)]
Add an interface to set the TCP_NODELAY flag on an IOStream.
Use this flag from simple_httpclient (always) and httpserver (when a complete
response is available), and add an accessor for WebSocketHandler.
Also make simple_httpclient send headers and body in a single
IOStream.write call.
Ben Darnell [Sat, 4 May 2013 04:13:53 +0000 (00:13 -0400)]
Add overrideable method RequestHandler.log_exception.
Most apps that currently override _handle_request_exception can now
use a combination of log_exception and write_error.
Closes #730.
Ben Darnell [Sat, 4 May 2013 02:45:12 +0000 (22:45 -0400)]
Update docs for AsyncTestCase to make @gen_test more prominent.
Ben Darnell [Wed, 1 May 2013 03:37:37 +0000 (23:37 -0400)]
Add an exception handler in _try_inline_read to ensure close_callback is run.
This is probably just a stopgap until some larger refactoring around
pending_callbacks, but will help with the max_buffer_size leak.
Ben Darnell [Wed, 1 May 2013 03:01:54 +0000 (23:01 -0400)]
Fix another case in which streaming read_until_close passed data to the final callback.
Closes #774.
Ben Darnell [Mon, 29 Apr 2013 04:08:41 +0000 (00:08 -0400)]
Release note updates.
Ben Darnell [Mon, 29 Apr 2013 03:25:23 +0000 (23:25 -0400)]
Fix a memory leak in HTTPServer with very large file uploads.
This is not quite a true leak since the garbage collector will
reclaim everything when it runs, but it might as well be a leak
because CPython's garbage collector uses heuristics based on the
number of allocated objects to decide when to run. Since this
scenario resulted in a small number of very large objects, the process
could consume a large amount of memory.
The actual change is to ensure that HTTPConnection always sets a
close_callback on the IOStream instead of waiting for the Application
to set one. I also nulled out a few more references to break up cycles.
Closes #740.
Closes #747.
Closes #760.
Ben Darnell [Sun, 28 Apr 2013 22:40:31 +0000 (18:40 -0400)]
Fix locale.format_date on python 3.
There's probably more work to be done on this largely-untested code,
but this was the case I could find by grepping for stray references
to `long`.
Ben Darnell [Sun, 28 Apr 2013 22:31:57 +0000 (18:31 -0400)]
Prefix all "reserved" names used by the template system with _tt_
to avoid collisions with user-defined names.
Inspired by #768.
Ben Darnell [Sun, 28 Apr 2013 22:17:15 +0000 (18:17 -0400)]
Use weakrefs instead of __del__ in reference cycle test.
This avoids an awkward and otherwise meaningless use of Task(None).
Ben Darnell [Sun, 28 Apr 2013 22:10:16 +0000 (18:10 -0400)]
Merge remote-tracking branch 'homm/master'
homm [Sun, 28 Apr 2013 21:32:53 +0000 (01:32 +0400)]
Use add_callback to trigger ioloop in test.
Ben Darnell [Sun, 28 Apr 2013 21:29:26 +0000 (17:29 -0400)]
Add a --debug_gc flag to runtests to easily turn on extra logging.
Ben Darnell [Sun, 28 Apr 2013 21:28:02 +0000 (17:28 -0400)]
Fix options with multiple=True on python 3; add tests.
homm [Sun, 28 Apr 2013 20:28:03 +0000 (00:28 +0400)]
Fix typo.
homm [Sun, 28 Apr 2013 19:25:28 +0000 (23:25 +0400)]
Avoid circular references in StackContext and ExceptionStackContext.
homm [Sun, 28 Apr 2013 17:35:48 +0000 (21:35 +0400)]
Remove reference to last task and his arguments in engine to free memory.
Ben Darnell [Sun, 28 Apr 2013 16:17:00 +0000 (12:17 -0400)]
Fix resolver implementation on Solaris.
Closes #766.
Ben Darnell [Sun, 28 Apr 2013 02:54:55 +0000 (22:54 -0400)]
Catch additional errors to prevent warnings logged when connections
are closed immediately after opening.
Closes #750.
bdarnell [Wed, 24 Apr 2013 03:21:50 +0000 (20:21 -0700)]
Merge pull request #752 from oyerli/patch-1
Unnecessary MozWebSocket in the WebSocket demo
Ben Darnell [Wed, 24 Apr 2013 03:17:24 +0000 (23:17 -0400)]
Don't try to run HTTPConnection._close_callback if it is None.
This was the case for WSGIContainer.
Closes #751.
bdarnell [Wed, 24 Apr 2013 02:13:34 +0000 (19:13 -0700)]
Merge pull request #745 from davidwilemski/xheaders
support ip lists in X-Forwarded-For headers
Ozan Yerli [Sun, 21 Apr 2013 18:30:23 +0000 (21:30 +0300)]
Unnecessary MozWebSocket in the WebSocket demo
WebSocket is implemented in all modern web browsers.
David Wilemski [Thu, 18 Apr 2013 18:20:37 +0000 (14:20 -0400)]
support ip lists in X-Forwarded-For headers
Ben Darnell [Thu, 18 Apr 2013 14:40:20 +0000 (10:40 -0400)]
Expand docs for @asynchronous decorator and other cleanups.
Closes #742.
Ben Darnell [Thu, 18 Apr 2013 13:33:57 +0000 (09:33 -0400)]
Fix the same typo in docs/index.rst
bdarnell [Thu, 18 Apr 2013 13:33:39 +0000 (06:33 -0700)]
Merge pull request #739 from eguven/master
Fix typo in README
Eren Güven [Thu, 18 Apr 2013 07:26:08 +0000 (10:26 +0300)]
Fix typo in README
bdarnell [Thu, 18 Apr 2013 03:33:18 +0000 (20:33 -0700)]
Merge pull request #723 from ajdavis/gen-test-timeout
Make gen_test's timeout configurable
MinRK [Tue, 16 Apr 2013 01:12:48 +0000 (18:12 -0700)]
use getattr to check for close method in IOLoop.close
instead of catching AttributeError directly
MinRK [Mon, 15 Apr 2013 18:36:58 +0000 (11:36 -0700)]
try close method to close FDs in IOLoop
If an object has a `close` method, use that first,
then fallback on `os.close`.
This is useful in subclasses that support polling things (zmq sockets, specifically)
that are not simple FDs (and Jython, I hear?).
Ben Darnell [Sun, 14 Apr 2013 21:03:46 +0000 (17:03 -0400)]
Start a new next-release-notes file
Ben Darnell [Sun, 14 Apr 2013 20:07:40 +0000 (16:07 -0400)]
Fix the import_object ImportError on Python 3.
Python 3 also changed exception messages slightly so remove one case
from the doctest.
Ben Darnell [Sun, 14 Apr 2013 20:03:08 +0000 (16:03 -0400)]
Merge remote-tracking branch 'kachayev/import-object'
Ben Darnell [Sun, 14 Apr 2013 19:58:02 +0000 (15:58 -0400)]
Break up a reference cycle with RequestHandler.ui when handler exits cleanly.
This is not strictly necessary, but allows for CPython's refcounting
GC to reclaim the handler sooner than waiting for a full GC.
Closes #383.
Ben Darnell [Sun, 14 Apr 2013 19:42:24 +0000 (15:42 -0400)]
Break reference cycle between WebSocketHandler and WebSocketProtocol on close.
This isn't strictly necessary, but it allows the refcounting CPython GC
to clean things up without waiting for a full GC.
Closes #382.
Ben Darnell [Sun, 14 Apr 2013 19:31:50 +0000 (15:31 -0400)]
Always send oauth_version=1.0, even when using 1.0a.
This is required by the spec (http://oauth.net/core/1.0/#auth_step1).
Many providers (including Google and Twitter) allow a value of either
1.0 or 1.0a here, but e.g. LinkedIn requires 1.0.
Closes #236.
Ben Darnell [Sun, 14 Apr 2013 17:58:55 +0000 (13:58 -0400)]
Add link to PDF docs.
Ben Darnell [Sun, 14 Apr 2013 00:39:24 +0000 (20:39 -0400)]
Merge commit '0771f'
Ben Darnell [Sun, 14 Apr 2013 00:35:24 +0000 (20:35 -0400)]
Handle malformed headers more gracefully.
Closes #699.
bdarnell [Sun, 14 Apr 2013 00:15:11 +0000 (17:15 -0700)]
Merge pull request #693 from apieceofredcloth/master
Allow lists as well as tuples in handler definitions
Ben Darnell [Sat, 13 Apr 2013 23:35:39 +0000 (19:35 -0400)]
Document the fact that auth_mode="digest" only works with curl.
Add check in simple_httpclient that only basic mode is used.
bdarnell [Sat, 13 Apr 2013 23:21:03 +0000 (16:21 -0700)]
Merge pull request #700 from icaromedeiros/master
Digest authentication for curl_httpclient
Ben Darnell [Sat, 13 Apr 2013 22:22:16 +0000 (18:22 -0400)]
Merge remote-tracking branch 'mrjoes/perf'
Ben Darnell [Sat, 13 Apr 2013 22:15:49 +0000 (18:15 -0400)]
Parse if-modified-since timestamps without going through time_t or local time.
This fixes a bug on windows in which mktime cannot work with times before
the epoch.
Closes #713.
Serge S. Koval [Sat, 13 Apr 2013 21:28:36 +0000 (00:28 +0300)]
_handle_exception in testing.py ignores passed exception
Ben Darnell [Sat, 13 Apr 2013 21:20:07 +0000 (17:20 -0400)]
Ignore negative return values from CurlMulti.timeout.
pycurl has a wraparound bug that can turn very large timeouts into
negative numbers.
Closes #712.
Serge S. Koval [Sat, 13 Apr 2013 21:02:49 +0000 (00:02 +0300)]
Don't use range for performance reasons
Serge S. Koval [Sat, 13 Apr 2013 21:00:27 +0000 (00:00 +0300)]
Use range instead of xrange
Ben Darnell [Sat, 13 Apr 2013 20:39:58 +0000 (16:39 -0400)]
Fix escaping error in blog demo
Closes #726.
Serge S. Koval [Sat, 13 Apr 2013 20:12:37 +0000 (23:12 +0300)]
Comparison fix
Serge S. Koval [Sat, 13 Apr 2013 20:09:50 +0000 (23:09 +0300)]
Optimized StackContext implementation
A. Jesse Jiryu Davis [Sat, 13 Apr 2013 18:31:07 +0000 (14:31 -0400)]
Configurable timeout for gen_test and AsyncTestCase.wait()
A. Jesse Jiryu Davis [Sat, 13 Apr 2013 18:29:22 +0000 (14:29 -0400)]
testing_test style cleanup
A. Jesse Jiryu Davis [Fri, 12 Apr 2013 19:40:33 +0000 (15:40 -0400)]
Fix and simplify testing of gen_test
A. Jesse Jiryu Davis [Fri, 12 Apr 2013 19:39:43 +0000 (15:39 -0400)]
gen_test requires `timeout` passed as a keyword argument
Ben Darnell [Fri, 12 Apr 2013 14:15:21 +0000 (10:15 -0400)]
Bump version number in the master branch
A. Jesse Jiryu Davis [Thu, 11 Apr 2013 19:17:26 +0000 (15:17 -0400)]
Make gen_test's timeout configurable
Ben Darnell [Thu, 11 Apr 2013 03:53:58 +0000 (23:53 -0400)]
Re-add google webmaster tools site verification code.
Ben Darnell [Tue, 9 Apr 2013 03:26:51 +0000 (23:26 -0400)]
Set version number to 3.0.1
Ben Darnell [Tue, 9 Apr 2013 03:11:08 +0000 (23:11 -0400)]
Make the websocket_connect error handling more comprehensive.
Now covers successful http responses that return a non-websocket body
and network errors that prevent a body from being returned.
Added a connect_timeout parameter to websocket_connect.
bdarnell [Tue, 9 Apr 2013 02:49:29 +0000 (19:49 -0700)]
Merge pull request #707 from protoss-player/master
websocket_connect should not hang on HTTP errors
Ben Darnell [Tue, 9 Apr 2013 02:46:30 +0000 (22:46 -0400)]
Update debug mode docs.
Ben Darnell [Tue, 9 Apr 2013 02:22:34 +0000 (22:22 -0400)]
Add 3.0.1 release notes.
bdarnell [Tue, 9 Apr 2013 02:00:19 +0000 (19:00 -0700)]
Merge pull request #704 from chrislea/master
Add check for ssl.CertificateError in netutil.py
Ben Darnell [Tue, 9 Apr 2013 01:47:35 +0000 (21:47 -0400)]
HTTPResponse.request should always be an HTTPRequest, never a _RequestProxy.
Closes #718.
bdarnell [Tue, 9 Apr 2013 01:14:26 +0000 (18:14 -0700)]
Merge pull request #720 from wsantos/facebook_future
Add future interface to FacebookGraphMixin
Waldecir Santos [Mon, 8 Apr 2013 18:41:09 +0000 (15:41 -0300)]
Add future interface to FacebookGraphMixin
Ben Darnell [Sun, 7 Apr 2013 17:07:23 +0000 (13:07 -0400)]
Add an ioloop command line flag to the benchmark script.
Ben Darnell [Fri, 5 Apr 2013 02:30:52 +0000 (22:30 -0400)]
Update pyuv test for latest version of pyuv and tornado-pyuv
Ben Darnell [Wed, 3 Apr 2013 00:29:34 +0000 (20:29 -0400)]
Fix precedence of StringIO imports for LogTrapTestCase.
io.StringIO doesn't allow byte strings even on python 2, which causes
it to fail with the standard log formatter (but not tornado's "pretty
logging").
Closes #708.
Vadim Semenov [Tue, 2 Apr 2013 15:27:26 +0000 (19:27 +0400)]
tests: test for websocket_connect failure
Ben Darnell [Tue, 2 Apr 2013 04:11:10 +0000 (00:11 -0400)]
Set the __test__ attribute on gen_test to False.
Without this, if a nose-using project imported gen_test nose would try
to run it as a test.
Vadim Semenov [Mon, 1 Apr 2013 23:03:12 +0000 (03:03 +0400)]
websocket_connect: don't hang on HTTP errors
Ben Darnell [Sun, 31 Mar 2013 22:34:48 +0000 (18:34 -0400)]
Fix exceptions in the gen module to work correctly with tuple keys.
Previously this would result in a TypeError instead of the intended exception.
Ben Darnell [Sun, 31 Mar 2013 21:45:19 +0000 (17:45 -0400)]
Merge branch 'branch3.0'
Ben Darnell [Sun, 31 Mar 2013 21:44:22 +0000 (17:44 -0400)]
Copy the notice about dict-style access to options to the backwards-compat section.
Chris Lea [Fri, 29 Mar 2013 22:33:02 +0000 (15:33 -0700)]
add check for ssl.CertificateError
Ben Darnell [Fri, 29 Mar 2013 13:48:45 +0000 (09:48 -0400)]
Include readme in the setup.py long_description field.
This should let pypi pick it up automatically on upload.
Ben Darnell [Fri, 29 Mar 2013 13:47:52 +0000 (09:47 -0400)]
Bump version number in the master branch
Ben Darnell [Fri, 29 Mar 2013 13:32:15 +0000 (09:32 -0400)]
Pypi's rst rendering doesn't like it when the same anchortext is reused
for different targets.
Ben Darnell [Fri, 29 Mar 2013 13:02:04 +0000 (09:02 -0400)]
Set version number to 3.0
Ben Darnell [Fri, 29 Mar 2013 13:01:44 +0000 (09:01 -0400)]
Finalize 3.0 release notes.
Ben Darnell [Fri, 29 Mar 2013 12:55:39 +0000 (08:55 -0400)]
Downloads are now hosted on pypi instead of github.
Ben Darnell [Thu, 28 Mar 2013 04:13:20 +0000 (00:13 -0400)]
Fix another broken link on readme.
Ben Darnell [Thu, 28 Mar 2013 04:12:10 +0000 (00:12 -0400)]
Fix rst markup in readme
Ben Darnell [Thu, 28 Mar 2013 04:11:06 +0000 (00:11 -0400)]
Replace the outdated README.md with a lightly-edited version of docs/index.rst
Ben Darnell [Thu, 28 Mar 2013 03:29:01 +0000 (23:29 -0400)]
Update pypi description field.
Ben Darnell [Thu, 28 Mar 2013 02:55:04 +0000 (22:55 -0400)]
Fix options.parse_config_file on Python 3.
Add a test for this function.
Closes #702.
Ben Darnell [Mon, 25 Mar 2013 03:22:20 +0000 (23:22 -0400)]
Bump version to 3.0b2
Ben Darnell [Mon, 25 Mar 2013 03:21:08 +0000 (23:21 -0400)]
Delete HTTPConnection._close_callback in between requests.
Previously the close callback would cause a reference to the previous
RequestHandler to be retained while waiting for the next request.
Ben Darnell [Sun, 24 Mar 2013 01:25:14 +0000 (21:25 -0400)]
Fix error handling with the combination of @asynchronous and @gen.coroutine.
Also make self.finish() optional for coroutines since we can finish
if the future resolves successfully.
icaromedeiros [Fri, 22 Mar 2013 14:24:49 +0000 (11:24 -0300)]
digest authentication