]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Remove the remaining traces of tornado.util.b.
authorBen Darnell <ben@bendarnell.com>
Sat, 19 Jan 2013 18:29:10 +0000 (13:29 -0500)
committerBen Darnell <ben@bendarnell.com>
Sat, 19 Jan 2013 18:29:10 +0000 (13:29 -0500)
29 files changed:
tornado/auth.py
tornado/httpserver.py
tornado/httputil.py
tornado/iostream.py
tornado/platform/common.py
tornado/platform/posix.py
tornado/simple_httpclient.py
tornado/test/auth_test.py
tornado/test/concurrent_test.py
tornado/test/escape_test.py
tornado/test/gen_test.py
tornado/test/httpclient_test.py
tornado/test/httpserver_test.py
tornado/test/httputil_test.py
tornado/test/iostream_test.py
tornado/test/locale_test.py
tornado/test/log_test.py
tornado/test/process_test.py
tornado/test/simple_httpclient_test.py
tornado/test/stack_context_test.py
tornado/test/template_test.py
tornado/test/util_test.py
tornado/test/web_test.py
tornado/test/wsgi_test.py
tornado/util.py
tornado/web.py
tornado/websocket.py
tornado/wsgi.py
website/sphinx/releases/next.rst

index 600b5c87f30e6cbbcdfacc8806678d63e11a10e4..6fa65442c29bd509dc4bf5eee4ddbf5b8a3225ef 100644 (file)
@@ -58,7 +58,7 @@ from tornado import httpclient
 from tornado import escape
 from tornado.httputil import url_concat
 from tornado.log import gen_log
-from tornado.util import bytes_type, b, u, unicode_type
+from tornado.util import bytes_type, u, unicode_type
 
 try:
     import urlparse  # py2
index ba6ab62249459a8d9c88e58b483f853437aacbd6..ae063fedd75c8b99b01eabcdf94031aa13c77deb 100644 (file)
@@ -35,7 +35,7 @@ from tornado import iostream
 from tornado.log import gen_log
 from tornado.netutil import TCPServer
 from tornado import stack_context
-from tornado.util import b, bytes_type
+from tornado.util import bytes_type
 
 try:
     import ssl  # Python 2.6+
index 110cc208a9f50270f476e85b9ce2142a13a82507..e01550626b05e6df700676bbb25f9d0f78da04a3 100644 (file)
@@ -23,7 +23,7 @@ import re
 
 from tornado.escape import native_str, parse_qs_bytes, utf8
 from tornado.log import gen_log
-from tornado.util import b, ObjectDict
+from tornado.util import ObjectDict
 
 try:
     from httplib import responses  # py2
@@ -57,7 +57,7 @@ class HTTPHeaders(dict):
 
     >>> for (k,v) in sorted(h.get_all()):
     ...    print('%s: %s' % (k,v))
-    ... 
+    ...
     Content-Type: text/html
     Set-Cookie: A=B
     Set-Cookie: C=D
index f7a16f000f1fb14a903c657652262e3b869114a7..4aca7b11f6aaa4407a631bd56bee0c11066f2225 100644 (file)
@@ -37,7 +37,7 @@ import re
 from tornado import ioloop
 from tornado.log import gen_log, app_log
 from tornado import stack_context
-from tornado.util import b, bytes_type
+from tornado.util import bytes_type
 
 try:
     import ssl  # Python 2.6+
index fda5beeb91087a2fa345b8f6764dd758ae920d57..e8ab61f8937bc20c19a8384c7e3c25880cd9872e 100644 (file)
@@ -5,7 +5,6 @@ import errno
 import socket
 
 from tornado.platform import interface
-from tornado.util import b
 
 
 class Waker(interface.Waker):
index 2a7f422231ec9b73cec6918dbaa9c3736f6da08f..41a5794c63af29e397abbab4e5a2588007b2c3d5 100644 (file)
@@ -22,7 +22,6 @@ import fcntl
 import os
 
 from tornado.platform import interface
-from tornado.util import b
 
 
 def set_close_exec(fd):
index 7d1b8912bd45e0ae11dc3de52b34647cf9ec7d43..5b3c9028762e0f395223403caab5877562736a18 100644 (file)
@@ -8,7 +8,7 @@ from tornado.iostream import IOStream, SSLIOStream
 from tornado.netutil import Resolver
 from tornado.log import gen_log
 from tornado import stack_context
-from tornado.util import b, GzipDecompressor
+from tornado.util import GzipDecompressor
 
 import base64
 import collections
index 969deb8500c744482cffd115afb4940618cc3112..d6b429e06da3e29c343ebabb0a3a5f2c08b0f71f 100644 (file)
@@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function, with_statement
 from tornado.auth import OpenIdMixin, OAuthMixin, OAuth2Mixin, TwitterMixin
 from tornado.escape import json_decode
 from tornado.testing import AsyncHTTPTestCase
-from tornado.util import b, u
+from tornado.util import u
 from tornado.web import RequestHandler, Application, asynchronous
 
 
index f6a8e268d5ed2559cbedfeda9555d0696eaa86d9..d9654085bf3b9d7befb191c504f72d0dea86fe6e 100644 (file)
@@ -25,7 +25,6 @@ from tornado import gen
 from tornado.iostream import IOStream
 from tornado.netutil import TCPServer
 from tornado.testing import AsyncTestCase, LogTrapTestCase, get_unused_port
-from tornado.util import b
 
 class CapServer(TCPServer):
     def handle_stream(self, stream, address):
index 75a82092a028965b55b920afcc95e185595d7a5b..d3a47b5fc78cd80b815ba496d1fa4aff3a3b343a 100644 (file)
@@ -5,7 +5,7 @@ from __future__ import absolute_import, division, print_function, with_statement
 import tornado.escape
 
 from tornado.escape import utf8, xhtml_escape, xhtml_unescape, url_escape, url_unescape, to_unicode, json_decode, json_encode
-from tornado.util import b, u, unicode_type
+from tornado.util import u, unicode_type
 from tornado.test.util import unittest
 
 linkify_tests = [
index d36eb9797c26b431d8067f120b54b725294e9380..7c97ba14d3dcdf54ec2cf724b87d19d27af84e67 100644 (file)
@@ -4,7 +4,6 @@ from tornado.escape import url_escape
 from tornado.httpclient import AsyncHTTPClient
 from tornado.log import app_log
 from tornado.testing import AsyncHTTPTestCase, AsyncTestCase, ExpectLog
-from tornado.util import b
 from tornado.web import Application, RequestHandler, asynchronous
 
 from tornado import gen
index dc5a932e52db23810a990e7e4587eb07d9284c2f..d4e0579a765aa014da2344c0be3a1dd34a7ea53b 100644 (file)
@@ -16,7 +16,7 @@ from tornado import netutil
 from tornado.stack_context import ExceptionStackContext, NullContext
 from tornado.testing import AsyncHTTPTestCase, bind_unused_port
 from tornado.test.util import unittest
-from tornado.util import b, u, bytes_type
+from tornado.util import u, bytes_type
 from tornado.web import Application, RequestHandler, url
 
 
@@ -134,7 +134,7 @@ class HTTPClientCommonTestCase(AsyncHTTPTestCase):
         sock, port = bind_unused_port()
         with closing(sock):
             def write_response(stream, request_data):
-                stream.write(b("""\
+                stream.write(b"""\
 HTTP/1.1 200 OK
 Transfer-Encoding: chunked
 
@@ -144,7 +144,7 @@ Transfer-Encoding: chunked
 2
 0
 
-""").replace(b"\n", b"\r\n"), callback=stream.close)
+""".replace(b"\n", b"\r\n"), callback=stream.close)
 
             def accept_callback(conn, address):
                 # fake an HTTP server using chunked encoding where the final chunks
index f0c8cfb74777fcf7ebd92463c111781fb66bbc1e..b16e4c6a8a8f9102c2cbbd9b661e59ca7253765b 100644 (file)
@@ -11,7 +11,7 @@ from tornado.log import gen_log
 from tornado.simple_httpclient import SimpleAsyncHTTPClient
 from tornado.testing import AsyncHTTPTestCase, AsyncHTTPSTestCase, AsyncTestCase, ExpectLog
 from tornado.test.util import unittest
-from tornado.util import b, u, bytes_type
+from tornado.util import u, bytes_type
 from tornado.web import Application, RequestHandler, asynchronous
 import datetime
 import os
index 182b0c32c7556ef0642a08dd70d4c45524c77a35..db8b615f8bf7959c6a4bc7b567f9f1f3eef57c3c 100644 (file)
@@ -7,7 +7,6 @@ from tornado.escape import utf8
 from tornado.log import gen_log
 from tornado.testing import ExpectLog
 from tornado.test.util import unittest
-from tornado.util import b
 import logging
 
 
@@ -65,12 +64,12 @@ class TestUrlConcat(unittest.TestCase):
 
 class MultipartFormDataTest(unittest.TestCase):
     def test_file_upload(self):
-        data = b("""\
+        data = b"""\
 --1234
 Content-Disposition: form-data; name="files"; filename="ab.txt"
 
 Foo
---1234--""").replace(b"\n", b"\r\n")
+--1234--""".replace(b"\n", b"\r\n")
         args = {}
         files = {}
         parse_multipart_form_data(b"1234", data, args, files)
@@ -80,12 +79,12 @@ Foo
 
     def test_unquoted_names(self):
         # quotes are optional unless special characters are present
-        data = b("""\
+        data = b"""\
 --1234
 Content-Disposition: form-data; name=files; filename=ab.txt
 
 Foo
---1234--""").replace(b"\n", b"\r\n")
+--1234--""".replace(b"\n", b"\r\n")
         args = {}
         files = {}
         parse_multipart_form_data(b"1234", data, args, files)
@@ -119,12 +118,12 @@ Foo
             self.assertEqual(file["body"], b"Foo")
 
     def test_boundary_starts_and_ends_with_quotes(self):
-        data = b('''\
+        data = b'''\
 --1234
 Content-Disposition: form-data; name="files"; filename="ab.txt"
 
 Foo
---1234--''').replace(b"\n", b"\r\n")
+--1234--'''.replace(b"\n", b"\r\n")
         args = {}
         files = {}
         parse_multipart_form_data(b'"1234"', data, args, files)
@@ -133,11 +132,11 @@ Foo
         self.assertEqual(file["body"], b"Foo")
 
     def test_missing_headers(self):
-        data = b('''\
+        data = b'''\
 --1234
 
 Foo
---1234--''').replace(b"\n", b"\r\n")
+--1234--'''.replace(b"\n", b"\r\n")
         args = {}
         files = {}
         with ExpectLog(gen_log, "multipart/form-data missing headers"):
@@ -145,12 +144,12 @@ Foo
         self.assertEqual(files, {})
 
     def test_invalid_content_disposition(self):
-        data = b('''\
+        data = b'''\
 --1234
 Content-Disposition: invalid; name="files"; filename="ab.txt"
 
 Foo
---1234--''').replace(b"\n", b"\r\n")
+--1234--'''.replace(b"\n", b"\r\n")
         args = {}
         files = {}
         with ExpectLog(gen_log, "Invalid multipart/form-data"):
@@ -158,11 +157,11 @@ Foo
         self.assertEqual(files, {})
 
     def test_line_does_not_end_with_correct_line_break(self):
-        data = b('''\
+        data = b'''\
 --1234
 Content-Disposition: form-data; name="files"; filename="ab.txt"
 
-Foo--1234--''').replace(b"\n", b"\r\n")
+Foo--1234--'''.replace(b"\n", b"\r\n")
         args = {}
         files = {}
         with ExpectLog(gen_log, "Invalid multipart/form-data"):
@@ -170,12 +169,12 @@ Foo--1234--''').replace(b"\n", b"\r\n")
         self.assertEqual(files, {})
 
     def test_content_disposition_header_without_name_parameter(self):
-        data = b("""\
+        data = b"""\
 --1234
 Content-Disposition: form-data; filename="ab.txt"
 
 Foo
---1234--""").replace(b"\n", b"\r\n")
+--1234--""".replace(b"\n", b"\r\n")
         args = {}
         files = {}
         with ExpectLog(gen_log, "multipart/form-data value missing name"):
@@ -186,13 +185,13 @@ Foo
         # The spec requires that data after the final boundary be ignored.
         # http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html
         # In practice, some libraries include an extra CRLF after the boundary.
-        data = b("""\
+        data = b"""\
 --1234
 Content-Disposition: form-data; name="files"; filename="ab.txt"
 
 Foo
 --1234--
-""").replace(b"\n", b"\r\n")
+""".replace(b"\n", b"\r\n")
         args = {}
         files = {}
         parse_multipart_form_data(b"1234", data, args, files)
index 048008fabf7cf05cdd787baa4b98ac704727a00e..da0930349c332abb5481ed3549a04bfa655c318a 100644 (file)
@@ -6,7 +6,6 @@ from tornado.log import gen_log, app_log
 from tornado.stack_context import NullContext
 from tornado.testing import AsyncHTTPTestCase, AsyncHTTPSTestCase, AsyncTestCase, bind_unused_port, ExpectLog
 from tornado.test.util import unittest, skipIfNonUnix
-from tornado.util import b
 from tornado.web import RequestHandler, Application
 import errno
 import logging
index 58f5b5e95eef125c42c979daea07f5ed30b31a77..043f5d278ec5ef8171a03ebab679d2d3ff104f3b 100644 (file)
@@ -4,7 +4,7 @@ import os
 import tornado.locale
 from tornado.escape import utf8
 from tornado.test.util import unittest
-from tornado.util import b, u, unicode_type
+from tornado.util import u, unicode_type
 
 
 class TranslationLoaderTest(unittest.TestCase):
index 9c038ad87e39f90d9ad03dff42ee1e9662f5b75b..921e86dae739b8ef60465b00279ed70a34483428 100644 (file)
@@ -27,7 +27,7 @@ from tornado.escape import utf8
 from tornado.log import LogFormatter, define_logging_options, enable_pretty_logging
 from tornado.options import OptionParser
 from tornado.test.util import unittest
-from tornado.util import b, u, bytes_type, basestring_type
+from tornado.util import u, bytes_type, basestring_type
 
 @contextlib.contextmanager
 def ignore_bytes_warning():
index bed879085cae8af071be1b959c473ba5e5b22017..d7d5dd4dc0075acd09bd24c354125eb47216e65f 100644 (file)
@@ -15,7 +15,6 @@ from tornado.process import fork_processes, task_id, Subprocess
 from tornado.simple_httpclient import SimpleAsyncHTTPClient
 from tornado.testing import bind_unused_port, ExpectLog, AsyncTestCase
 from tornado.test.util import unittest, skipIfNonUnix
-from tornado.util import b
 from tornado.web import RequestHandler, Application
 
 
index 636dd0db7454b57159cac073a439c8017336c0c5..6db724ead86f39764da3988750015e7e415a1034 100644 (file)
@@ -19,7 +19,6 @@ from tornado.test.httpclient_test import ChunkHandler, CountdownHandler, HelloWo
 from tornado.test import httpclient_test
 from tornado.testing import AsyncHTTPTestCase, AsyncTestCase, bind_unused_port, ExpectLog
 from tornado.test.util import unittest
-from tornado.util import b
 from tornado.web import RequestHandler, Application, asynchronous, url
 
 
index 15833f905b87a67fb4ff8b36766a39464ce12345..e5a9c0e32b4a5cf3b1682ad2b4971f1a0771f207 100644 (file)
@@ -5,7 +5,6 @@ from tornado.log import app_log
 from tornado.stack_context import StackContext, wrap, NullContext
 from tornado.testing import AsyncHTTPTestCase, AsyncTestCase, ExpectLog
 from tornado.test.util import unittest
-from tornado.util import b
 from tornado.web import asynchronous, Application, RequestHandler
 import contextlib
 import functools
index 366fe70fed9f1c06374b52ded33d428fd23ddb34..a69004c324379ccff2dc1555a383274c9c03f962 100644 (file)
@@ -7,7 +7,7 @@ from tornado.escape import utf8, native_str, to_unicode
 from tornado.template import Template, DictLoader, ParseError, Loader
 from tornado.testing import ExpectLog
 from tornado.test.util import unittest
-from tornado.util import b, u, bytes_type, ObjectDict, unicode_type
+from tornado.util import u, bytes_type, ObjectDict, unicode_type
 
 
 class TemplateTest(unittest.TestCase):
@@ -302,9 +302,9 @@ raw: {% raw name %}""",
                          b"Bobby <table>s")
 
         self.assertEqual(loader.load("include.html").generate(name=name),
-                         b("escaped: Bobby &lt;table&gt;s\n"
-                           "unescaped: Bobby <table>s\n"
-                           "default: Bobby <table>s\n"))
+                         b"escaped: Bobby &lt;table&gt;s\n"
+                         b"unescaped: Bobby <table>s\n"
+                         b"default: Bobby <table>s\n")
 
     def test_default_on(self):
         loader = DictLoader(self.templates, autoescape="xhtml_escape")
@@ -317,9 +317,9 @@ raw: {% raw name %}""",
                          b"Bobby &lt;table&gt;s")
 
         self.assertEqual(loader.load("include.html").generate(name=name),
-                         b("escaped: Bobby &lt;table&gt;s\n"
-                           "unescaped: Bobby <table>s\n"
-                           "default: Bobby &lt;table&gt;s\n"))
+                         b"escaped: Bobby &lt;table&gt;s\n"
+                         b"unescaped: Bobby <table>s\n"
+                         b"default: Bobby &lt;table&gt;s\n")
 
     def test_unextended_block(self):
         loader = DictLoader(self.templates)
@@ -350,8 +350,8 @@ raw: {% raw name %}""",
         def render(name):
             return loader.load(name).generate(name='<>&"')
         self.assertEqual(render("raw_expression.html"),
-                         b("expr: &lt;&gt;&amp;&quot;\n"
-                           "raw: <>&\""))
+                         b"expr: &lt;&gt;&amp;&quot;\n"
+                         b"raw: <>&\"")
 
     def test_custom_escape(self):
         loader = DictLoader({"foo.py":
@@ -367,9 +367,9 @@ raw: {% raw name %}""",
         self.assertEqual(render("foo.py", "<html>"),
                          b"s = '<html>'\n")
         self.assertEqual(render("foo.py", "';sys.exit()"),
-                         b("""s = "';sys.exit()"\n"""))
+                         b"""s = "';sys.exit()"\n""")
         self.assertEqual(render("foo.py", ["not a string"]),
-                         b("""s = "['not a string']"\n"""))
+                         b"""s = "['not a string']"\n""")
 
 
 class TemplateLoaderTest(unittest.TestCase):
index 0020618513dfce9c3dc6f0788875ca90869a5098..c6b166352390fbfb50150e373b460e8f31a187c5 100644 (file)
@@ -3,7 +3,7 @@ from __future__ import absolute_import, division, print_function, with_statement
 import sys
 
 from tornado.escape import utf8
-from tornado.util import raise_exc_info, Configurable, u, b
+from tornado.util import raise_exc_info, Configurable, u
 from tornado.test.util import unittest
 
 
index 3e5e370b2ddcac1c6446981a2a77b1a6c2b2ac81..d5a69957c1c7f6f5dce6567708f17b302b13eef9 100644 (file)
@@ -7,7 +7,7 @@ from tornado.simple_httpclient import SimpleAsyncHTTPClient
 from tornado.template import DictLoader
 from tornado.testing import AsyncHTTPTestCase, ExpectLog
 from tornado.test.util import unittest
-from tornado.util import b, u, bytes_type, ObjectDict, unicode_type
+from tornado.util import u, bytes_type, ObjectDict, unicode_type
 from tornado.web import RequestHandler, authenticated, Application, asynchronous, url, HTTPError, StaticFileHandler, _create_signature, create_signed_value, ErrorHandler
 
 import binascii
@@ -70,7 +70,7 @@ class SecureCookieTest(unittest.TestCase):
         # this string base64-encodes to '12345678'
         handler.set_secure_cookie('foo', binascii.a2b_hex(b'd76df8e7aefc'))
         cookie = handler._cookies['foo']
-        match = re.match(b(r'12345678\|([0-9]+)\|([0-9a-f]+)'), cookie)
+        match = re.match(br'12345678\|([0-9]+)\|([0-9a-f]+)', cookie)
         self.assertTrue(match)
         timestamp = match.group(1)
         sig = match.group(2)
@@ -559,11 +559,11 @@ class WSGISafeWebTest(WebTestCase):
     def test_uimodule_unescaped(self):
         response = self.fetch("/linkify")
         self.assertEqual(response.body,
-                         b("<a href=\"http://example.com\">http://example.com</a>"))
+                         b"<a href=\"http://example.com\">http://example.com</a>")
 
     def test_uimodule_resources(self):
         response = self.fetch("/uimodule_resources")
-        self.assertEqual(response.body, b("""\
+        self.assertEqual(response.body, b"""\
 <html><head><link href="/base.css" type="text/css" rel="stylesheet"/><link href="/foo.css" type="text/css" rel="stylesheet"/>
 <style type="text/css">
 .entry { margin-bottom: 1em; }
@@ -584,7 +584,7 @@ js_embed()
 //]]>
 </script>
 <script src="/analytics.js"/>
-</body></html>"""))
+</body></html>""")
 
     def test_optional_path(self):
         self.assertEqual(self.fetch_json("/optional_path/foo"),
index a680ff376bb2b72615b0de45106daff655196aad..639806eab5b2bd0dbb695cebd8480ce1637c388f 100644 (file)
@@ -4,7 +4,7 @@ from wsgiref.validate import validator
 from tornado.escape import json_decode
 from tornado.test.httpserver_test import TypeCheckHandler
 from tornado.testing import AsyncHTTPTestCase
-from tornado.util import b, u
+from tornado.util import u
 from tornado.web import RequestHandler
 from tornado.wsgi import WSGIApplication, WSGIContainer
 
index 988331d9ed538cf5ceae2ab3363c64b1b6e006fd..418b5f9738eb12f56b5ddfdb0c15170d4e17c3d3 100644 (file)
@@ -63,29 +63,18 @@ def import_object(name):
     obj = __import__('.'.join(parts[:-1]), None, None, [parts[-1]], 0)
     return getattr(obj, parts[-1])
 
-# Fake byte literal support:  In python 2.6+, you can say b"foo" to get
-# a byte literal (str in 2.x, bytes in 3.x).  There's no way to do this
-# in a way that supports 2.5, though, so we need a function wrapper
-# to convert our string literals.  b() should only be applied to literal
-# latin1 strings.  Once we drop support for 2.5, we can remove this function
-# and just use byte literals.
-#
 # Fake unicode literal support:  Python 3.2 doesn't have the u'' marker for
 # literal strings, and alternative solutions like "from __future__ import
 # unicode_literals" have other problems (see PEP 414).  u() can be applied
 # to ascii strings that include \u escapes (but they must not contain
 # literal non-ascii characters).
 if type('') is not type(b''):
-    def b(s):
-        return s.encode('latin1')
     def u(s):
         return s
     bytes_type = bytes
     unicode_type = str
     basestring_type = str
 else:
-    def b(s):
-        return s
     def u(s):
         return s.decode('unicode_escape')
     bytes_type = str
index 7476c01573937e4d81b441fa40e762dbd363e3ff..5e9379f51f3fd07ec5f1004dc24280238d9c38c1 100644 (file)
@@ -81,7 +81,7 @@ from tornado.log import access_log, app_log, gen_log
 from tornado import stack_context
 from tornado import template
 from tornado.escape import utf8, _unicode
-from tornado.util import b, bytes_type, import_object, ObjectDict, raise_exc_info, unicode_type
+from tornado.util import bytes_type, import_object, ObjectDict, raise_exc_info, unicode_type
 
 try:
     from io import BytesIO  # python 3
@@ -320,7 +320,7 @@ class RequestHandler(object):
         # If \n is allowed into the header, it is possible to inject
         # additional headers or split the request. Also cap length to
         # prevent obviously erroneous values.
-        if len(value) > 4000 or re.search(b(r"[\x00-\x1f]"), value):
+        if len(value) > 4000 or re.search(br"[\x00-\x1f]", value):
             raise ValueError("Unsafe header value %r", value)
         return value
 
@@ -494,7 +494,7 @@ class RequestHandler(object):
             assert isinstance(status, int) and 300 <= status <= 399
         self.set_status(status)
         # Remove whitespace
-        url = re.sub(b(r"[\x00-\x20]+"), "", utf8(url))
+        url = re.sub(br"[\x00-\x20]+", "", utf8(url))
         self.set_header("Location", urlparse.urljoin(utf8(self.request.uri),
                                                      url))
         self.finish()
index f3cf431da01ea1204816216fb560a09861495c43..d17501b739374ff049ac6114c70a600bfaf2218d 100644 (file)
@@ -30,7 +30,7 @@ import tornado.escape
 import tornado.web
 
 from tornado.log import gen_log, app_log
-from tornado.util import bytes_type, b
+from tornado.util import bytes_type
 
 
 class WebSocketHandler(tornado.web.RequestHandler):
index 58023b2067958411cba2cbe17237f74e87e2c669..5cfcedc3c9303b518c921b7f7396281154c9073c 100644 (file)
@@ -41,7 +41,7 @@ from tornado import httputil
 from tornado.log import access_log
 from tornado import web
 from tornado.escape import native_str, utf8, parse_qs_bytes
-from tornado.util import b, bytes_type, unicode_type
+from tornado.util import bytes_type, unicode_type
 
 try:
     from io import BytesIO  # python 3
index 28e6a2199b0400b0fa0782e3a9075a7fbfeec3df..430584fb6789fe5af5e7878945f42153fdfa5580 100644 (file)
@@ -209,3 +209,4 @@ In progress
   ``error`` attribute when closing it.
 * Python 2.5 is no longer supported.
 * Installation under Python 3 no longer uses ``2to3``.
+* `tornado.util.b` (which was only intended for internal use) is gone.