[Python-modules-commits] [python-tornado] 01/14: Import python-tornado_4.4.0~b1.orig.tar.gz
Ondřej Nový
onovy at moszumanska.debian.org
Wed Jul 13 07:21:41 UTC 2016
This is an automated email from the git hooks/post-receive script.
onovy pushed a commit to branch master
in repository python-tornado.
commit 79df192d3e61b67beffe0f43f3ffb1c0e0f622b3
Author: Ondřej Nový <onovy at debian.org>
Date: Wed Jul 13 08:02:06 2016 +0200
Import python-tornado_4.4.0~b1.orig.tar.gz
---
.gitignore | 1 +
.travis.yml | 61 ++++----
README.rst | 2 +-
codecov.yml | 3 +
demos/facebook/facebook.py | 2 +-
demos/websocket/chatdemo.py | 2 +-
demos/webspider/webspider.py | 2 +
docs/conf.py | 2 +-
docs/guide/async.rst | 2 +-
docs/guide/coroutines.rst | 2 +-
docs/guide/intro.rst | 6 +-
docs/index.rst | 15 +-
docs/releases.rst | 1 +
docs/releases/v4.2.0.rst | 2 +-
docs/releases/v4.4.0.rst | 95 +++++++++++++
docs/web.rst | 5 +
maint/requirements.in | 29 ++++
maint/requirements.txt | 66 ++++-----
maint/scripts/custom_fixers/fix_unicode_literal.py | 23 +--
maint/test/cython/tox.ini | 3 +-
maint/test/websocket/fuzzingclient.json | 8 +-
maint/test/websocket/run-client.sh | 3 +-
maint/test/websocket/run-server.sh | 14 +-
maint/test/websocket/tox.ini | 2 +-
maint/vm/ubuntu10.04/setup.sh | 2 -
maint/vm/ubuntu10.04/tox.ini | 12 +-
maint/vm/ubuntu12.04/setup.sh | 4 +-
maint/vm/ubuntu12.04/tox.ini | 6 +-
maint/vm/windows/bootstrap.py | 2 -
maint/vm/windows/tox.ini | 17 +--
setup.py | 12 +-
tornado/__init__.py | 4 +-
tornado/_locale_data.py | 133 ++++++++---------
tornado/auth.py | 38 +++--
tornado/autoreload.py | 4 +-
tornado/concurrent.py | 12 +-
tornado/curl_httpclient.py | 5 +-
tornado/escape.py | 37 +++--
tornado/gen.py | 31 ++--
tornado/http1connection.py | 35 +++--
tornado/httpclient.py | 28 ++--
tornado/httputil.py | 50 ++++---
tornado/ioloop.py | 35 ++---
tornado/iostream.py | 8 +-
tornado/locale.py | 14 +-
tornado/locks.py | 6 +-
tornado/log.py | 12 +-
tornado/netutil.py | 27 ++--
tornado/options.py | 18 ++-
tornado/platform/asyncio.py | 11 +-
tornado/platform/auto.py | 9 +-
tornado/platform/auto.pyi | 4 +
tornado/platform/caresresolver.py | 10 +-
tornado/platform/interface.py | 3 +
tornado/platform/twisted.py | 39 ++---
tornado/platform/windows.py | 6 +-
tornado/process.py | 18 ++-
tornado/queues.py | 4 +-
tornado/simple_httpclient.py | 39 +++--
tornado/speedups.pyi | 1 +
tornado/tcpserver.py | 11 +-
tornado/template.py | 19 +--
tornado/test/auth_test.py | 19 ++-
tornado/test/concurrent_test.py | 4 +-
tornado/test/curl_httpclient_test.py | 16 ++-
tornado/test/escape_test.py | 114 +++++++--------
tornado/test/gen_test.py | 13 ++
tornado/test/http1connection_test.py | 61 ++++++++
tornado/test/httpclient_test.py | 36 ++++-
tornado/test/httpserver_test.py | 41 ++++--
tornado/test/httputil_test.py | 23 +--
tornado/test/import_test.py | 2 +-
tornado/test/ioloop_test.py | 5 +-
tornado/test/iostream_test.py | 6 +-
tornado/test/locale_test.py | 22 +--
tornado/test/log_test.py | 16 +--
tornado/test/netutil_test.py | 14 +-
tornado/test/options_test.cfg | 2 +
tornado/test/options_test.py | 30 ++--
tornado/test/process_test.py | 3 +
tornado/test/resolve_test_helper.py | 3 +-
tornado/test/runtests.py | 6 +
tornado/test/simple_httpclient_test.py | 66 ++++++---
tornado/test/template_test.py | 34 +++--
tornado/test/twisted_test.py | 131 +++++++++--------
tornado/test/util.py | 4 +-
tornado/test/util_test.py | 37 +++--
tornado/test/web_test.py | 116 ++++++++++-----
tornado/test/websocket_test.py | 18 ++-
tornado/test/windows_test.py | 25 ++++
tornado/test/wsgi_test.py | 19 ++-
tornado/testing.py | 52 +++----
tornado/util.py | 158 +++++++++++++++------
tornado/web.py | 110 +++++++++-----
tornado/websocket.py | 15 +-
tornado/wsgi.py | 6 +-
tox.ini | 41 +++---
97 files changed, 1454 insertions(+), 891 deletions(-)
diff --git a/.gitignore b/.gitignore
index 4d7fa45..968938d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@ MANIFEST
/env/
# Used in demo apps
secrets.cfg
+.mypy_cache/
diff --git a/.travis.yml b/.travis.yml
index 2e34e39..16f6183 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,40 +1,32 @@
# https://travis-ci.org/tornadoweb/tornado
language: python
python:
- - 2.6
+ - 2.7.8
- 2.7
- pypy
- - 3.2
- 3.3
- 3.4
- 3.5
- nightly
- pypy3
-env:
- - DEPS=true
- - DEPS=false
-
install:
- # always install unittest2 on py26 even if $DEPS is unset
- - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then travis_retry pip install unittest2; fi
- - if [[ $TRAVIS_PYTHON_VERSION == 2* && $DEPS == true ]]; then travis_retry pip install futures mock Monotime trollius; fi
- - if [[ $TRAVIS_PYTHON_VERSION == 'pypy' && $DEPS == true ]]; then travis_retry pip install futures mock; fi
+ - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then travis_retry pip install futures mock monotonic trollius; fi
+ - if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then travis_retry pip install futures mock; fi
# TODO(bdarnell): pycares tests are currently disabled on travis due to ipv6 issues.
- #- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* && $DEPS == true ]]; then travis_retry pip install pycares; fi
- - if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* && $DEPS == true ]]; then travis_retry pip install pycurl; fi
- - if [[ $TRAVIS_PYTHON_VERSION == '3.2' && $DEPS == true ]]; then travis_retry pip install mock; fi
+ #- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then travis_retry pip install pycares; fi
+ - if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then travis_retry pip install pycurl; fi
# Twisted runs on 2.x and 3.3+, but is flaky on pypy.
- - if [[ $TRAVIS_PYTHON_VERSION != '3.2' && $TRAVIS_PYTHON_VERSION != 'pypy'* && $DEPS == true ]]; then travis_retry pip install Twisted; fi
- - if [[ $TRAVIS_PYTHON_VERSION == '2.7' && $DEPS == true ]]; then travis_retry pip install sphinx sphinx_rtd_theme; fi
- - if [[ $TRAVIS_PYTHON_VERSION == '3.5' && $DEPS == true ]]; then travis_retry pip install sphinx sphinx_rtd_theme; fi
+ - if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then travis_retry pip install Twisted; fi
+ - if [[ $TRAVIS_PYTHON_VERSION == '2.7' || $TRAVIS_PYTHON_VERSION == '3.5' ]]; then travis_retry pip install sphinx sphinx_rtd_theme; fi
# On travis the extension should always be built
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then export TORNADO_EXTENSION=1; fi
- travis_retry python setup.py install
- # Coverage 4.0 no longer supports py32. Install an older version before
- # codecov tries to install the latest.
- - if [[ $TRAVIS_PYTHON_VERSION == '3.2' ]]; then travis_retry pip install 'coverage<4.0'; fi
- travis_retry pip install codecov
+ # Create a separate no-dependencies virtualenv to make sure all imports
+ # of optional-dependencies are guarded.
+ - virtualenv ./nodeps
+ - ./nodeps/bin/python setup.py install
- curl-config --version; pip freeze
script:
@@ -50,36 +42,35 @@ script:
# the default timeout of 5s.
- export ASYNC_TEST_TIMEOUT=15
# We use "python -m coverage" instead of the "bin/coverage" script
- # so we can pass additional arguments to python. However, this doesn't
- # work on 2.6, so skip coverage on that version.
+ # so we can pass additional arguments to python.
# coverage needs a function that was removed in python 3.6 so we can't
# run it with nightly cpython.
- - if [[ $TRAVIS_PYTHON_VERSION != 2.6 && $TRAVIS_PYTHON_VERSION != nightly ]]; then export TARGET="-m coverage run $TARGET"; fi
+ - if [[ $TRAVIS_PYTHON_VERSION != nightly ]]; then export TARGET="-m coverage run $TARGET"; fi
- python $TARGET
- python $TARGET --ioloop=tornado.platform.select.SelectIOLoop
- python -O $TARGET
- LANG=C python $TARGET
- LANG=en_US.utf-8 python $TARGET
- if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then python -bb $TARGET; fi
- - if [[ $TRAVIS_PYTHON_VERSION != pypy* && $DEPS == true ]]; then python $TARGET --resolver=tornado.netutil.ThreadedResolver; fi
- - if [[ $TRAVIS_PYTHON_VERSION == 2* && $DEPS == true ]]; then python $TARGET --httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient; fi
- - if [[ $TRAVIS_PYTHON_VERSION == 2* && $DEPS == true ]]; then python $TARGET --ioloop_time_monotonic; fi
- - if [[ $TRAVIS_PYTHON_VERSION != '3.2' && $TRAVIS_PYTHON_VERSION != 'pypy'* && $DEPS == true ]]; then python $TARGET --ioloop=tornado.platform.twisted.TwistedIOLoop; fi
+ - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then python $TARGET --resolver=tornado.netutil.ThreadedResolver; fi
+ - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient; fi
+ - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --ioloop_time_monotonic; fi
+ - if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then python $TARGET --ioloop=tornado.platform.twisted.TwistedIOLoop; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.4 || $TRAVIS_PYTHON_VERSION == 3.5 ]]; then python $TARGET --ioloop=tornado.platform.asyncio.AsyncIOLoop; fi
- - if [[ $TRAVIS_PYTHON_VERSION == 2* && $DEPS == true ]]; then python $TARGET --ioloop=tornado.platform.asyncio.AsyncIOLoop; fi
- - if [[ $TRAVIS_PYTHON_VERSION == 2* && $DEPS == true ]]; then python $TARGET --resolver=tornado.platform.twisted.TwistedResolver; fi
- #- if [[ $TRAVIS_PYTHON_VERSION != pypy* && $DEPS == true ]]; then python $TARGET --resolver=tornado.platform.caresresolver.CaresResolver; fi
- - if [[ $TRAVIS_PYTHON_VERSION == 3* && $TRAVIS_PYTHON_VERSION != '3.2' ]]; then python $TARGET --ioloop_time_monotonic; fi
+ - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --ioloop=tornado.platform.asyncio.AsyncIOLoop; fi
+ - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --resolver=tornado.platform.twisted.TwistedResolver; fi
+ #- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then python $TARGET --resolver=tornado.platform.caresresolver.CaresResolver; fi
+ - if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then python $TARGET --ioloop_time_monotonic; fi
+ - ../nodeps/bin/python -m tornado.test.runtests
# make coverage reports for Codecov to find
- - if [[ $TRAVIS_PYTHON_VERSION != 2.6 && $TRAVIS_PYTHON_VERSION != nightly ]]; then coverage xml; fi
+ - if [[ $TRAVIS_PYTHON_VERSION != nightly ]]; then coverage xml; fi
- export TORNADO_EXTENSION=0
- - if [[ $TRAVIS_PYTHON_VERSION == '3.5' && $DEPS == true ]]; then cd ../docs && mkdir sphinx-out && sphinx-build -E -n -W -b html . sphinx-out; fi
- - if [[ $TRAVIS_PYTHON_VERSION == '2.7' && $DEPS == true ]]; then cd ../docs && mkdir sphinx-doctest-out && sphinx-build -E -n -b doctest . sphinx-out; fi
- - if [[ $TRAVIS_PYTHON_VERSION == '3.5' && $DEPS == true ]]; then cd ../docs && mkdir sphinx-doctest-out && sphinx-build -E -n -b doctest . sphinx-out; fi
+ - if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then cd ../docs && mkdir sphinx-out && sphinx-build -E -n -W -b html . sphinx-out; fi
+ - if [[ $TRAVIS_PYTHON_VERSION == '2.7' || $TRAVIS_PYTHON_VERSION == '3.5' ]]; then cd ../docs && mkdir sphinx-doctest-out && sphinx-build -E -n -b doctest . sphinx-out; fi
after_success:
# call codecov from project root
- - if [[ $TRAVIS_PYTHON_VERSION != 2.6 && $TRAVIS_PYTHON_VERSION != nightly ]]; then cd ../ && codecov -e DEPS; fi
+ - if [[ $TRAVIS_PYTHON_VERSION != nightly ]]; then cd ../ && codecov; fi
# This reportedly works around an issue downloading packages from pypi on
# travis. Consider removing this after the underlying issue is fixed.
diff --git a/README.rst b/README.rst
index 80bf6e5..42e7d61 100644
--- a/README.rst
+++ b/README.rst
@@ -5,7 +5,7 @@ Tornado Web Server
asynchronous networking library, originally developed at `FriendFeed
<http://friendfeed.com>`_. By using non-blocking network I/O, Tornado
can scale to tens of thousands of open connections, making it ideal for
-`long polling <http://en.wikipedia.org/wiki/Push_technology#Long_polling>`_,
+`long polling <http://en.wikipedia.org/wiki/Push_technology#Long_Polling>`_,
`WebSockets <http://en.wikipedia.org/wiki/WebSocket>`_, and other
applications that require a long-lived connection to each user.
diff --git a/codecov.yml b/codecov.yml
new file mode 100644
index 0000000..dd8d3b6
--- /dev/null
+++ b/codecov.yml
@@ -0,0 +1,3 @@
+comment: off
+coverage:
+ status: off
diff --git a/demos/facebook/facebook.py b/demos/facebook/facebook.py
index ace0705..caf4c6f 100755
--- a/demos/facebook/facebook.py
+++ b/demos/facebook/facebook.py
@@ -89,7 +89,7 @@ class AuthLoginHandler(BaseHandler, tornado.auth.FacebookGraphMixin):
return
self.authorize_redirect(redirect_uri=my_url,
client_id=self.settings["facebook_api_key"],
- extra_params={"scope": "read_stream"})
+ extra_params={"scope": "user_posts"})
def _on_auth(self, user):
if not user:
diff --git a/demos/websocket/chatdemo.py b/demos/websocket/chatdemo.py
index aac24d9..5642f1f 100755
--- a/demos/websocket/chatdemo.py
+++ b/demos/websocket/chatdemo.py
@@ -44,7 +44,7 @@ class Application(tornado.web.Application):
static_path=os.path.join(os.path.dirname(__file__), "static"),
xsrf_cookies=True,
)
- tornado.web.Application.__init__(self, handlers, **settings)
+ super(Application, self).__init__(handlers, **settings)
class MainHandler(tornado.web.RequestHandler):
diff --git a/demos/webspider/webspider.py b/demos/webspider/webspider.py
index b6468b8..cc0a19b 100644
--- a/demos/webspider/webspider.py
+++ b/demos/webspider/webspider.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
import time
from datetime import timedelta
diff --git a/docs/conf.py b/docs/conf.py
index 1fbfa68..a12e7a4 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -93,7 +93,7 @@ extlinks = {
}
intersphinx_mapping = {
- 'python': ('https://docs.python.org/3.4/', None),
+ 'python': ('https://docs.python.org/3.5/', None),
}
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
diff --git a/docs/guide/async.rst b/docs/guide/async.rst
index 6a3e26b..53e58e5 100644
--- a/docs/guide/async.rst
+++ b/docs/guide/async.rst
@@ -131,7 +131,7 @@ the original synchronous version:
:hide:
The statement ``raise gen.Return(response.body)`` is an artifact of
-Python 2 (and 3.2), in which generators aren't allowed to return
+Python 2, in which generators aren't allowed to return
values. To overcome this, Tornado coroutines raise a special kind of
exception called a `.Return`. The coroutine catches this exception and
treats it like a returned value. In Python 3.3 and later, a ``return
diff --git a/docs/guide/coroutines.rst b/docs/guide/coroutines.rst
index 9c5745d..2fefcb4 100644
--- a/docs/guide/coroutines.rst
+++ b/docs/guide/coroutines.rst
@@ -242,7 +242,7 @@ Looping is tricky with coroutines since there is no way in Python
to ``yield`` on every iteration of a ``for`` or ``while`` loop and
capture the result of the yield. Instead, you'll need to separate
the loop condition from accessing the results, as in this example
-from `Motor <http://motor.readthedocs.org/en/stable/>`_::
+from `Motor <https://motor.readthedocs.io/en/stable/>`_::
import motor
db = motor.MotorClient().test
diff --git a/docs/guide/intro.rst b/docs/guide/intro.rst
index ba28c77..d5b975d 100644
--- a/docs/guide/intro.rst
+++ b/docs/guide/intro.rst
@@ -15,9 +15,9 @@ Tornado can be roughly divided into four major components:
create web applications, and various supporting classes).
* Client- and server-side implementions of HTTP (`.HTTPServer` and
`.AsyncHTTPClient`).
-* An asynchronous networking library (`.IOLoop` and `.IOStream`),
- which serve as the building blocks for the HTTP components and can
- also be used to implement other protocols.
+* An asynchronous networking library including the classes `.IOLoop`
+ and `.IOStream`, which serve as the building blocks for the HTTP
+ components and can also be used to implement other protocols.
* A coroutine library (`tornado.gen`) which allows asynchronous
code to be written in a more straightforward way than chaining
callbacks.
diff --git a/docs/index.rst b/docs/index.rst
index 577be15..d7f435d 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -79,16 +79,12 @@ copy of the source tarball as well.
The Tornado source code is `hosted on GitHub
<https://github.com/tornadoweb/tornado>`_.
-**Prerequisites**: Tornado 4.3 runs on Python 2.6, 2.7, and 3.2+
-(support for Python 2.6 and 3.2 is deprecated and will be removed in
-the next release). For Python 2, version 2.7.9 or newer is *strongly*
+**Prerequisites**: Tornado 4.3 runs on Python 2.7, and 3.3+
+For Python 2, version 2.7.9 or newer is *strongly*
recommended for the improved SSL support. In addition to the requirements
which will be installed automatically by ``pip`` or ``setup.py install``,
the following optional packages may be useful:
-* `unittest2 <https://pypi.python.org/pypi/unittest2>`_ is needed to run
- Tornado's test suite on Python 2.6 (it is unnecessary on more recent
- versions of Python)
* `concurrent.futures <https://pypi.python.org/pypi/futures>`_ is the
recommended thread pool for use with Tornado and enables the use of
`~tornado.netutil.ThreadedResolver`. It is needed only on Python 2;
@@ -101,9 +97,10 @@ the following optional packages may be useful:
* `pycares <https://pypi.python.org/pypi/pycares>`_ is an alternative
non-blocking DNS resolver that can be used when threads are not
appropriate.
-* `Monotime <https://pypi.python.org/pypi/Monotime>`_ adds support for
- a monotonic clock, which improves reliability in environments
- where clock adjustments are frequent. No longer needed in Python 3.3.
+* `monotonic <https://pypi.python.org/pypi/monotonic>`_ or `Monotime
+ <https://pypi.python.org/pypi/Monotime>`_ add support for a
+ monotonic clock, which improves reliability in environments where
+ clock adjustements are frequent. No longer needed in Python 3.3.
**Platforms**: Tornado should run on any Unix-like platform, although
for the best performance and scalability only Linux (with ``epoll``)
diff --git a/docs/releases.rst b/docs/releases.rst
index 111a28a..cb2c026 100644
--- a/docs/releases.rst
+++ b/docs/releases.rst
@@ -4,6 +4,7 @@ Release notes
.. toctree::
:maxdepth: 2
+ releases/v4.4.0
releases/v4.3.0
releases/v4.2.1
releases/v4.2.0
diff --git a/docs/releases/v4.2.0.rst b/docs/releases/v4.2.0.rst
index 10f475c..d948437 100644
--- a/docs/releases/v4.2.0.rst
+++ b/docs/releases/v4.2.0.rst
@@ -23,7 +23,7 @@ New modules: `tornado.locks` and `tornado.queues`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
These modules provide classes for coordinating coroutines, merged from
-`Toro <http://toro.readthedocs.org>`_.
+`Toro <https://toro.readthedocs.io>`_.
To port your code from Toro's queues to Tornado 4.2, import `.Queue`,
`.PriorityQueue`, or `.LifoQueue` from `tornado.queues` instead of from
diff --git a/docs/releases/v4.4.0.rst b/docs/releases/v4.4.0.rst
new file mode 100644
index 0000000..caa62e1
--- /dev/null
+++ b/docs/releases/v4.4.0.rst
@@ -0,0 +1,95 @@
+What's new in Tornado 4.4
+=========================
+
+In progress
+-----------
+
+General
+~~~~~~~
+
+* Tornado now requires Python 2.7 or 3.3+; versions 2.6 and 3.2 are no
+ longer supported. Pypy3 is still supported even though its latest
+ release is mainly based on Python 3.2.
+* The `monotonic <https://pypi.python.org/pypi/monotonic>`_ package is
+ now supported as an alternative to `Monotime
+ <https://pypi.python.org/pypi/Monotime>`_ for monotonic clock support
+ on Python 2.
+
+``tornado.curl_httpclient``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+* Failures in ``_curl_setup_request`` no longer cause the
+ ``max_clients`` pool to be exhausted.
+* Non-ascii header values are now handled correctly.
+
+`tornado.gen`
+~~~~~~~~~~~~~
+
+* `.with_timeout` now accepts any yieldable object (except
+ `.YieldPoint`), not just `tornado.concurrent.Future`.
+
+`tornado.httpclient`
+~~~~~~~~~~~~~~~~~~~~
+
+* The errors raised by timeouts now indicate what state the request
+ was in; the error message is no longer simply "599 Timeout".
+* Calling `repr` on a `tornado.httpclient.HTTPError` no longer raises
+ an error.
+
+`tornado.httpserver`
+~~~~~~~~~~~~~~~~~~~~
+
+* Int-like enums (including `http.HTTPStatus`) can now be used as
+ status codes.
+* Responses with status code ``204 No Content`` no longer emit a
+ ``Content-Length: 0`` header.
+
+`tornado.ioloop`
+~~~~~~~~~~~~~~~~
+
+* Improved performance when there are large numbers of active timeouts.
+
+`tornado.netutil`
+~~~~~~~~~~~~~~~~~
+
+* All included `.Resolver` implementations raise `IOError` (or a
+ subclass) for any resolution failure.
+
+`tornado.options`
+~~~~~~~~~~~~~~~~~
+
+* Options can now be modified with subscript syntax in addition to
+ attribute syntax.
+* The special variable ``__file__`` is now available inside config files.
+
+``tornado.simple_httpclient``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+* HTTP/1.0 (not 1.1) responses without a ``Content-Length`` header now
+ work correctly.
+
+`tornado.tcpserver`
+~~~~~~~~~~~~~~~~~~~
+
+* `.TCPServer.bind` now accepts a ``reuse_port`` argument.
+
+`tornado.testing`
+~~~~~~~~~~~~~~~~~
+
+* Test sockets now always use ``127.0.0.1`` instead of ``localhost``.
+ This avoids conflicts when the automatically-assigned port is
+ available on IPv4 but not IPv6, or in unusual network configurations
+ when ``localhost`` has multiple IP addresses.
+
+`tornado.web`
+~~~~~~~~~~~~~
+
+* ``image/svg+xml`` is now on the list of compressible mime types.
+* Fixed an error on Python 3 when compression is used with multiple
+ ``Vary`` headers.
+
+`tornado.websocket`
+~~~~~~~~~~~~~~~~~~~
+
+* ``WebSocketHandler.__init__`` now uses `super`, which improves
+ support for multiple inheritance.
diff --git a/docs/web.rst b/docs/web.rst
index a204e9d..dbbc13c 100644
--- a/docs/web.rst
+++ b/docs/web.rst
@@ -25,6 +25,11 @@
These methods can be made asynchronous with one of the following
decorators: `.gen.coroutine`, `.return_future`, or `asynchronous`.
+ The arguments to these methods come from the `.URLSpec`: Any
+ capturing groups in the regular expression become arguments to the
+ HTTP verb methods (keyword arguments if the group is named,
+ positional arguments if its unnamed).
+
To support a method not on this list, override the class variable
``SUPPORTED_METHODS``::
diff --git a/maint/requirements.in b/maint/requirements.in
new file mode 100644
index 0000000..64beb5f
--- /dev/null
+++ b/maint/requirements.in
@@ -0,0 +1,29 @@
+# Requirements for tools used in the development of tornado.
+# This list is for python 3.5; for 2.7 add:
+# - backports.ssl-match-hostname
+# - futures
+# - mock
+# - certifi
+#
+# Use virtualenv instead of venv; tox seems to get confused otherwise.
+#
+# maint/requirements.txt contains the pinned versions of all direct and
+# indirect dependencies; this file only contains direct dependencies
+# and is useful for upgrading.
+
+# Tornado's optional dependencies
+Twisted
+pycares
+pycurl
+
+# Other useful tools
+Sphinx
+autopep8
+coverage
+flake8
+pep8
+pyflakes
+sphinx-rtd-theme
+tox
+twine
+virtualenv
diff --git a/maint/requirements.txt b/maint/requirements.txt
index a3080c4..1a7bf45 100644
--- a/maint/requirements.txt
+++ b/maint/requirements.txt
@@ -1,46 +1,30 @@
-# Frozen pip requirements for tools used in the development of tornado.
-# This list is for python 3.5; for 2.7 add:
-# - backports.ssl-match-hostname
-# - futures
-# - mock
-#
-# Use virtualenv instead of venv; tox seems to get confused otherwise.
-
-# Tornado's required dependencies
-certifi==2015.9.6.2
-
-# Tornado's optional dependencies
-Twisted==15.4.0
-pycares==1.0.0
-pycurl==7.19.5.1
-
-# Other useful tools
-Sphinx==1.3.1
-autopep8==1.2.1
-coverage==4.0
-flake8==2.4.1
-pep8==1.6.2
-pyflakes==1.0.0
-sphinx-rtd-theme==0.1.9
-tox==2.1.1
-twine==1.6.2
-virtualenv==13.1.2
-
-# Indirect dependencies
-alabaster==0.7.6
-Babel==2.1.1
+alabaster==0.7.7
+autopep8==1.2.2
+Babel==2.3.2
+coverage==4.0.3
docutils==0.12
+flake8==2.5.4
+imagesize==0.7.0
Jinja2==2.8
MarkupSafe==0.23
-mccabe==0.3.1
+mccabe==0.4.0
+pep8==1.7.0
pkginfo==1.2.1
pluggy==0.3.1
-py==1.4.30
-Pygments==2.0.2
-pytz==2015.6
-requests==2.7.0
-requests-toolbelt==0.4.0
-six==1.9.0
-snowballstemmer==1.2.0
-wheel==0.24.0
-zope.interface==4.1.2
+py==1.4.31
+pycares==1.0.0
+pycurl==7.43.0
+pyflakes==1.1.0
+Pygments==2.1.3
+pytz==2016.3
+requests==2.9.1
+requests-toolbelt==0.6.0
+six==1.10.0
+snowballstemmer==1.2.1
+Sphinx==1.4
+sphinx-rtd-theme==0.1.9
+tox==2.3.1
+twine==1.6.5
+Twisted==16.1.0
+virtualenv==15.0.1
+zope.interface==4.1.3
diff --git a/maint/scripts/custom_fixers/fix_unicode_literal.py b/maint/scripts/custom_fixers/fix_unicode_literal.py
index 560c277..2c56b29 100644
--- a/maint/scripts/custom_fixers/fix_unicode_literal.py
+++ b/maint/scripts/custom_fixers/fix_unicode_literal.py
@@ -1,18 +1,19 @@
-import re
-from lib2to3.pgen2 import token
from lib2to3 import fixer_base
-from lib2to3.fixer_util import Name, Call
-
-_literal_re = re.compile(r"[uU][rR]?[\'\"]")
+from lib2to3.fixer_util import String
class FixUnicodeLiteral(fixer_base.BaseFix):
BM_compatible = True
- PATTERN = """STRING"""
+ PATTERN = """
+ power< 'u'
+ trailer<
+ '('
+ arg=any
+ ')'
+ >
+ >
+ """
def transform(self, node, results):
- if node.type == token.STRING and _literal_re.match(node.value):
- new = node.clone()
- new.value = new.value[1:]
- new.prefix = ''
- node.replace(Call(Name(u'u', prefix=node.prefix), [new]))
+ arg = results["arg"]
+ node.replace(String('u'+arg.value, prefix=node.prefix))
diff --git a/maint/test/cython/tox.ini b/maint/test/cython/tox.ini
index 8f5b20b..c0f27c9 100644
--- a/maint/test/cython/tox.ini
+++ b/maint/test/cython/tox.ini
@@ -1,6 +1,6 @@
[tox]
# This currently segfaults on pypy.
-envlist = py27,py32,py33,py34,py35
+envlist = py27,py33,py34,py35
[testenv]
deps =
@@ -13,7 +13,6 @@ commands = python -m unittest cythonapp_test
# defaults for the others.
basepython =
py27: python2.7
- py32: python3.2
py33: python3.3
py34: python3.4
py35: python3.5
diff --git a/maint/test/websocket/fuzzingclient.json b/maint/test/websocket/fuzzingclient.json
index 9e07e83..7b4cb31 100644
--- a/maint/test/websocket/fuzzingclient.json
+++ b/maint/test/websocket/fuzzingclient.json
@@ -3,13 +3,11 @@
"outdir": "./reports/servers",
"servers": [
- {"agent": "Tornado/py26", "url": "ws://localhost:9001",
+ {"agent": "Tornado/py27", "url": "ws://localhost:9001",
"options": {"version": 18}},
- {"agent": "Tornado/py27", "url": "ws://localhost:9002",
+ {"agent": "Tornado/py35", "url": "ws://localhost:9002",
"options": {"version": 18}},
- {"agent": "Tornado/py32", "url": "ws://localhost:9003",
- "options": {"version": 18}},
- {"agent": "Tornado/pypy", "url": "ws://localhost:9004",
+ {"agent": "Tornado/pypy", "url": "ws://localhost:9003",
"options": {"version": 18}}
],
diff --git a/maint/test/websocket/run-client.sh b/maint/test/websocket/run-client.sh
index 9ed974a..bd35f4d 100755
--- a/maint/test/websocket/run-client.sh
+++ b/maint/test/websocket/run-client.sh
@@ -9,9 +9,8 @@ FUZZING_SERVER_PID=$!
sleep 1
-.tox/py26/bin/python client.py --name='Tornado/py26'
.tox/py27/bin/python client.py --name='Tornado/py27'
-.tox/py32/bin/python client.py --name='Tornado/py32'
+.tox/py35/bin/python client.py --name='Tornado/py35'
.tox/pypy/bin/python client.py --name='Tornado/pypy'
kill $FUZZING_SERVER_PID
diff --git a/maint/test/websocket/run-server.sh b/maint/test/websocket/run-server.sh
index 95a14ea..2a83871 100755
--- a/maint/test/websocket/run-server.sh
+++ b/maint/test/websocket/run-server.sh
@@ -12,25 +12,21 @@ set -e
# build/update the virtualenvs
tox
-.tox/py26/bin/python server.py --port=9001 &
-PY26_SERVER_PID=$!
-
-.tox/py27/bin/python server.py --port=9002 &
+.tox/py27/bin/python server.py --port=9001 &
PY27_SERVER_PID=$!
-.tox/py32/bin/python server.py --port=9003 &
-PY32_SERVER_PID=$!
+.tox/py35/bin/python server.py --port=9002 &
+PY35_SERVER_PID=$!
-.tox/pypy/bin/python server.py --port=9004 &
+.tox/pypy/bin/python server.py --port=9003 &
PYPY_SERVER_PID=$!
sleep 1
.tox/py27/bin/wstest -m fuzzingclient
-kill $PY26_SERVER_PID
kill $PY27_SERVER_PID
-kill $PY32_SERVER_PID
+kill $PY35_SERVER_PID
kill $PYPY_SERVER_PID
wait
diff --git a/maint/test/websocket/tox.ini b/maint/test/websocket/tox.ini
index 6960741..289d127 100644
--- a/maint/test/websocket/tox.ini
+++ b/maint/test/websocket/tox.ini
@@ -2,7 +2,7 @@
# to install autobahn and build the speedups module.
# See run.sh for the real test runner.
[tox]
-envlist = py27, py32, py26, pypy
+envlist = py27, py35, pypy
setupdir=../../..
[testenv]
diff --git a/maint/vm/ubuntu10.04/setup.sh b/maint/vm/ubuntu10.04/setup.sh
index 64c5250..14dcb95 100644
--- a/maint/vm/ubuntu10.04/setup.sh
+++ b/maint/vm/ubuntu10.04/setup.sh
@@ -26,8 +26,6 @@ apt-get update
DEADSNAKES_PACKAGES="
python2.7
python2.7-dev
-python3.2
-python3.2-dev
"
apt-get -y install $DEADSNAKES_PACKAGES
diff --git a/maint/vm/ubuntu10.04/tox.ini b/maint/vm/ubuntu10.04/tox.ini
index 21944e8..df3d5df 100644
--- a/maint/vm/ubuntu10.04/tox.ini
+++ b/maint/vm/ubuntu10.04/tox.ini
@@ -1,21 +1,11 @@
[tox]
-envlist = py27-full, py32, py26, py26-full, py27
+envlist = py27-full, py27
setupdir=/tornado
toxworkdir=/home/vagrant/tox-tornado
[testenv]
commands = python -m tornado.test.runtests {posargs:}
-[testenv:py26]
-deps = unittest2
-
-[testenv:py26-full]
-deps =
- futures
- pycurl
- twisted==11.0.0
- unittest2
-
[testenv:py27-full]
basepython = python2.7
deps =
diff --git a/maint/vm/ubuntu12.04/setup.sh b/maint/vm/ubuntu12.04/setup.sh
index 3c8728a..df820b9 100644
--- a/maint/vm/ubuntu12.04/setup.sh
+++ b/maint/vm/ubuntu12.04/setup.sh
@@ -24,8 +24,8 @@ add-apt-repository ppa:fkrull/deadsnakes
apt-get update
DEADSNAKES_PACKAGES="
-python3.2
-python3.2-dev
+python3.5
+python3.5-dev
"
apt-get -y install $DEADSNAKES_PACKAGES
diff --git a/maint/vm/ubuntu12.04/tox.ini b/maint/vm/ubuntu12.04/tox.ini
index 2a323ea..b3e51a7 100644
--- a/maint/vm/ubuntu12.04/tox.ini
+++ b/maint/vm/ubuntu12.04/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py27-full, py32, py27, py27-select, py27-twisted
+envlist = py27-full, py27, py27-select, py27-twisted
setupdir=/tornado
toxworkdir=/home/vagrant/tox-tornado
@@ -28,7 +28,3 @@ deps =
pycurl
twisted==12.2.0
commands = python -m tornado.test.runtests --ioloop=tornado.platform.twisted.TwistedIOLoop {posargs:}
-
-[testenv:py32]
-basepython = python3.2
-commands = python -bb -m tornado.test.runtests {posargs:}
\ No newline at end of file
diff --git a/maint/vm/windows/bootstrap.py b/maint/vm/windows/bootstrap.py
index 669981c..3f12aed 100644
--- a/maint/vm/windows/bootstrap.py
+++ b/maint/vm/windows/bootstrap.py
@@ -28,9 +28,7 @@ import urllib
TMPDIR = r'c:\tornado_bootstrap'
PYTHON_VERSIONS = [
- (r'c:\python26\python.exe', 'http://www.python.org/ftp/python/2.6.6/python-2.6.6.msi'),
(r'c:\python27\python.exe', 'http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi'),
- (r'c:\python32\python.exe', 'http://www.python.org/ftp/python/3.2.3/python-3.2.3.msi'),
(r'c:\python33\python.exe', 'http://www.python.org/ftp/python/3.3.0/python-3.3.0.msi'),
]
diff --git a/maint/vm/windows/tox.ini b/maint/vm/windows/tox.ini
index ec7c571..7a7ced3 100644
--- a/maint/vm/windows/tox.ini
+++ b/maint/vm/windows/tox.ini
@@ -1,32 +1,17 @@
[tox]
-envlist = py27-full, py32-full, py26, py26-full, py27, py32, py33, py27-opt, py33-monotonic
+envlist = py27-full, py27, py33, py27-opt, py33-monotonic
setupdir = e:\
toxworkdir = c:\tox-tornado
[testenv]
commands = python -m tornado.test.runtests {posargs:}
-[testenv:py26]
-deps = unittest2
-
-[testenv:py26-full]
-basepython = python2.6
-deps =
- futures
- mock
- unittest2
-
[testenv:py27-full]
basepython = python2.7
deps =
futures
mock
-[testenv:py32-full]
-basepython = python3.2
-deps =
- mock
-
[testenv:py33]
# tox's path mappings haven't been updated for py33 yet.
basepython = c:\python33\python.exe
diff --git a/setup.py b/setup.py
index a6c7495..a64bc3a 100644
--- a/setup.py
+++ b/setup.py
@@ -60,10 +60,14 @@ Debian and Ubuntu users should issue the following command:
$ sudo apt-get install build-essential python-dev
-RedHat, CentOS, and Fedora users should issue the following command:
+RedHat and CentOS users should issue the following command:
$ sudo yum install gcc python-devel
+Fedora users should issue the following command:
+
+ $ sudo dnf install gcc python-devel
+
If you are seeing this message on OSX please read the documentation
here:
@@ -99,7 +103,7 @@ http://api.mongodb.org/python/current/installation.html#osx
kwargs = {}
-version = "4.3"
+version = "4.4b1"
with open('README.rst') as f:
kwargs['long_description'] = f.read()
@@ -125,7 +129,7 @@ if setuptools is not None:
if sys.version_info < (2, 7):
# Only needed indirectly, for singledispatch.
install_requires.append('ordereddict')
- if sys.version_info < (3, 2):
+ if sys.version_info < (2, 7, 9):
install_requires.append('backports.ssl_match_hostname')
if sys.version_info < (3, 4):
install_requires.append('singledispatch')
@@ -170,10 +174,8 @@ setup(
classifiers=[
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: Implementation :: CPython',
diff --git a/tornado/__init__.py b/tornado/__init__.py
index 85bacc7..7fe00e1 100644
--- a/tornado/__init__.py
+++ b/tornado/__init__.py
@@ -25,5 +25,5 @@ from __future__ import absolute_import, division, print_function, with_statement
# is zero for an official release, positive for a development branch,
# or negative for a release candidate or beta (after the base version
# number has been incremented)
-version = "4.3"
-version_info = (4, 3, 0, 0)
+version = "4.4b1"
+version_info = (4, 4, 0, -99)
diff --git a/tornado/_locale_data.py b/tornado/_locale_data.py
index 47c1df6..e073afe 100644
--- a/tornado/_locale_data.py
+++ b/tornado/_locale_data.py
@@ -19,76 +19,67 @@
from __future__ import absolute_import, division, print_function, with_statement
-# NOTE: This file is supposed to contain unicode strings, which is
-# exactly what you'd get with e.g. u"Español" in most python versions.
-# However, Python 3.2 doesn't support the u"" syntax, so we use a u()
-# function instead. tornado.util.u cannot be used because it doesn't
-# support non-ascii characters on python 2.
-# When we drop support for Python 3.2, we can remove the parens
-# and make these plain unicode strings.
-from tornado.escape import to_unicode as u
-
LOCALE_NAMES = {
- "af_ZA": {"name_en": u("Afrikaans"), "name": u("Afrikaans")},
- "am_ET": {"name_en": u("Amharic"), "name": u("አማርኛ")},
- "ar_AR": {"name_en": u("Arabic"), "name": u("العربية")},
- "bg_BG": {"name_en": u("Bulgarian"), "name": u("Български")},
- "bn_IN": {"name_en": u("Bengali"), "name": u("বাংলা")},
- "bs_BA": {"name_en": u("Bosnian"), "name": u("Bosanski")},
- "ca_ES": {"name_en": u("Catalan"), "name": u("Català")},
- "cs_CZ": {"name_en": u("Czech"), "name": u("Čeština")},
- "cy_GB": {"name_en": u("Welsh"), "name": u("Cymraeg")},
- "da_DK": {"name_en": u("Danish"), "name": u("Dansk")},
- "de_DE": {"name_en": u("German"), "name": u("Deutsch")},
- "el_GR": {"name_en": u("Greek"), "name": u("Ελληνικά")},
- "en_GB": {"name_en": u("English (UK)"), "name": u("English (UK)")},
- "en_US": {"name_en": u("English (US)"), "name": u("English (US)")},
- "es_ES": {"name_en": u("Spanish (Spain)"), "name": u("Español (España)")},
- "es_LA": {"name_en": u("Spanish"), "name": u("Español")},
- "et_EE": {"name_en": u("Estonian"), "name": u("Eesti")},
- "eu_ES": {"name_en": u("Basque"), "name": u("Euskara")},
- "fa_IR": {"name_en": u("Persian"), "name": u("فارسی")},
- "fi_FI": {"name_en": u("Finnish"), "name": u("Suomi")},
- "fr_CA": {"name_en": u("French (Canada)"), "name": u("Français (Canada)")},
- "fr_FR": {"name_en": u("French"), "name": u("Français")},
- "ga_IE": {"name_en": u("Irish"), "name": u("Gaeilge")},
- "gl_ES": {"name_en": u("Galician"), "name": u("Galego")},
- "he_IL": {"name_en": u("Hebrew"), "name": u("עברית")},
- "hi_IN": {"name_en": u("Hindi"), "name": u("हिन्दी")},
- "hr_HR": {"name_en": u("Croatian"), "name": u("Hrvatski")},
- "hu_HU": {"name_en": u("Hungarian"), "name": u("Magyar")},
- "id_ID": {"name_en": u("Indonesian"), "name": u("Bahasa Indonesia")},
... 4651 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-tornado.git
More information about the Python-modules-commits
mailing list