]>
git.ipfire.org Git - thirdparty/tornado.git/log
Ben Darnell [Tue, 19 Dec 2017 03:56:40 +0000 (22:56 -0500)]
tcpserver: Fix multiprocess modes
Two recent changes broke Tornado's multiprocess modes by initializing
the event loop before the fork in typical patterns.
- The removal of `io_loop` arguments moved a call to
IOLoop.current() earlier in TCPServer's constructor.
- The change to `asyncio.Future` initialized the asyncio event loop at
import time.
Move the call in TCPServer earlier (and audit the rest of that change
to make sure this didn't happen anywhere else) and replace
`gen.moment` and `gen._null_future` with dummy objects that do not
involve the asyncio event loop.
Ben Darnell [Mon, 18 Dec 2017 03:35:10 +0000 (22:35 -0500)]
Merge pull request #2219 from bdarnell/release-notes
docs: Start release notes for 5.0.
Ben Darnell [Mon, 18 Dec 2017 03:08:18 +0000 (22:08 -0500)]
Merge branch 'branch4.5' into release-notes
Ben Darnell [Mon, 18 Dec 2017 02:47:58 +0000 (21:47 -0500)]
docs: Start release notes for 5.0.
Update versionadded/versionchanged tags. Misc other doc updates
Ben Darnell [Mon, 18 Dec 2017 02:48:41 +0000 (21:48 -0500)]
Merge pull request #2218 from bdarnell/current-asyncio
ioloop: Setting AsyncIOLoop as current also sets asyncio event loop
Ben Darnell [Sun, 17 Dec 2017 16:36:53 +0000 (11:36 -0500)]
ioloop: Setting AsyncIOLoop as current also sets asyncio event loop
This should eliminate the need for explicit asyncio manipulations
from applications migrating to Tornado 5.0
Ben Darnell [Sun, 10 Dec 2017 01:24:54 +0000 (20:24 -0500)]
Merge pull request #2213 from bdarnell/asyncio-task-runner
gen: Use the asyncio task runner for native coroutines
Ben Darnell [Sat, 9 Dec 2017 20:15:39 +0000 (15:15 -0500)]
gen: Use the asyncio task runner for native coroutines
Ben Darnell [Sat, 9 Dec 2017 20:14:30 +0000 (15:14 -0500)]
ioloop_test: Explicitly close an IOLoop
This avoids a warning logged at GC time.
Ben Darnell [Fri, 8 Dec 2017 17:52:46 +0000 (12:52 -0500)]
Merge pull request #2212 from bdarnell/pypy3
travis.yml: Upgrade pypy3
Ben Darnell [Fri, 8 Dec 2017 17:32:51 +0000 (12:32 -0500)]
travis.yml: Upgrade pypy3
This may fix weird test failures as seen in #2193
Ben Darnell [Fri, 8 Dec 2017 15:19:02 +0000 (10:19 -0500)]
Merge pull request #2210 from hipro/patch-3
Update structure.rst `.get("Content-Type", "")`
Ben Darnell [Fri, 8 Dec 2017 13:26:56 +0000 (08:26 -0500)]
Merge pull request #2208 from shangdahao/impove_doc
Make the example code in the document "tornado.ioloop — Main event loop" can copy-paste-run directly.
hipro [Fri, 8 Dec 2017 09:43:12 +0000 (17:43 +0800)]
Update structure.rst
Ben Darnell [Thu, 7 Dec 2017 01:42:51 +0000 (20:42 -0500)]
Merge pull request #2200 from pitrou/set_result_unless_cancelled
Issue #2188: check whether a future was cancelled before calling set_result()
shanghui [Wed, 6 Dec 2017 06:45:21 +0000 (14:45 +0800)]
Make the example code in the document "tornado.ioloop — Main event loop" can copy-paste-run directly.
Antoine Pitrou [Thu, 16 Nov 2017 17:28:20 +0000 (18:28 +0100)]
Issue #2188: check whether a future was cancelled before calling set_result()
Min RK [Thu, 16 Nov 2017 03:21:52 +0000 (04:21 +0100)]
handle multiple values in X-Forwarded-Proto (#2162)
Antoine Pitrou [Thu, 16 Nov 2017 03:18:06 +0000 (04:18 +0100)]
Issue #2147: avoid copies on non-small writes (#2169)
Ben Darnell [Thu, 16 Nov 2017 03:17:16 +0000 (22:17 -0500)]
Merge pull request #2195 from kkopachev/circular-refs
Break circular references when async request handler raises exception
Ben Darnell [Thu, 16 Nov 2017 03:06:52 +0000 (22:06 -0500)]
Merge pull request #2192 from pitrou/asyncio_future_debug_info
Improve debug support for asyncio futures
Konstantin Kopachev [Fri, 10 Nov 2017 05:19:42 +0000 (21:19 -0800)]
Break circular references when async request handler raises exception
Antoine Pitrou [Tue, 7 Nov 2017 21:19:39 +0000 (22:19 +0100)]
Improve debug support for asyncio futures
When in debug mode, asyncio returns the instantiation place of a Future
and places it in its repr(), for example:
<Future finished result=None created at /home/antoine/distributed/distributed/worker.py:1223>
This is useful when asyncio logs cancelled futures or futures that were not
waited upon after erroring out.
However, when using @gen.coroutine, we need to fix the recorded stack trace
otherwise the display is much less useful:
<Future finished result=None created at /home/antoine/tornado/tornado/gen.py:295>
Ben Darnell [Sun, 5 Nov 2017 23:31:53 +0000 (18:31 -0500)]
routing_test: Remove test of log message
andrew [Fri, 3 Nov 2017 14:17:09 +0000 (17:17 +0300)]
return 404 when routing delegate is not found
Ben Darnell [Sun, 5 Nov 2017 23:07:15 +0000 (18:07 -0500)]
Merge pull request #2073 from bdarnell/asyncio-future
concurrent: Use asyncio.Future when available
Ben Darnell [Mon, 5 Jun 2017 03:55:59 +0000 (23:55 -0400)]
concurrent: Use asyncio.Future when available
This improves compatibility with asyncio, but required small tweaks to
various tests due to changes in callback timing (asyncio future
callbacks are always scheduled for the next IOLoop iteration)
concurrent: Always schedule Future callbacks on the IOLoop
Make the python 2/tornado-specific Future implementation more
consistent with asyncio's.
Ben Darnell [Mon, 30 Oct 2017 00:14:05 +0000 (20:14 -0400)]
gen: Correctly accept concurrent futures in gen.with_timeout.
The existing implementation happened to work for tornado's Future
implementation but breaks with the move to asyncio Futures.
Ben Darnell [Mon, 23 Oct 2017 03:36:30 +0000 (23:36 -0400)]
twisted: Be more tolerant of leaked current IOLoops in tests
Ben Darnell [Mon, 23 Oct 2017 04:24:02 +0000 (00:24 -0400)]
asyncio: Drop support for trollius
This package is no longer maintained and was never widely used.
Ben Darnell [Mon, 23 Oct 2017 02:26:55 +0000 (22:26 -0400)]
ioloop: Disallow non-asyncio IOLoops on python 3
Ben Darnell [Mon, 5 Jun 2017 00:52:51 +0000 (20:52 -0400)]
concurrent: Introduce future_add_done_callback
This function guarantees synchronous execution of the callback for
Futures that are already done, allowing the Future implementation to
change to one that does not provide this guarantee.
Ben Darnell [Mon, 5 Jun 2017 00:39:44 +0000 (20:39 -0400)]
concurrent: Remove TracebackFuture alias
Ben Darnell [Mon, 5 Jun 2017 00:27:30 +0000 (20:27 -0400)]
concurrent: Introduce future_set_exc_info function
This function is equivalent to future.set_exc_info for TracebackFuture
but also falls back to set_exception for other Futures.
Ben Darnell [Sun, 5 Nov 2017 16:08:04 +0000 (11:08 -0500)]
Merge pull request #2187 from bdarnell/ipv6-detection
test: More robust avoidance of broken ipv6
Ben Darnell [Sun, 5 Nov 2017 15:38:03 +0000 (10:38 -0500)]
test: More robust ipv6 detection
There are many ways ipv6 can be disabled or broken (and it just
stopped working on travis-ci), so instead of checking flags like
socket.has_ipv6, attempt to actually bind to an ipv6 address.
Closes #2185
Ben Darnell [Sun, 5 Nov 2017 15:32:10 +0000 (10:32 -0500)]
testing: Connect to 127.0.0.1 instead of localhost
The servers used in tests are only listening for ipv4, not ipv6
(to avoid spurious firewall prompts on macos). In what is apparently
a recent macos change, connecting to `localhost` when the ipv6 port
is unbound now incurs a 200ms delay, slowing a full test run down
by a factor of 20.
Ben Darnell [Sat, 28 Oct 2017 14:51:27 +0000 (10:51 -0400)]
Merge pull request #2180 from EtiennePelletier/master
Don't let invalid bytes stop the Webspider demo
Ben Darnell [Sat, 28 Oct 2017 14:45:42 +0000 (10:45 -0400)]
Merge pull request #2179 from pitrou/periodic_callback_ioloop_compat
Fetch IOLoop in PeriodicCallback.start(), not __init__()
EtiennePelletier [Wed, 25 Oct 2017 03:36:58 +0000 (23:36 -0400)]
Bypass UnicodeDecodeErrors in Webspider demo
Antoine Pitrou [Tue, 24 Oct 2017 09:09:44 +0000 (11:09 +0200)]
Fetch IOLoop in PeriodicCallback.start(), not __init__()
See motivation at https://github.com/dask/distributed/pull/1172
Ben Darnell [Sun, 22 Oct 2017 21:07:42 +0000 (17:07 -0400)]
Merge pull request #2178 from bdarnell/run-in-executor-fix
Fixes for IOLoop.run_in_executor
Ben Darnell [Sun, 22 Oct 2017 19:53:35 +0000 (15:53 -0400)]
Fixes for IOLoop.run_in_executor
Correctly transform the concurrent Future into a Tornado Future
and test that the result is usable with await.
Ben Darnell [Sun, 22 Oct 2017 18:43:01 +0000 (14:43 -0400)]
Merge pull request #2167 from pitrou/remove_ssl_hack
Remove SSL hack
Ben Darnell [Sun, 22 Oct 2017 18:42:48 +0000 (14:42 -0400)]
Merge pull request #2177 from bdarnell/require-ssl
Require modern SSL features
Ben Darnell [Sun, 22 Oct 2017 17:23:12 +0000 (13:23 -0400)]
Document ssl module requirements in index.rst
Ben Darnell [Sun, 22 Oct 2017 17:14:44 +0000 (13:14 -0400)]
Use SSLContext APIs in simple_httpclient
Set OP_NO_COMPRESSION more consistently.
Ben Darnell [Sun, 22 Oct 2017 16:31:54 +0000 (12:31 -0400)]
Remove some vestigial workarounds for py26
Ben Darnell [Sun, 22 Oct 2017 16:20:18 +0000 (12:20 -0400)]
Require modern ssl features (SSLContext, etc)
Now that we've dropped python 3.3 (so create_default_context is
present on all supported versions), we can drop all ssl
backwards-compatibility and require the modern feature set.
Antoine Pitrou [Sun, 22 Oct 2017 14:02:14 +0000 (16:02 +0200)]
Don't keep any reference to memoryviews (#2173)
See https://github.com/tornadoweb/tornado/pull/2008 for reasons
why this might be necessary.
Mike DePalatis [Sat, 21 Oct 2017 18:04:57 +0000 (14:04 -0400)]
Implement IOLoop.run_in_executor (#2067)
Antoine Pitrou [Tue, 17 Oct 2017 16:29:47 +0000 (18:29 +0200)]
Remove SSL hack
All recent Python versions (including recent Python 2.7 updates)
set SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER on OpenSSL sockets, so
we needn't freeze the write buffer anymore.
Ben Darnell [Sat, 23 Sep 2017 17:07:07 +0000 (13:07 -0400)]
Merge pull request #2157 from pjknkda/master
websocket: fix missing websocket header causes an exception
Ben Darnell [Sat, 23 Sep 2017 16:52:27 +0000 (12:52 -0400)]
Merge pull request #2155 from dawncold/fix-iostream-exception-alias
fix: iostream exception alias
Ben Darnell [Sat, 23 Sep 2017 16:51:10 +0000 (12:51 -0400)]
Merge pull request #2154 from juanpabloaj/removed-unused-import-logging
removed unused import logging
Ben Darnell [Sat, 23 Sep 2017 16:12:33 +0000 (12:12 -0400)]
Merge pull request #2149 from ploxiln/file_upload_yield
file_upload demo: yield write() cb in body_producer
Jungkook Park [Thu, 21 Sep 2017 17:14:51 +0000 (02:14 +0900)]
fix websocket handshake failure causes an exception
TianZhen [Tue, 19 Sep 2017 09:44:15 +0000 (17:44 +0800)]
fix: iostream exception alias
JuanPablo [Tue, 19 Sep 2017 01:19:17 +0000 (22:19 -0300)]
removed unused import logging
Pierce Lopez [Tue, 12 Sep 2017 20:57:50 +0000 (16:57 -0400)]
file_upload demo: write multi-part framing in one call
Pierce Lopez [Fri, 8 Sep 2017 21:49:55 +0000 (17:49 -0400)]
file_upload demo: yield write() cb in body_producer
Ben Darnell [Mon, 4 Sep 2017 19:32:52 +0000 (15:32 -0400)]
Drop support for python 3.3, 3.5.[01] (#2116)
* Drop support for python 3.3
In June 2017, Python 3.3 accounted for 0.2% of Tornado's downloads
from pypi.
* travis.yml: Use trusty, update pypy versions
Get a py35-compatible version of pypy3. Plain "pypy" no longer seems
to work in this environment, so specify a version.
Drop testing of python 2.7.8, which no longer seems to be available.
* gen,queues: Drop the "legacy aiter protocol"
This protocol changed in Python 3.5.2 (after being introduced in
3.5.0). Async iteration now requires that version of Python (or
newer).
Closes #2107
* travis.yml: Only run doctests on one version of python 3
* Get tests passing on latest version of pypy3
Josh Humphries [Sun, 3 Sep 2017 17:48:54 +0000 (18:48 +0100)]
Correctly clear and create a new ioloop during autoreload (#2137)
* Correctly clear and create a new ioloop during autoreload
After the removal of the deprecated io_loop arguments from all functions,
the autoreload module stopped working as the wait function's usage was
missed in the refactor. This resulted in the start function receiving an
IOLoop object as its only argument which it then used as the check_time
argument resulting in errors further down the line when the check_time
is expected to be an int.
* Use the ioloop's add_callback function to start the ioloop on wait
There's no need to stop and clear the loop here, just add start as
a callback and start up the ioloop.
Ben Darnell [Sun, 27 Aug 2017 18:50:20 +0000 (14:50 -0400)]
Merge pull request #2143 from bdarnell/cherrypick-cloexec
Cherrypick FD_CLOEXEC change for 4.5.2
Ben Darnell [Sun, 27 Aug 2017 16:50:55 +0000 (12:50 -0400)]
Merge pull request #2132 from felliott/stop-logging-headers
Remove headers from HTTPServerRequest repr
Ben Darnell [Sun, 27 Aug 2017 16:27:29 +0000 (12:27 -0400)]
Merge pull request #2130 from jaimegago/master
Add SSL/SSH handshake timing to response properties (curl client)
Ben Darnell [Sun, 27 Aug 2017 16:17:55 +0000 (12:17 -0400)]
Release version 4.5.2
Ben Darnell [Mon, 29 May 2017 00:10:01 +0000 (20:10 -0400)]
tcpclient,netutil: Set FD_CLOEXEC on all sockets created by Tornado
PR #1984 was based on the mistaken belief that we were already
doing this (and in python 3.4+, it's true, thanks to PEP 446). This
fixes a regression introduced in Tornado 4.5 in which autoreload would
leak file descriptors and leave client connections hanging.
Fixes #2057
Fitz Elliott [Thu, 10 Aug 2017 15:10:00 +0000 (11:10 -0400)]
Remove headers from HTTPServerRequest repr
* In tornadoweb/tornado#1112 it was decided to stop including headers
in the request repr, since they are needlessly verbose and risk
leaking user secrets into the application log.
Jaime Gago [Wed, 9 Aug 2017 22:08:48 +0000 (15:08 -0700)]
Add SSL/SSH handshake timing to response properties (curl client)
Ben Darnell [Sun, 23 Jul 2017 18:48:37 +0000 (14:48 -0400)]
Fix various typos in comments
Ben Darnell [Sun, 16 Jul 2017 15:30:41 +0000 (11:30 -0400)]
Merge pull request #2109 from yiliangt5/fix/redirecthandler_passes_get_args
feat: RedirectHandler to pass GET query
Yiliang Tang [Sat, 17 Jun 2017 06:09:05 +0000 (14:09 +0800)]
feat: RedirectHandler to pass GET query
Ben Darnell [Sun, 16 Jul 2017 03:26:59 +0000 (23:26 -0400)]
Merge pull request #2106 from minrk/pycurl-debug-str
cast pycurl debug messages to str
Lancher [Sun, 16 Jul 2017 03:13:00 +0000 (11:13 +0800)]
tcpclient: Introduce connect timeout (#2094)
Fixes #1219
Ben Darnell [Sat, 15 Jul 2017 19:56:52 +0000 (15:56 -0400)]
Merge pull request #2098 from sebbov/master
Do not send/expect Content-Length on 1xx
Min RK [Tue, 11 Jul 2017 10:07:34 +0000 (12:07 +0200)]
cast curl debug messages to str
since they come in as bytes on Python 3
Sebastien Boving [Wed, 5 Jul 2017 17:04:33 +0000 (10:04 -0700)]
Handle 1xx's along 204/304's
Ben Darnell [Tue, 4 Jul 2017 22:35:08 +0000 (18:35 -0400)]
Merge pull request #2075 from pitrou/accept_ebadf_race
Fix #2069: Fix race condition between accept() handler and TCPServer.stop()
Chris Snow [Tue, 27 Jun 2017 20:31:24 +0000 (21:31 +0100)]
FriendFeed website seems to have gone
Sebastien Boving [Tue, 27 Jun 2017 16:35:55 +0000 (09:35 -0700)]
Do not send/expect Content-Length on 1xx
Ben Darnell [Sun, 18 Jun 2017 02:24:50 +0000 (22:24 -0400)]
Merge pull request #2081 from noyainrain/fix-autoreload-module
Fix module autoreload for __main__ with relative imports
Sven [Fri, 16 Jun 2017 08:43:29 +0000 (10:43 +0200)]
Apply changes from review
Ben Darnell [Sun, 11 Jun 2017 18:28:10 +0000 (14:28 -0400)]
Merge pull request #2084 from bdarnell/docs
testing: Fix incorrect docs for gen_test
Ben Darnell [Sun, 11 Jun 2017 16:10:19 +0000 (12:10 -0400)]
testing: Fix incorrect docs for gen_test
Pointed out in #1154
Ben Darnell [Sun, 11 Jun 2017 13:36:00 +0000 (09:36 -0400)]
Merge pull request #2083 from bdarnell/log-cleanup
Clean up test logging
Antoine Pitrou [Sun, 11 Jun 2017 08:41:45 +0000 (10:41 +0200)]
Use getitem / setitem idiom on nonlocal list
Ben Darnell [Sun, 11 Jun 2017 03:00:08 +0000 (23:00 -0400)]
test: Make log detection sensitive to info logs
Silence one in httpserver_test
Ben Darnell [Sun, 11 Jun 2017 02:47:55 +0000 (22:47 -0400)]
testing: Remove deprecated LogTrapTestCase
Move the tests that relied on this in concurrent_test.py to use
log.debug instead. (The redbot test has been broken and needs work
anyway.
Ben Darnell [Sun, 11 Jun 2017 02:12:23 +0000 (22:12 -0400)]
Merge pull request #2082 from bdarnell/timeouterror
ioloop,gen: Unify TimeoutErrors
Ben Darnell [Sat, 10 Jun 2017 22:08:49 +0000 (18:08 -0400)]
ioloop,gen: Unify TimeoutErrors
Fixes #1929
Ben Darnell [Sat, 10 Jun 2017 22:13:57 +0000 (18:13 -0400)]
Merge pull request #2077 from vladimirbright/clarify_timeouts_in_queues
Added information about timeout arg in Queue get and put methods
Ben Darnell [Sat, 10 Jun 2017 21:20:14 +0000 (17:20 -0400)]
Merge pull request #2074 from ploxiln/http1_connection_close
http1connection: add "Connection: close" header if appropriate
Ben Darnell [Sat, 10 Jun 2017 21:18:42 +0000 (17:18 -0400)]
Merge pull request #2058 from jehiah/http_request_line_bad_request_2058
Return HTTP 400 on bad request lines
Sven [Fri, 9 Jun 2017 16:38:51 +0000 (18:38 +0200)]
Fix newline handling in autoreload test
Sven [Fri, 9 Jun 2017 14:50:34 +0000 (16:50 +0200)]
Fix module autoreload for __main__ with relative imports
The fix works for Python >= 3.4, keeping the current workaround for previous
versions. Also introduce a first unit test for autoreload. Close #2044.
Vladimir Prokhoda [Thu, 8 Jun 2017 08:38:13 +0000 (11:38 +0300)]
Added information about timeout arg in Queue get and put methods
Antoine Pitrou [Tue, 6 Jun 2017 09:03:22 +0000 (11:03 +0200)]
Relax test failure when failing to reproduce the race condition
Antoine Pitrou [Tue, 6 Jun 2017 08:43:14 +0000 (10:43 +0200)]
Fix #2069: Fix race condition between accept() handler and TCPServer.stop()
Pierce Lopez [Mon, 5 Jun 2017 17:22:39 +0000 (13:22 -0400)]
httpserver: remove unused no_keep_alive attribute
still a parameter passed on to HTTP1Connection