Commit Graph

3498 Commits

Author SHA1 Message Date
Ben Darnell 8cf55df456 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.
2017-10-22 12:37:19 -04:00
Mike DePalatis 648b3e9f7c Implement IOLoop.run_in_executor (#2067) 2017-10-21 14:04:57 -04:00
Ben Darnell 37081d7928 Merge pull request #2157 from pjknkda/master
websocket: fix missing websocket header causes an exception
2017-09-23 13:07:07 -04:00
Ben Darnell ad088464a8 Merge pull request #2155 from dawncold/fix-iostream-exception-alias
fix: iostream exception alias
2017-09-23 12:52:27 -04:00
Ben Darnell 4bc35ee9bf Merge pull request #2154 from juanpabloaj/removed-unused-import-logging
removed unused import logging
2017-09-23 12:51:10 -04:00
Ben Darnell 1c2eb6727b Merge pull request #2149 from ploxiln/file_upload_yield
file_upload demo: yield write() cb in body_producer
2017-09-23 12:12:33 -04:00
Jungkook Park 5d4a9ab263 fix websocket handshake failure causes an exception 2017-09-22 13:44:17 +09:00
TianZhen f7046cfbb2
fix: iostream exception alias 2017-09-19 17:44:15 +08:00
JuanPablo 5a40d21658 removed unused import logging 2017-09-18 22:19:17 -03:00
Pierce Lopez e92aa20f2d file_upload demo: write multi-part framing in one call 2017-09-12 16:57:50 -04:00
Pierce Lopez ab42d83714 file_upload demo: yield write() cb in body_producer 2017-09-08 17:49:55 -04:00
Ben Darnell 34c43f4775 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
2017-09-04 15:32:52 -04:00
Josh Humphries 395e55872f 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.
2017-09-03 13:48:54 -04:00
Ben Darnell 7cb24cfbe1 Merge pull request #2132 from felliott/stop-logging-headers
Remove headers from HTTPServerRequest repr
2017-08-27 12:50:55 -04:00
Ben Darnell f354f9b7b9 Merge pull request #2130 from jaimegago/master
Add SSL/SSH handshake timing to response properties (curl client)
2017-08-27 12:27:29 -04:00
Fitz Elliott 871bf81c22 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.
2017-08-10 11:22:48 -04:00
Jaime Gago e6ebac173b Add SSL/SSH handshake timing to response properties (curl client) 2017-08-09 15:08:48 -07:00
Ben Darnell d4094a0c2a Fix various typos in comments 2017-07-23 14:48:37 -04:00
Ben Darnell 59d80a6219 Merge pull request #2109 from yiliangt5/fix/redirecthandler_passes_get_args
feat: RedirectHandler to pass GET query
2017-07-16 11:30:41 -04:00
Yiliang Tang e5feb2745c
feat: RedirectHandler to pass GET query 2017-07-16 22:04:49 +08:00
Ben Darnell d0fd7977b3 Merge pull request #2106 from minrk/pycurl-debug-str
cast pycurl debug messages to str
2017-07-15 23:26:59 -04:00
Lancher 3cc3e1332a tcpclient: Introduce connect timeout (#2094)
Fixes #1219
2017-07-15 23:13:00 -04:00
Ben Darnell b873c804f7 Merge pull request #2098 from sebbov/master
Do not send/expect Content-Length on 1xx
2017-07-15 15:56:52 -04:00
Min RK 2fdf11ce21 cast curl debug messages to str
since they come in as bytes on Python 3
2017-07-11 12:07:34 +02:00
Sebastien Boving ee76ed4d0e Handle 1xx's along 204/304's 2017-07-05 10:04:33 -07:00
Ben Darnell 0e869e3f47 Merge pull request #2075 from pitrou/accept_ebadf_race
Fix #2069: Fix race condition between accept() handler and TCPServer.stop()
2017-07-04 18:35:08 -04:00
Chris Snow e2677780aa FriendFeed website seems to have gone 2017-06-27 21:37:57 -04:00
Sebastien Boving 38e9b6ca70 Do not send/expect Content-Length on 1xx 2017-06-27 09:35:55 -07:00
Ben Darnell 52bec504f7 Merge pull request #2081 from noyainrain/fix-autoreload-module
Fix module autoreload for __main__ with relative imports
2017-06-17 22:24:50 -04:00
Sven fcc21d4e45 Apply changes from review 2017-06-16 10:43:29 +02:00
Ben Darnell a1abb710bd Merge pull request #2084 from bdarnell/docs
testing: Fix incorrect docs for gen_test
2017-06-11 14:28:10 -04:00
Ben Darnell 0e5c9a36f4 testing: Fix incorrect docs for gen_test
Pointed out in #1154
2017-06-11 13:22:10 -04:00
Ben Darnell 3a25d7a9c3 Merge pull request #2083 from bdarnell/log-cleanup
Clean up test logging
2017-06-11 09:36:00 -04:00
Antoine Pitrou 6b6d0e0673 Use getitem / setitem idiom on nonlocal list 2017-06-11 10:41:45 +02:00
Ben Darnell 1be87fddda test: Make log detection sensitive to info logs
Silence one in httpserver_test
2017-06-10 23:00:08 -04:00
Ben Darnell 427d0e65df 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.
2017-06-10 22:47:55 -04:00
Ben Darnell d68abdb4b6 Merge pull request #2082 from bdarnell/timeouterror
ioloop,gen: Unify TimeoutErrors
2017-06-10 22:12:23 -04:00
Ben Darnell edf1232c35 ioloop,gen: Unify TimeoutErrors
Fixes #1929
2017-06-10 18:29:26 -04:00
Ben Darnell 3163c606f0 Merge pull request #2077 from vladimirbright/clarify_timeouts_in_queues
Added information about timeout arg in Queue get and put methods
2017-06-10 18:13:57 -04:00
Ben Darnell 28e631ae24 Merge pull request #2074 from ploxiln/http1_connection_close
http1connection: add "Connection: close" header if appropriate
2017-06-10 17:20:14 -04:00
Ben Darnell cb8d42197f Merge pull request #2058 from jehiah/http_request_line_bad_request_2058
Return HTTP 400 on bad request lines
2017-06-10 17:18:42 -04:00
Sven 7f1a58f9fa Fix newline handling in autoreload test 2017-06-09 18:38:51 +02:00
Sven c40cdb930b 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.
2017-06-09 16:50:34 +02:00
Vladimir Prokhoda e34ea5c739 Added information about timeout arg in Queue get and put methods 2017-06-08 13:26:30 +03:00
Antoine Pitrou f7d8ad2dd6 Relax test failure when failing to reproduce the race condition 2017-06-06 11:03:22 +02:00
Antoine Pitrou 21680e20c5 Fix #2069: Fix race condition between accept() handler and TCPServer.stop() 2017-06-06 10:43:14 +02:00
Pierce Lopez 6d6d44e0fc httpserver: remove unused no_keep_alive attribute
still a parameter passed on to HTTP1Connection
2017-06-05 23:17:59 -04:00
Pierce Lopez e7cb797795 http1connection: add "Connection: close" header if appropriate
When HTTP1Connection acts as the server, it closes the connection
after writing the response if the client includes the
"Connection: close" header in the request, or if the `no_keep_alive`
option is set to True in the constructor.

According to https://tools.ietf.org/html/rfc7230#section-6.6

> The server SHOULD send a "close" connection option in its final
response on that connection.

It was possible for an Application to set the Connection header
appropriately. But it is very helpful for tornado to take care of
this automatically, particularly if "close" was specified in a
request header.
2017-06-05 13:22:01 -04:00
Ben Darnell 62e47215ce Merge pull request #2072 from bdarnell/asyncio-default
ioloop: Make asyncio the default when available
2017-06-04 10:05:41 -04:00
Ben Darnell dc7b58d8fe ioloop: Make asyncio the default when available
In addition to changing the configurable default, add a special case
in IOLoop.current() so that the current IOLoop will be backed by
the main asyncio event loop.
2017-06-03 23:43:29 -04:00