]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
*: Remove Python2 __future__ imports throughout the codebase 2443/head
authorBen Darnell <ben@bendarnell.com>
Sat, 14 Jul 2018 15:46:28 +0000 (11:46 -0400)
committerBen Darnell <ben@bendarnell.com>
Sat, 14 Jul 2018 20:58:48 +0000 (16:58 -0400)
81 files changed:
demos/file_upload/file_uploader.py
demos/tcpecho/client.py
maint/circlerefs/circlerefs.py
maint/scripts/test_resolvers.py
maint/vm/windows/bootstrap.py
tornado/__init__.py
tornado/_locale_data.py
tornado/auth.py
tornado/autoreload.py
tornado/concurrent.py
tornado/curl_httpclient.py
tornado/escape.py
tornado/gen.py
tornado/http1connection.py
tornado/httpclient.py
tornado/httpserver.py
tornado/httputil.py
tornado/ioloop.py
tornado/iostream.py
tornado/locale.py
tornado/locks.py
tornado/log.py
tornado/netutil.py
tornado/options.py
tornado/platform/asyncio.py
tornado/platform/auto.py
tornado/platform/caresresolver.py
tornado/platform/interface.py
tornado/platform/posix.py
tornado/platform/twisted.py
tornado/platform/windows.py
tornado/process.py
tornado/queues.py
tornado/routing.py
tornado/simple_httpclient.py
tornado/tcpclient.py
tornado/tcpserver.py
tornado/template.py
tornado/test/__main__.py
tornado/test/asyncio_test.py
tornado/test/auth_test.py
tornado/test/autoreload_test.py
tornado/test/concurrent_test.py
tornado/test/curl_httpclient_test.py
tornado/test/escape_test.py
tornado/test/gen_test.py
tornado/test/gettext_translations/extract_me.py
tornado/test/http1connection_test.py
tornado/test/httpclient_test.py
tornado/test/httpserver_test.py
tornado/test/httputil_test.py
tornado/test/import_test.py
tornado/test/ioloop_test.py
tornado/test/iostream_test.py
tornado/test/locale_test.py
tornado/test/locks_test.py
tornado/test/log_test.py
tornado/test/netutil_test.py
tornado/test/options_test.py
tornado/test/process_test.py
tornado/test/queues_test.py
tornado/test/resolve_test_helper.py
tornado/test/routing_test.py
tornado/test/runtests.py
tornado/test/simple_httpclient_test.py
tornado/test/tcpclient_test.py
tornado/test/tcpserver_test.py
tornado/test/template_test.py
tornado/test/testing_test.py
tornado/test/twisted_test.py
tornado/test/util.py
tornado/test/util_test.py
tornado/test/web_test.py
tornado/test/websocket_test.py
tornado/test/windows_test.py
tornado/test/wsgi_test.py
tornado/testing.py
tornado/util.py
tornado/web.py
tornado/websocket.py
tornado/wsgi.py

index 9f1f84d516c25e02609262d8cc2c90c15766b10e..179eb248e7f07e395e491833e96c717d0a9e605a 100755 (executable)
@@ -9,7 +9,6 @@ single file without encoding.
 See also file_receiver.py in this directory, a server that receives uploads.
 """
 
-from __future__ import print_function
 import mimetypes
 import os
 import sys
index 51d3a8d5f234c3c0e3f151a0a2210318a8337d74..a2ead08bc82eb6c7493589e7d42048325b446e09 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/env python
 
-from __future__ import print_function
 from tornado.ioloop import IOLoop
 from tornado import gen
 from tornado.tcpclient import TCPClient
index 5cc4e1f6de72e1078ff4da1f0423320f258808bd..bd8214aa82f211db3d515388644fa04e86d09acb 100755 (executable)
@@ -7,7 +7,6 @@ path from being used and instead rely on the slower full GC. This
 increases memory footprint and CPU overhead, so we try to eliminate
 circular references created by normal operation.
 """
-from __future__ import print_function
 
 import gc
 import traceback
index 2a466c1ac9d06a888bc596e5036469167392e42c..82dec30e669fda7e6ec3c537dab31e104728df9b 100755 (executable)
@@ -1,6 +1,4 @@
 #!/usr/bin/env python
-from __future__ import print_function
-
 import pprint
 import socket
 
index 281bf573cf62a15d6853c28393ab4b5581870ca9..9bfb5c72302a5676ecca572c481ef49786f653ff 100755 (executable)
@@ -21,7 +21,6 @@ To run the tests with tox, cd to e:\maint\vm\windows and run
 To run under cygwin (which must be installed separately), run
   cd /cygdrive/e; python -m tornado.test.runtests
 """
-from __future__ import absolute_import, division, print_function
 
 import os
 import subprocess
index ae8fd99878559f9b70b000ea5681ebdb9804ef4f..e6c4505930a4d15b7582f99591bacafdf4db9d97 100644 (file)
@@ -15,8 +15,6 @@
 
 """The Tornado web server and tools."""
 
-from __future__ import absolute_import, division, print_function
-
 # version is a human-readable version number.
 
 # version_info is a four-tuple for programmatic comparison. The first
index a2c503907d4324f00acbe0afead1436189533d44..91416d9b45ee3933a91f518883de657f218d95f9 100644 (file)
@@ -16,8 +16,6 @@
 
 """Data used by the tornado.locale module."""
 
-from __future__ import absolute_import, division, print_function
-
 LOCALE_NAMES = {
     "af_ZA": {"name_en": u"Afrikaans", "name": u"Afrikaans"},
     "am_ET": {"name_en": u"Amharic", "name": u"አማርኛ"},
index a3fd7943c56cf9155068a1b864124c71c8732917..35d5ee203f74f6bd3500d30403f892e4ae51a241 100644 (file)
@@ -56,8 +56,6 @@ Example usage for Google OAuth:
 
 """
 
-from __future__ import absolute_import, division, print_function
-
 import base64
 import binascii
 import hashlib
index 9c5b2326bc8e670640fb81d9e16ccca137849700..01951fccf265227ff5a8c08b7bde58d51a2d1b6a 100644 (file)
@@ -43,8 +43,6 @@ incorrectly.
 
 """
 
-from __future__ import absolute_import, division, print_function
-
 import os
 import sys
 
index 37d58e86535002bb3799a44a330119694bfff080..7c2679dd2c033fbc7c4c7c06e0b2deb86783ef93 100644 (file)
@@ -26,7 +26,6 @@ While this package is an important part of Tornado's internal
 implementation, applications rarely need to interact with it
 directly.
 """
-from __future__ import absolute_import, division, print_function
 
 import asyncio
 from concurrent import futures
index b412897f6e8d01709639f5b5284259c91dccec10..13e1f136c9683e2b8fac588993eed10ad55d4f18 100644 (file)
@@ -15,8 +15,6 @@
 
 """Non-blocking HTTP client implementation using pycurl."""
 
-from __future__ import absolute_import, division, print_function
-
 import collections
 import functools
 import logging
index 6ca81584e0118e86be94528cd156591f545c84a2..382133f5b5920b47759999d9683b79780ce7d5b7 100644 (file)
@@ -19,8 +19,6 @@ Also includes a few other miscellaneous string manipulation functions that
 have crept in over time.
 """
 
-from __future__ import absolute_import, division, print_function
-
 import html.entities
 import json
 import re
index e5ff49832bf925fbf64c2110c2f4ba01facfd3d0..982cb8dfc6f61bea9e1fedb1fc3c96ceb359cd2d 100644 (file)
@@ -70,8 +70,6 @@ See the `convert_yielded` function to extend this mechanism.
    via ``singledispatch``.
 
 """
-from __future__ import absolute_import, division, print_function
-
 import asyncio
 import builtins
 import collections
index fba9cb9bf9d6d5eeb48c7d4f2884a89862a8a464..0002f857b5b792f450932001db2598338dff6e56 100644 (file)
@@ -18,8 +18,6 @@
 .. versionadded:: 4.0
 """
 
-from __future__ import absolute_import, division, print_function
-
 import re
 
 from tornado.concurrent import (Future, future_add_done_callback,
index 7c2f2568a6324ea4f34379032c0948ea4a94a839..d3a42cd3784a6166d0d1de3a7cd83e1bc70c9190 100644 (file)
@@ -38,8 +38,6 @@ To select ``curl_httpclient``, call `AsyncHTTPClient.configure` at startup::
     AsyncHTTPClient.configure("tornado.curl_httpclient.CurlAsyncHTTPClient")
 """
 
-from __future__ import absolute_import, division, print_function
-
 import functools
 import time
 import weakref
index 3498d71fb6c08814a2536027021b5853c4348fe7..0269b045ebb2c000c3f47ffdb0ded168de3327ee 100644 (file)
@@ -25,8 +25,6 @@ class except to start a server at the beginning of the process
    to `tornado.httputil.HTTPServerRequest`.  The old name remains as an alias.
 """
 
-from __future__ import absolute_import, division, print_function
-
 import socket
 
 from tornado.escape import native_str
index 48c545ed57bf4b5adade12c30b53cbdd2df24753..0e498235b03991c979bafcd065c15b3ed49e2c58 100644 (file)
@@ -19,8 +19,6 @@ This module also defines the `HTTPServerRequest` class which is exposed
 via `tornado.web.RequestHandler.request`.
 """
 
-from __future__ import absolute_import, division, print_function
-
 import calendar
 import collections
 import copy
index 2f9319f7b2cdf18f8378b81d82e2aabe99320f98..51dbe45401f09dc4765a0e7eafd449b000e86e54 100644 (file)
@@ -30,8 +30,6 @@ events. `IOLoop.add_timeout` is a non-blocking alternative to
 
 """
 
-from __future__ import absolute_import, division, print_function
-
 import asyncio
 from concurrent.futures import ThreadPoolExecutor
 import datetime
index da6817349ba6dec177908a5ec159aed234380b91..ba8284f3f147685e9ce3233191ff5b6fa4afa210 100644 (file)
@@ -23,8 +23,6 @@ Contents:
 * `PipeIOStream`: Pipe-based IOStream implementation.
 """
 
-from __future__ import absolute_import, division, print_function
-
 import collections
 import errno
 import io
index 2931010cedf775995bab478b17839fad24b73a0d..9247bcb5280ced4d0dc8c312d52aeeee5f4963e6 100644 (file)
@@ -39,8 +39,6 @@ supported by `gettext` and related tools).  If neither method is called,
 the `Locale.translate` method will simply return the original string.
 """
 
-from __future__ import absolute_import, division, print_function
-
 import codecs
 import csv
 import datetime
index 9566a4573ca1423aa66cac22fc11c5099bd21d2c..15b8f4d8700ad3b5abd850883e0b92f295887192 100644 (file)
@@ -12,8 +12,6 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-from __future__ import absolute_import, division, print_function
-
 import collections
 from concurrent.futures import CancelledError
 
index cda905c9badc342a9194756f53bbc4ab567207e2..c0171ba166d3509ee55fca1e8fe9a25eec99cde3 100644 (file)
@@ -27,8 +27,6 @@ These streams may be configured independently using the standard library's
 `logging` module.  For example, you may wish to send ``tornado.access`` logs
 to a separate file for analysis.
 """
-from __future__ import absolute_import, division, print_function
-
 import logging
 import logging.handlers
 import sys
index c7682be3a8035318b3155619d89401f7b5df557a..c57f6fd34787fd826594dcc78be963c432fbcae4 100644 (file)
@@ -15,8 +15,6 @@
 
 """Miscellaneous network utility code."""
 
-from __future__ import absolute_import, division, print_function
-
 import errno
 import os
 import sys
index f3b87199b9189c34353b794275ea3df7e3320650..f2d30a6e8821383d4dacaec14553d5c7a50da2e9 100644 (file)
@@ -93,8 +93,6 @@ instances to define isolated sets of options, such as for subcommands.
    underscores.
 """
 
-from __future__ import absolute_import, division, print_function
-
 import datetime
 import numbers
 import re
index 04254bed3e96fbc400f013a45ee7e8964ab5216c..b139c90029bc0b96e51e33a09b1a26d40407f077 100644 (file)
@@ -19,7 +19,6 @@ the same event loop.
    Windows. Use the `~asyncio.SelectorEventLoop` instead.
 """
 
-from __future__ import absolute_import, division, print_function
 import functools
 
 from tornado.gen import convert_yielded
index 16ee9091a5063ab09cac7dac9590bdaa475aa08f..6c3100170fbe1b93192d380302ff0e900e37fb58 100644 (file)
@@ -22,8 +22,6 @@ Most code that needs access to this functionality should do e.g.::
     from tornado.platform.auto import set_close_exec
 """
 
-from __future__ import absolute_import, division, print_function
-
 import os
 
 if os.name == 'nt':
index 768cb62499f6166cc2c9ca322f9bc67d87927164..f1e379b2298b580496ef25df338155de81e012c6 100644 (file)
@@ -1,4 +1,3 @@
-from __future__ import absolute_import, division, print_function
 import pycares  # type: ignore
 import socket
 
index c2d54e4ce8f54d0cd4c252f73a7bea4064de57dc..d7a6d76ee46146f52361b23437dd12f95a851ebe 100644 (file)
@@ -20,8 +20,6 @@ for other tornado.platform modules.  Most code should import the appropriate
 implementation from `tornado.platform.auto`.
 """
 
-from __future__ import absolute_import, division, print_function
-
 
 def set_close_exec(fd):
     """Sets the close-on-exec bit (``FD_CLOEXEC``)for a file descriptor."""
index c8571e6b09b3bb26177b22820b99bc43ccbfebcc..54327746c6bf437e79e5f375b3d9371317da9be5 100644 (file)
@@ -15,8 +15,6 @@
 
 """Posix implementations of platform-specific functionality."""
 
-from __future__ import absolute_import, division, print_function
-
 import fcntl
 import os
 
index a5f41ab6bfc6b92f44392e000be9bd09ea20df7c..68646b300f13c2ed6f5c4f9c1fa0355ddfa7bd8a 100644 (file)
@@ -21,8 +21,6 @@ depending on which library's underlying event loop you want to use.
 This module has been tested with Twisted versions 11.0.0 and newer.
 """
 
-from __future__ import absolute_import, division, print_function
-
 import socket
 import sys
 
index 4127700659e3aaafc59a859b4fdfd5383734209a..274937f86715f15cce1d71af19407b5123665e5f 100644 (file)
@@ -1,8 +1,6 @@
 # NOTE: win32 support is currently experimental, and not recommended
 # for production use.
 
-
-from __future__ import absolute_import, division, print_function
 import ctypes  # type: ignore
 import ctypes.wintypes  # type: ignore
 
index 7a5fbaed0b1c805b5d86bb024aa97cf587c45e49..8f8dd3e0740363df4b7a1d5298afbe4cfa5d6124 100644 (file)
@@ -17,8 +17,6 @@
 the server into multiple processes and managing subprocesses.
 """
 
-from __future__ import absolute_import, division, print_function
-
 import errno
 import os
 import multiprocessing
index 7cb96bfcc732f1f1400bd088ab3eec6d4ebc666d..bc33384477cdbb525584d768e3f978154becb6d7 100644 (file)
@@ -25,8 +25,6 @@ to those provided in the standard library's `asyncio package
 
 """
 
-from __future__ import absolute_import, division, print_function
-
 import collections
 import heapq
 
index e56d1a75f973faef951f39b39d09c65c39d8d745..8122faf5b9035ac223b4ba25b5999d2354a21b1f 100644 (file)
@@ -175,8 +175,6 @@ For more information on application-level routing see docs for `~.web.Applicatio
 
 """
 
-from __future__ import absolute_import, division, print_function
-
 import re
 from functools import partial
 
index bf41abbf1dcae3f9a9cfe9c563cb1e92faa45ac9..d0df55271befa1747092d2e04e192c308488640d 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 from tornado.escape import _unicode
 from tornado import gen
 from tornado.httpclient import HTTPResponse, HTTPError, AsyncHTTPClient, main, _RequestProxy
index e726f5106930e5d414a8bf4f64a5d4786d4b87a8..94dcdf1506fd8ece979c71317633ceaa3ceb57f7 100644 (file)
@@ -15,7 +15,6 @@
 
 """A non-blocking TCP connection factory.
 """
-from __future__ import absolute_import, division, print_function
 
 import functools
 import socket
index 31e16b8df37670384b6c5beda8d122d2064c43d6..038d8223cdbf6da79c5e74c7a33c2276c5657e9d 100644 (file)
@@ -14,7 +14,6 @@
 # under the License.
 
 """A non-blocking, single-threaded TCP server."""
-from __future__ import absolute_import, division, print_function
 
 import errno
 import os
index 382f08f4059df86c1f385f91b431347d92b96045..ac5dcf8885120b63730d7aeaf90a1d1f8051f4af 100644 (file)
@@ -195,8 +195,6 @@ if you need to include a literal ``{{``, ``{%``, or ``{#`` in the output.
     `filter_whitespace` for available options. New in Tornado 4.3.
 """
 
-from __future__ import absolute_import, division, print_function
-
 import datetime
 from io import StringIO
 import linecache
index c78478cbd3f201a50c3d1cd28781f8044b47de82..430c895fa249c6a754853e3bbe10628f8d704557 100644 (file)
@@ -2,8 +2,6 @@
 
 This only works in python 2.7+.
 """
-from __future__ import absolute_import, division, print_function
-
 from tornado.test.runtests import all, main
 
 # tornado.testing.main autodiscovery relies on 'all' being present in
index 23073090d87a5cbb24b070a34ba59c6478569dd2..990ecc906432e7118894072fa0e00c7a33d1741f 100644 (file)
@@ -10,8 +10,6 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-from __future__ import absolute_import, division, print_function
-
 import asyncio
 import unittest
 
index ee5ee7a7b6bda30e50990cffbea1b1f458a03f23..eba46a6d4a71fc464735784eadcc3d64858c7989 100644 (file)
@@ -3,9 +3,6 @@
 # and ensure that it doesn't blow up (e.g. with unicode/bytes issues in
 # python 3)
 
-
-from __future__ import absolute_import, division, print_function
-
 from tornado.auth import (
     OpenIdMixin, OAuthMixin, OAuth2Mixin,
     GoogleOAuth2Mixin, FacebookGraphMixin, TwitterMixin,
index bac17fa66d857d8e81e6be86923dd628101aa067..6c62b3308af486d821394996f50241560b611c28 100644 (file)
@@ -1,4 +1,3 @@
-from __future__ import absolute_import, division, print_function
 import os
 import shutil
 import subprocess
index 444529f8c2bb8baf348b8d5799da485d6bd6693b..9dbccbeee94097b754892e01f1169f8ce8d6899d 100644 (file)
@@ -12,8 +12,6 @@
 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 # License for the specific language governing permissions and limitations
 # under the License.
-from __future__ import absolute_import, division, print_function
-
 from concurrent import futures
 import logging
 import re
index 4d371adff37d0dc3ca526c43c0429f696d6ae2c1..b93e97123fdc1332105445a58d0bec7538acb251 100644 (file)
@@ -1,6 +1,4 @@
 # coding: utf-8
-from __future__ import absolute_import, division, print_function
-
 from hashlib import md5
 import unittest
 
index a7f0491b8116e340b108c5663830907ab1791b24..6881850dde0381cf41f9b5a95be66a30d7afef76 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 import unittest
 
 import tornado.escape
index d3881a9b844448d300b8a6af8614d1eeaad57665..9e6cb095eb3e749dec32f3498262c08e111e0a73 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 import asyncio
 from concurrent import futures
 import gc
index 283c13f413f87d1d5b0113291f0e4ae12fd131a6..08b29bc53cb2695bf349d90cbcc94be04b32edd8 100644 (file)
@@ -8,7 +8,6 @@
 # 3) msgfmt tornado_test.po -o tornado_test.mo
 # 4) Put the file in the proper location: $LANG/LC_MESSAGES
 
-from __future__ import absolute_import, division, print_function
 _("school")
 pgettext("law", "right")
 pgettext("good", "right")
index 8aaaaf35b7374e39cdb4c49c402f67d0d44d50d3..4d8c04bc513d3f53609360eb4ec4fc60b0a20456 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 import socket
 
 from tornado.http1connection import HTTP1Connection
index a9212e89fad387da92a53b45581d106ab0b25224..578f1f39dab068b6c5fcaffda38d0ca1f1c82402 100644 (file)
@@ -1,6 +1,4 @@
 # -*- coding: utf-8 -*-
-from __future__ import absolute_import, division, print_function
-
 import base64
 import binascii
 from contextlib import closing
index 6f4389abf8607538a4a805f89b4ede60b15d754e..3b1e23470de3472c4621ddb07e2552c08813b3c9 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 from tornado import gen, netutil
 from tornado.concurrent import Future
 from tornado.escape import json_decode, json_encode, utf8, _unicode, recursive_unicode, native_str
index b1fb468d96182e8a9496faa08e83d247a979f1c3..cec6017fed43277b4afa64ef93e4176b1b2b7263 100644 (file)
@@ -1,6 +1,4 @@
 # -*- coding: utf-8 -*-
-from __future__ import absolute_import, division, print_function
-
 from tornado.httputil import (
     url_concat, parse_multipart_form_data, HTTPHeaders, format_timestamp,
     HTTPServerRequest, parse_request_start_line, parse_cookie, qs_to_qsl,
index be5b3123644bd620a16e7d4e0c70aa5dc105dc86..2f360d082c0785599ccc89c9e2c2918780d4cc0e 100644 (file)
@@ -1,6 +1,4 @@
 # flake8: noqa
-from __future__ import absolute_import, division, print_function
-
 import subprocess
 import sys
 import unittest
index 6f886cca78a414144bb7b082f878d23cc8bad67d..fc0011cf4bfbeee8691404eb45b87c887ea5b5cc 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 from concurrent.futures import ThreadPoolExecutor
 from concurrent import futures
 import contextlib
index f87bbf8477e759747585120631fbb091baebe49a..9c6dbf76e6c346de3ea18e6deac4e03755a51f25 100644 (file)
@@ -1,4 +1,3 @@
-from __future__ import absolute_import, division, print_function
 from tornado.concurrent import Future
 from tornado import gen
 from tornado import netutil
index db5d4838a8bc630368b56670575f33c0176372e8..67ed123b981c3b8ee19a28f10cabbc51163cc63e 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 import datetime
 import os
 import shutil
index 5e7cfb0b3adc938471fce16375688f4859744f13..1306e06c9008bd66ee98c6e205fe375ad2bd15bc 100644 (file)
@@ -10,8 +10,6 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-
-from __future__ import absolute_import, division, print_function
 from datetime import timedelta
 import unittest
 
index 03302d6ccacd28a4932c5904630921b12d6f5d29..ccd38dad614da662e117263c906e7ee3242a298e 100644 (file)
@@ -12,8 +12,6 @@
 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 # License for the specific language governing permissions and limitations
 # under the License.
-from __future__ import absolute_import, division, print_function
-
 import contextlib
 import glob
 import logging
index 0637dea61f76be4096d1885fd73666d198692bbf..6686e9fbaaa5a17a5eece9f94813494b2d642e46 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 import errno
 import os
 import signal
index e6c81f5803acb75ede67df719df785b47a138f4b..e38db0800fdfd4b845634530eb4c65ece42fc928 100644 (file)
@@ -1,6 +1,4 @@
 # -*- coding: utf-8 -*-
-from __future__ import absolute_import, division, print_function
-
 import datetime
 from io import StringIO
 import os
index d12ac36b0cf12b9408918bea54d90d1550e60380..e8ac81a3c78992711068dcdfe1fcfb3ffe97d6b1 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 import asyncio
 import logging
 import os
index 5aaaf51e682f7b178b16737c094845c63d2338cc..d63882a9de8ac42a14bc8f8ae848b4d3a9f04798 100644 (file)
@@ -10,8 +10,6 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-
-from __future__ import absolute_import, division, print_function
 from datetime import timedelta
 from random import random
 import unittest
index 429671962f27c07721be163d614161340a773b79..a055280d12a68a27fe5301c1148492802b0bf813 100644 (file)
@@ -1,4 +1,3 @@
-from __future__ import absolute_import, division, print_function
 from tornado.ioloop import IOLoop
 from tornado.netutil import ThreadedResolver
 
index 3cb34ad78ffc21cc8a6c957da2fb6072926872b6..722662555b2d29ee4b0d2fe2a1d6178b6adfeb06 100644 (file)
@@ -10,9 +10,6 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-
-from __future__ import absolute_import, division, print_function
-
 from tornado.httputil import HTTPHeaders, HTTPMessageDelegate, HTTPServerConnectionDelegate, ResponseStartLine  # noqa: E501
 from tornado.routing import HostMatches, PathMatches, ReversibleRouter, Router, Rule, RuleRouter
 from tornado.testing import AsyncHTTPTestCase
index b9f797c75771de79f0899999ca0cd9ea6d3b33d9..f7b7cbe81ea21e40cd7c2ae5264f062ad829940e 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 from functools import reduce
 import gc
 import io
index 82853f3900f2ce18a61a6e89074ba4f9ddce7786..d9ea96b776fbc80c76ffe0d2ba91a74831a93fe4 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 import collections
 from contextlib import closing
 import errno
index 97996177c309198a204a382622a7372190485bec..df4eee9df57303af5abf48e1b4c971986665ee3f 100644 (file)
@@ -12,9 +12,6 @@
 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 # License for the specific language governing permissions and limitations
 # under the License.
-
-from __future__ import absolute_import, division, print_function
-
 from contextlib import closing
 import os
 import socket
index 95e21775c61440d2d9e19dc98c2000221f3182f7..7408c780de1a5f016d7eaee192cec9edb3b97edc 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 import socket
 import subprocess
 import sys
@@ -141,7 +139,6 @@ class TestMultiprocess(unittest.TestCase):
         # As a sanity check, run the single-process version through this test
         # harness too.
         code = textwrap.dedent("""
-            from __future__ import print_function
             from tornado.ioloop import IOLoop
             from tornado.tcpserver import TCPServer
 
@@ -155,7 +152,6 @@ class TestMultiprocess(unittest.TestCase):
 
     def test_simple(self):
         code = textwrap.dedent("""
-            from __future__ import print_function
             from tornado.ioloop import IOLoop
             from tornado.process import task_id
             from tornado.tcpserver import TCPServer
@@ -171,7 +167,6 @@ class TestMultiprocess(unittest.TestCase):
 
     def test_advanced(self):
         code = textwrap.dedent("""
-            from __future__ import print_function
             from tornado.ioloop import IOLoop
             from tornado.netutil import bind_sockets
             from tornado.process import fork_processes, task_id
index bd900db006319c6735e89fe3176d8f168c11b136..0d12a9ea008f115e9a1d8b096d68c1b6938c6cff 100644 (file)
@@ -1,7 +1,4 @@
-from __future__ import absolute_import, division, print_function
-
 import os
-import sys
 import traceback
 import unittest
 
@@ -160,9 +157,12 @@ try{% set y = 1/x %}
         except ParseError:
             pass
 
-    @unittest.skipIf(sys.version_info >= division.getMandatoryRelease(),
-                     'no testable future imports')
+    @unittest.skip('no testable future imports')
     def test_no_inherit_future(self):
+        # TODO(bdarnell): make a test like this for one of the future
+        # imports available in python 3. Unfortunately they're harder
+        # to use in a template than division was.
+
         # This file has from __future__ import division...
         self.assertEqual(1 / 2, 0.5)
         # ...but the template doesn't
index c4e7ebd2b427e7d6a69ea356d42479839a119526..1e1c019b852b34533610df3c853ca4dfca7dcff3 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 from tornado import gen, ioloop
 from tornado.httpserver import HTTPServer
 from tornado.testing import AsyncHTTPTestCase, AsyncTestCase, bind_unused_port, gen_test
index 06ed4f0588576328a42bebe9249918cfb688a49d..5d90272a890da9d56d7743880e1bc3e8849606d6 100644 (file)
@@ -17,8 +17,6 @@
 Unittest for the twisted-style reactor.
 """
 
-from __future__ import absolute_import, division, print_function
-
 import logging
 import signal
 import unittest
index 1c8f91f6c468a7c7664b93ea2aa0b3d297423e4f..60e787b7da62e90066fbb9ca42f6081b0e3f943e 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 import contextlib
 import os
 import platform
index 1b7b82abf9b97c5d3aa1474bcc3e1e4485bc33f1..a8c2cc094e71ed0bd5a27abc08fbe81f0e8b350d 100644 (file)
@@ -1,5 +1,4 @@
 # coding: utf-8
-from __future__ import absolute_import, division, print_function
 from io import StringIO
 import re
 import sys
@@ -193,10 +192,9 @@ class UnicodeLiteralTest(unittest.TestCase):
 
 
 class ExecInTest(unittest.TestCase):
-    # This test is python 2 only because there are no new future imports
-    # defined in python 3 yet.
-    @unittest.skipIf(sys.version_info >= print_function.getMandatoryRelease(),
-                     'no testable future imports')
+    # TODO(bdarnell): make a version of this test for one of the new
+    # future imports available in python 3.
+    @unittest.skip('no testable future imports')
     def test_no_inherit_future(self):
         # This file has from __future__ import print_function...
         f = StringIO()
index 7bc3c055b798d44a96f1f8770460c70847919689..cb1ab353c23de11e31e3758975c501b5acc10914 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 from tornado.concurrent import Future
 from tornado import gen
 from tornado.escape import json_decode, utf8, to_unicode, recursive_unicode, native_str, to_basestring  # noqa: E501
index 8aa3d0d962bddf9196458c28926f9f9e507a3a86..23dc2805d864238d14eb7feaf354e48aa6d7a09e 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import absolute_import, division, print_function
-
 import functools
 import traceback
 import unittest
index 48faa5b5bc453446e1694b04aa3a03ee8dafac8f..62a82dc12d70d1019db02e2f38c69f0816cda045 100644 (file)
@@ -1,4 +1,3 @@
-from __future__ import absolute_import, division, print_function
 import functools
 import os
 import socket
index 81ac01a587656d8d4b6d80087f170a86574762aa..f98da5bd73606a15996ce93087312976d3edcc95 100644 (file)
@@ -1,4 +1,3 @@
-from __future__ import absolute_import, division, print_function
 from wsgiref.validate import validator
 
 from tornado.testing import AsyncHTTPTestCase
index 444b62f247dde4a46e6a421ab3d6cb7b7d89b870..4521ea9cc902f6fb31b18aa72f11e584217c39fc 100644 (file)
@@ -9,8 +9,6 @@
   for the tornado.autoreload module to rerun the tests when code changes.
 """
 
-from __future__ import absolute_import, division, print_function
-
 from collections.abc import Generator
 import functools
 import inspect
index 01bf4a1113265fe66acf1d278290d7bc9efde796..e2802ac1d6289f6d22d4091594ab426e442f54c6 100644 (file)
@@ -10,8 +10,6 @@ interface of its subclasses, including `.AsyncHTTPClient`, `.IOLoop`,
 and `.Resolver`.
 """
 
-from __future__ import absolute_import, division, print_function
-
 import array
 import atexit
 from inspect import getfullargspec
index de9bd94806477aea9d6b846cc3c28bd72ab862bc..76337ea8317d9a0cb4fb54187fbb34382c2d6ede 100644 (file)
@@ -57,8 +57,6 @@ the executor do not refer to Tornado objects.
 
 """
 
-from __future__ import absolute_import, division, print_function
-
 import base64
 import binascii
 import datetime
index bba00d1eefb979b079db561f16fe044ab7186c6f..5398180aa32a9469afc070e69c3a419e88d1d4cd 100644 (file)
@@ -16,8 +16,6 @@ the protocol (known as "draft 76") and are not compatible with this module.
    Removed support for the draft 76 protocol version.
 """
 
-from __future__ import absolute_import, division, print_function
-
 import base64
 import hashlib
 import os
index 3f31ddb8a31a03057707bcb00eed917f299cc306..a23be2427498c48cf27d12578691d09894a045e2 100644 (file)
@@ -27,8 +27,6 @@ container.
 
 """
 
-from __future__ import absolute_import, division, print_function
-
 import sys
 from io import BytesIO
 import tornado