Commit Graph

2950 Commits

Author SHA1 Message Date
Ben Darnell e438075d22 Merge pull request #1528 from bdarnell/misc
Misc updates
2015-09-27 21:35:04 -04:00
Ben Darnell e01b7f8046 Return a Future from websocket write_message methods.
Fixes #1478.
2015-09-27 21:09:31 -04:00
Ben Darnell 5390ea3da1 Accept arguments in `raise Finish()`.
Fixes #1474.
2015-09-27 21:05:04 -04:00
Ben Darnell f075f2e900 Make HTTPError (both of them) copyable.
`Exception.__reduce__` causes copy.copy() to create a new argument
with the arguments from `Exception.__init__`, then overwrite
attributes from the original `__dict__`. This means that copying fails
if there are mandatory arguments that are not passed to `__init__`.

Fixes #1485
2015-09-27 20:57:11 -04:00
Ben Darnell 61f7d1047f Handle EINTR in IOStream.
Fixes #1287
2015-09-27 20:24:15 -04:00
Ben Darnell e46e10568f Merge pull request #1494 from gwillem/curl_multi_line_header
Allow multi-line headers in CurlAsyncHTTPClient
2015-09-27 20:15:12 -04:00
Ben Darnell 8115299860 Remove "IOLoop is closing" error.
Callbacks added while the IOLoop is closing will now simply not be
called (which has always been a possible fate for callbacks added
just *before* the close). This exception has not proved to be very
useful and sometimes has false positives that are tricky to work around,
as seen in the linked issues.

Closes #1491.
Closes #1244.
2015-09-27 20:13:03 -04:00
Ben Darnell 67b39ad074 Merge pull request #1527 from bdarnell/appveyor
Add appveyor.yml for windows CI.
2015-09-27 20:08:12 -04:00
Ben Darnell 578347cc92 Skip root_static_path test on non-posix OSes 2015-09-27 19:38:31 -04:00
Ben Darnell 662b7dd8ab Add appveyor.yml for windows CI. 2015-09-27 19:38:31 -04:00
Ben Darnell b3a6c413be Unbreak static file paths of '/'. 2015-09-27 18:44:30 -04:00
Ben Darnell fc77d7fe13 Support non-ascii template filenames.
Fixes #1502.
2015-09-27 18:29:54 -04:00
Ben Darnell 9ebfc39754 Document interactions with TornadoReactor and multi-process.
See #1501.
2015-09-27 18:09:16 -04:00
Ben Darnell 8a911d639f Use autodoc for asyncio and twisted docs. 2015-09-27 16:52:04 -04:00
Ben Darnell d8e069ef1e ioloop: add_callback_from_signal() calls add_callback()
Now that add_callback checks thread.ident() and no longer deadlocks from
a signal handler, add_callback_from_signal can call it unconditionally.
2015-09-27 16:03:54 -04:00
Ben Darnell 8216a5e599 Merge pull request #1511 from jampp/master
Remove synchronization in add_callback from the ioloop thread
2015-09-27 16:00:45 -04:00
Ben Darnell 7493c94369 Improve docs for current_user; describe async use from prepare() 2015-09-27 14:06:55 -04:00
Ben Darnell fd077ac347 Quiet another error that can be caused by port scans. 2015-09-27 13:05:58 -04:00
Ben Darnell 901fc49120 Fix typo in websocket_connect docs.
Fixes #1522.
2015-09-27 12:33:30 -04:00
Michael V. DePalatis 7e625d0eee Remove unnecessary word from Application docstring 2015-09-27 12:32:27 -04:00
Ben Darnell 518d4e7ee7 Merge pull request #1524 from lichun19960112/master
Update webspider demo support Python 3
2015-09-27 12:29:33 -04:00
Ben Darnell c89a49f854 Merge pull request #1525 from bdarnell/fix-coverage
Fix coverage installation for py32.
2015-09-27 12:28:00 -04:00
Ben Darnell 006a93e9e6 Fix coverage installation for py32. 2015-09-27 11:58:07 -04:00
lichun 08cc38e6ac Update webspider demo support Python 3 2015-09-26 12:23:58 +08:00
Ben Darnell 9091c9c1de Remove stale comment. 2015-09-15 09:27:26 -04:00
Ben Darnell addabd5190 Replace `gen.Multi` and `gen.multi_future` with `gen.multi`.
`multi_future` is awkward to type but is much more prominent
in native coroutines. The new function `multi` has a more
convenient name and delegates to either the YieldPoint
or Future version automatically.

For backwards compatibility, `multi_future` is still around,
and `Multi` was renamed to `MultiYieldPoint` so that we don't
have two different objects whose names differ only in case
(`Multi` is now an alias for `multi`).

See #1493.
2015-09-14 23:27:18 -04:00
Ben Darnell 6a0808146b Import t.p.asyncio automatically when available in gen.
This makes the _wrap_awaitable infinite recursion less likely
to occur, although it could show up again when another coroutine
framework adopts PEP 492.

Fixes #1499.
2015-09-14 22:42:41 -04:00
Ben Darnell e1397e3d60 Simplify OptionParser._TIMEDELTA_ABBREV_DICT.
Cython doesn't like having the more complex logic at class scope.
2015-09-14 20:31:57 -04:00
Ben Darnell 631187aec6 Clarify comment about `@cython.binding`.
It's only necessary for static functions, not methods.
2015-09-14 20:29:53 -04:00
Ben Darnell 4ccfe8925d Make ArgReplacer compatible with cython-compiled functions.
This requires a directive in the cython code to make the signature
introspectable.
2015-09-14 00:50:26 -04:00
Ben Darnell 3463036d75 Support coroutines compiled with cython
On Python 3.5, this means supporting awaitables that are not
iterables. On older versions of python, this includes
* In `@gen.coroutine`, recognizing cython's coroutines
  via the backports_abc module.
* At various points in the gen module, recognize cython's
  use of `StopIteration.args[0]` in place of `StopIteration.value`.
* Implementing Future.__await__ and _wrap_awaitable for
  pre-3.3 versions of python.
2015-09-13 23:13:43 -04:00
Ben Darnell f302e7e9d7 Make HTTPHeaders a subclass of MutableMapping ABC instead of dict.
This simplifies the implementation since MutableMapping is designed
for subclassing while dict has many special cases that need to be
overridden. In particular, this change fixes the setdefault()
method.

Fixes #1500.
2015-09-13 13:20:58 -04:00
Ben Darnell e366c4490e Merge pull request #1514 from noxiouz/add_soreuseport
netutil.bind_sockets: add `reuse_port` option to set SO_REUSEPORT
2015-09-12 20:31:18 -04:00
Anton Tiurin fffaa2f7f7 netutil.bind_sockets: add `reuse_port` option to set SO_REUSEPORT
This option is False by default, because not all platforms support
it.

Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
2015-09-12 01:40:47 +03:00
Ben Darnell 88eefe9434 Merge pull request #1479 from mr-ping/master
add timed rotating mode for logging into separated files in tornado.log
2015-09-06 10:24:59 -04:00
Ping a8949f9d92 Remove type-checker for log_rotate_mode option 2015-09-06 14:57:02 +08:00
Ping 5d0ac1d289 Raise an error when invalid option 2015-09-06 14:57:02 +08:00
Ping 90d9f17468 Change variable names and streamline test method 2015-09-06 14:57:02 +08:00
Ping 22a8c6efcf add timed rotating mode for logging into separated files in tornado.log 2015-09-06 14:57:02 +08:00
fydot bbfd096f4f Remove useless lines, noused import and variable 2015-09-05 21:12:50 -04:00
Claudio Freire 5353ac85bf Remove stale comment 2015-09-02 16:10:19 -03:00
Claudio Freire 6c8453bf0a Move closed check inside the callback_lock 2015-09-02 16:09:52 -03:00
Claudio Freire 8fffe30026 Fix comments around add_callback
Update the comments on the rationale for lock usage, and
make sure to always check self._closing
2015-09-02 15:07:55 -03:00
Claudio Freire 89f59cac08 Remove synchronization for add_callback in the ioloop thread
It is not necessary, since it will never need to invoke
wake, and as noted in add_callback_from_signal it would pose
no race risk, and it is a considerable performance penalty.
2015-09-02 14:32:46 -03:00
Ben Darnell 47c0dfa563 Fix PDF doc build.
This appears to have been broken for a while but I've only recently been
getting notifications from readthedocs.org.
2015-08-26 20:13:23 +02:00
Ben Darnell 3f3d2538bb Merge pull request #1495 from stevepeak/master
use Codecov as coverage provider
2015-08-26 15:16:31 +02:00
Steve Peak fa2d6ee0d8 trigger travis, debug complete 2015-08-25 23:28:22 -04:00
Steve Peak b0eb7e1e01 trigger travis again for debugging 2015-08-25 19:43:46 -04:00
Willem de Groot 94fe56920c Test on str, not bytes for Python3x 2015-08-25 14:05:46 +02:00
Willem de Groot 6e0a0ca5a2 Add multi-line header test 2015-08-25 13:34:52 +02:00