forked from tornadoweb/tornado
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
110 changed files
with
4,621 additions
and
1,335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Test coverage configuration. | ||
# Usage: | ||
# pip install coverage | ||
# coverage erase # clears previous data if any | ||
# coverage run -m tornado.test.runtests | ||
# coverage report # prints to stdout | ||
# coverage html # creates ./htmlcov/*.html including annotated source | ||
[run] | ||
branch = true | ||
source = tornado | ||
omit = | ||
tornado/platform/* | ||
tornado/test/* | ||
*/_auto2to3* | ||
|
||
[report] | ||
# Ignore missing source files, i.e. fake template-generated "files" | ||
ignore_errors = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
*.pyc | ||
*.pyo | ||
*.so | ||
*.class | ||
*~ | ||
build | ||
dist/ | ||
build/ | ||
/dist/ | ||
MANIFEST | ||
tornado.egg-info | ||
/tornado.egg-info/ | ||
_auto2to3* | ||
.tox | ||
.tox/ | ||
.vagrant | ||
/.coverage | ||
/htmlcov/ | ||
/env/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# http://travis-ci.org/#!/facebook/tornado | ||
language: python | ||
# The build of 2.6 on travis has a bug related to ssl (it segfaults in | ||
# test_sslv2_fail) | ||
python: | ||
- 2.7 | ||
- 3.2 | ||
# TODO: install pycurl, twisted, etc (depends on python version) | ||
install: | ||
- python setup.py install | ||
script: | ||
# Must cd somewhere else so python3 doesn't get confused and run | ||
# the python2 code from the current directory instead of the installed | ||
# 2to3 version. | ||
- cd maint | ||
- python -m tornado.test.runtests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env python | ||
# | ||
# Downloads a large file in chunked encoding with both curl and simple clients | ||
|
||
import logging | ||
from tornado.curl_httpclient import CurlAsyncHTTPClient | ||
from tornado.simple_httpclient import SimpleAsyncHTTPClient | ||
from tornado.ioloop import IOLoop | ||
from tornado.options import define, options, parse_command_line | ||
from tornado.web import RequestHandler, Application | ||
|
||
define('port', default=8888) | ||
define('num_chunks', default=1000) | ||
define('chunk_size', default=2048) | ||
|
||
class ChunkHandler(RequestHandler): | ||
def get(self): | ||
for i in xrange(options.num_chunks): | ||
self.write('A' * options.chunk_size) | ||
self.flush() | ||
self.finish() | ||
|
||
def main(): | ||
parse_command_line() | ||
app = Application([('/', ChunkHandler)]) | ||
app.listen(options.port, address='127.0.0.1') | ||
def callback(response): | ||
response.rethrow() | ||
assert len(response.body) == (options.num_chunks * options.chunk_size) | ||
logging.warning("fetch completed in %s seconds", response.request_time) | ||
IOLoop.instance().stop() | ||
|
||
logging.warning("Starting fetch with curl client") | ||
curl_client = CurlAsyncHTTPClient() | ||
curl_client.fetch('http://localhost:%d/' % options.port, | ||
callback=callback) | ||
IOLoop.instance().start() | ||
|
||
logging.warning("Starting fetch with simple client") | ||
simple_client = SimpleAsyncHTTPClient() | ||
simple_client.fetch('http://localhost:%d/' % options.port, | ||
callback=callback) | ||
IOLoop.instance().start() | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Dummy setup file to make tox happy. In the appengine world things aren't | ||
# installed through setup.py | ||
import distutils.core | ||
distutils.core.setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# App Engine tests require the SDK to be installed separately. | ||
# Version 1.6.1 or newer is required (older versions don't work when | ||
# python is run from a virtualenv) | ||
# | ||
# These are currently excluded from the main tox.ini because their | ||
# logs are spammy and they're a little flaky. | ||
[tox] | ||
envlist = py25-appengine, py27-appengine | ||
|
||
[testenv] | ||
changedir = {toxworkdir} | ||
|
||
[testenv:py25-appengine] | ||
basepython = python2.5 | ||
commands = python {toxinidir}/py25/runtests.py {posargs:} | ||
|
||
[testenv:py27-appengine] | ||
basepython = python2.7 | ||
commands = python {toxinidir}/py27/runtests.py {posargs:} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Frozen pip requirements for tools used in the development of tornado | ||
|
||
# Tornado's optional dependencies | ||
MySQL-python==1.2.3 | ||
Twisted==12.1.0 | ||
pycurl==7.19.0 | ||
|
||
# Other useful tools | ||
Sphinx==1.1.3 | ||
autopep8==0.6.5 | ||
coverage==3.5.2 | ||
pep8==1.2 | ||
pyflakes==0.5.0 | ||
tox==1.4 | ||
virtualenv==1.7.1.2 | ||
|
||
# Indirect dependencies | ||
Jinja2==2.6 | ||
Pygments==1.5 | ||
docutils==0.9 | ||
py==1.4.9 | ||
wsgiref==0.1.2 | ||
zope.interface==4.0.1 |
Empty file.
Oops, something went wrong.