[Python-modules-commits] [python-tornado] 09/14: merge patched into master

Ondřej Nový onovy at moszumanska.debian.org
Wed Jul 13 07:21:42 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 dc5170571f65540d171f5bf55d09f8a519032855
Merge: b65ace1 2998294
Author: Ondřej Nový <onovy at debian.org>
Date:   Wed Jul 13 08:03:47 2016 +0200

    merge patched into master

 .travis.yml                                        |  61 ++++----
 README.rst                                         |   2 +-
 codecov.yml                                        |   3 +
 debian/.git-dpm                                    |   6 +-
 ...suite-failure-when-sockets-is-not-defined.patch |  27 ----
 debian/patches/domain-test.patch                   |  10 +-
 debian/patches/fix-ftbfs-on-hurd.patch             |   6 +-
 debian/patches/ignoreuserwarning.patch             |   6 +-
 debian/patches/series                              |   1 -
 debian/patches/skip-timing-tests.patch             |   4 +-
 debian/patches/sockopt.patch                       |   8 +-
 debian/patches/without-certifi.patch               |  28 ++--
 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                       |  13 +-
 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 +++---
 105 files changed, 1486 insertions(+), 953 deletions(-)

diff --cc debian/.git-dpm
index e79f3fa,0000000..d3b180c
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
 +# see git-dpm(1) from git-dpm package
- df1105b186eccf103277d0ccddd4c88e9f9d3c08
- df1105b186eccf103277d0ccddd4c88e9f9d3c08
- b10d25d01667a1069e6607ceb8ec948e27e3063c
++2998294384b06ad3d32359a0ca4bdd85e988149f
++2998294384b06ad3d32359a0ca4bdd85e988149f
++79df192d3e61b67beffe0f43f3ffb1c0e0f622b3
 +79df192d3e61b67beffe0f43f3ffb1c0e0f622b3
 +python-tornado_4.4.0~b1.orig.tar.gz
 +1665d7614d0eefa3c6a3c5daa8808f9aff8dc209
 +481147
 +debianTag="debian/%e%v"
 +patchedTag="patched/%e%v"
 +upstreamTag="upstream/%e%u"
diff --cc debian/patches/domain-test.patch
index 5626566,0000000..753cb34
mode 100644,000000..100644
--- a/debian/patches/domain-test.patch
+++ b/debian/patches/domain-test.patch
@@@ -1,33 -1,0 +1,33 @@@
- From 8f74c06250d37edccf2cfa2b971522c9041fdfdb Mon Sep 17 00:00:00 2001
++From 4077934083d0bf1b20e9e45ac08eadff3334cacb Mon Sep 17 00:00:00 2001
 +From: SVN-Git Migration <python-modules-team at lists.alioth.debian.org>
 +Date: Thu, 8 Oct 2015 13:13:30 -0700
 +Subject: use a domain that is more likely invalid
 +
 + avoids test failures in unisolated builds
 +Patch-Name: domain-test.patch
 +---
 + tornado/test/netutil_test.py | 4 ++--
 + 1 file changed, 2 insertions(+), 2 deletions(-)
 +
 +diff --git a/tornado/test/netutil_test.py b/tornado/test/netutil_test.py
- index 9ef5f7c..78331ce 100644
++index 549c4fe..842a195 100644
 +--- a/tornado/test/netutil_test.py
 ++++ b/tornado/test/netutil_test.py
- @@ -56,7 +56,7 @@ class _ResolverErrorTestMixin(object):
++@@ -57,7 +57,7 @@ class _ResolverErrorTestMixin(object):
 +             return True  # Halt propagation.
 + 
 +         with ExceptionStackContext(handler):
 +-            self.resolver.resolve('an invalid domain', 80, callback=self.stop)
 ++            self.resolver.resolve('anasdas23dadasdasdasdi2n1validsdasdbwefrwfejnefsegfsdomain', 80, callback=self.stop)
 + 
 +         result = self.wait()
 +         self.assertIsInstance(result, Exception)
- @@ -64,7 +64,7 @@ class _ResolverErrorTestMixin(object):
++@@ -65,7 +65,7 @@ class _ResolverErrorTestMixin(object):
 +     @gen_test
 +     def test_future_interface_bad_host(self):
-          with self.assertRaises(Exception):
++         with self.assertRaises(IOError):
 +-            yield self.resolver.resolve('an invalid domain', 80,
 ++            yield self.resolver.resolve('ana8sdasdadasdasdas1d12invalidsdasdbwefrwfejnefsegfsdomain', 80,
 +                                         socket.AF_UNSPEC)
 + 
 + 
diff --cc debian/patches/fix-ftbfs-on-hurd.patch
index e977aec,0000000..d78858d
mode 100644,000000..100644
--- a/debian/patches/fix-ftbfs-on-hurd.patch
+++ b/debian/patches/fix-ftbfs-on-hurd.patch
@@@ -1,28 -1,0 +1,28 @@@
- From 44ee8c84f5de63d02dfee6784814ca823672687a Mon Sep 17 00:00:00 2001
++From 2998294384b06ad3d32359a0ca4bdd85e988149f Mon Sep 17 00:00:00 2001
 +From: Mattia Rizzolo <mattia at debian.org>
 +Date: Sat, 21 May 2016 21:55:27 +0000
 +Subject: skip UnixSocketTest on hurd, as unix sockets with SO_REUSEADDR are
 + not supported there
 +
 + A little discussion about unix sockets with SO_REUSEADDR can be found on
 + https://lists.gnu.org/archive/html/bug-hurd/2016-01/msg00039.html
 +
 +Forwarded: no
 +Patch-Name: fix-ftbfs-on-hurd.patch
 +---
 + tornado/test/httpserver_test.py | 2 ++
 + 1 file changed, 2 insertions(+)
 +
 +diff --git a/tornado/test/httpserver_test.py b/tornado/test/httpserver_test.py
- index 065f5b1..a031ce6 100644
++index 27052e6..1e1a561 100644
 +--- a/tornado/test/httpserver_test.py
 ++++ b/tornado/test/httpserver_test.py
- @@ -544,6 +544,8 @@ class ManualProtocolTest(HandlerBaseTestCase):
++@@ -555,6 +555,8 @@ class ManualProtocolTest(HandlerBaseTestCase):
 + 
 + @unittest.skipIf(not hasattr(socket, 'AF_UNIX') or sys.platform == 'cygwin',
 +                  "unix sockets not supported on this platform")
 ++ at unittest.skipIf(sys.platform == 'gnu0',
 ++                 "unix sockets with SO_REUSEADDR not supported on this platform")
 + class UnixSocketTest(AsyncTestCase):
 +     """HTTPServers can listen on Unix sockets too.
 + 
diff --cc debian/patches/ignoreuserwarning.patch
index 581bc73,0000000..722fd9f
mode 100644,000000..100644
--- a/debian/patches/ignoreuserwarning.patch
+++ b/debian/patches/ignoreuserwarning.patch
@@@ -1,24 -1,0 +1,24 @@@
- From f88277ef89cd9e4d1efdca0b8ce0e1f174bccc12 Mon Sep 17 00:00:00 2001
++From 37c507261d4316955cc831ac44994ce42094cfae Mon Sep 17 00:00:00 2001
 +From: SVN-Git Migration <python-modules-team at lists.alioth.debian.org>
 +Date: Thu, 8 Oct 2015 13:13:31 -0700
 +Subject: ignore userwarning in tests
 +
 + Required to run tests from source with the package already installed.
 + Else one gets check_version_conflict warning from pkg_resources.
 +Patch-Name: ignoreuserwarning.patch
 +---
 + tornado/test/runtests.py | 1 +
 + 1 file changed, 1 insertion(+)
 +
 +diff --git a/tornado/test/runtests.py b/tornado/test/runtests.py
- index ad9b0b8..b3ce9a5 100644
++index f4dd46d..a0c8684 100644
 +--- a/tornado/test/runtests.py
 ++++ b/tornado/test/runtests.py
- @@ -99,6 +99,7 @@ def main():
++@@ -101,6 +101,7 @@ def main():
 +     # setuptools sometimes gives ImportWarnings about things that are on
 +     # sys.path even if they're not being used.
 +     warnings.filterwarnings("ignore", category=ImportWarning)
 ++    warnings.filterwarnings("ignore", category=UserWarning)
 +     # Tornado generally shouldn't use anything deprecated, but some of
 +     # our dependencies do (last match wins).
 +     warnings.filterwarnings("ignore", category=DeprecationWarning)
diff --cc debian/patches/series
index d5dbd2e,0000000..4fb1888
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,7 -1,0 +1,6 @@@
 +domain-test.patch
 +ignoreuserwarning.patch
 +skip-timing-tests.patch
 +sockopt.patch
 +without-certifi.patch
 +fix-ftbfs-on-hurd.patch
- 0007-Fix-testsuite-failure-when-sockets-is-not-defined.patch
diff --cc debian/patches/skip-timing-tests.patch
index 84e1686,0000000..fa1ce1a
mode 100644,000000..100644
--- a/debian/patches/skip-timing-tests.patch
+++ b/debian/patches/skip-timing-tests.patch
@@@ -1,23 -1,0 +1,23 @@@
- From c50883d25b8a4b2812a72ae33e910f9fbd211712 Mon Sep 17 00:00:00 2001
++From 16f3fe74ac2d7ebd92ddd81538f0d1396487f5cb Mon Sep 17 00:00:00 2001
 +From: SVN-Git Migration <python-modules-team at lists.alioth.debian.org>
 +Date: Thu, 8 Oct 2015 13:13:32 -0700
 +Subject: like travis buildd are often slow so skip the same tests
 +
 +Patch-Name: skip-timing-tests.patch
 +---
 + tornado/test/util.py | 2 +-
 + 1 file changed, 1 insertion(+), 1 deletion(-)
 +
 +diff --git a/tornado/test/util.py b/tornado/test/util.py
- index cfa7c81..ac7443c 100644
++index 2e3d779..33b9cf0 100644
 +--- a/tornado/test/util.py
 ++++ b/tornado/test/util.py
 +@@ -23,7 +23,7 @@ skipIfNonUnix = unittest.skipIf(os.name != 'posix' or sys.platform == 'cygwin',
 + 
 + # travis-ci.org runs our tests in an overworked virtual machine, which makes
 + # timing-related tests unreliable.
 +-skipOnTravis = unittest.skipIf('TRAVIS' in os.environ,
 ++skipOnTravis = unittest.skipIf(True,
 +                                'timing tests unreliable on travis')
 + 
 + skipOnAppEngine = unittest.skipIf('APPENGINE_RUNTIME' in os.environ,
diff --cc debian/patches/sockopt.patch
index a528938,0000000..c623e7f
mode 100644,000000..100644
--- a/debian/patches/sockopt.patch
+++ b/debian/patches/sockopt.patch
@@@ -1,55 -1,0 +1,55 @@@
- From 01027078ae92f6b6e7d2147878f06cb6fda81e5f Mon Sep 17 00:00:00 2001
++From cf270226d38a9e231d77fa6b7f4e94358bf8d65f Mon Sep 17 00:00:00 2001
 +From: SVN-Git Migration <python-modules-team at lists.alioth.debian.org>
 +Date: Thu, 8 Oct 2015 13:13:33 -0700
 +Subject: Ignore ENOPROTOOPT errors from SO_REUSEADDR or SO_ERROR on AF_UNIX
 + sockets, for
 +
 +systems which do not implement them there.
 +Patch-Name: sockopt.patch
 +---
 + tornado/iostream.py |  7 ++++++-
 + tornado/netutil.py  | 12 ++++++++++--
 + 2 files changed, 16 insertions(+), 3 deletions(-)
 +
 +diff --git a/tornado/iostream.py b/tornado/iostream.py
- index 4e304f8..d3e0c4a 100644
++index bcf4441..b5f49fa 100644
 +--- a/tornado/iostream.py
 ++++ b/tornado/iostream.py
 +@@ -1174,7 +1174,12 @@ class IOStream(BaseIOStream):
 +         return future
 + 
 +     def _handle_connect(self):
 +-        err = self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
 ++        try:
 ++            err = self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
 ++        except socket.error as e:
 ++            err = e.args[0]
 ++            if err == errno.ENOPROTOOPT:
 ++                err = 0
 +         if err != 0:
 +             self.error = socket.error(err, os.strerror(err))
 +             # IOLoop implementations may vary: some of them return
 +diff --git a/tornado/netutil.py b/tornado/netutil.py
- index 4fc8d04..e6bb0bb 100644
++index 5cbcdb9..b7113d6 100644
 +--- a/tornado/netutil.py
 ++++ b/tornado/netutil.py
- @@ -171,9 +171,17 @@ def bind_sockets(port, address=None, family=socket.AF_UNSPEC,
++@@ -169,9 +169,17 @@ def bind_sockets(port, address=None, family=socket.AF_UNSPEC,
 +             raise
 +         set_close_exec(sock.fileno())
 +         if os.name != 'nt':
 +-            sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
 ++            try:
 ++                sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
 ++            except socket.error as e:
 ++                if e.args[0] != errno.ENOPROTOOPT:
 ++                    raise
 +         if reuse_port:
 +-            sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
 ++            try:
 ++                sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
 ++            except socket.error as e:
 ++                if e.args[0] != errno.ENOPROTOOPT:
 ++                    raise
 +         if af == socket.AF_INET6:
 +             # On linux, ipv6 sockets accept ipv4 too by default,
 +             # but this makes it impossible to bind to both
diff --cc debian/patches/without-certifi.patch
index f96c1a6,0000000..79d8cb1
mode 100644,000000..100644
--- a/debian/patches/without-certifi.patch
+++ b/debian/patches/without-certifi.patch
@@@ -1,91 -1,0 +1,91 @@@
- From 73f44194f23e0f247d8646351dbd5ac61c2b7c8e Mon Sep 17 00:00:00 2001
++From 0e84d753748d9c4eeffd30d2363eeacd9bd79630 Mon Sep 17 00:00:00 2001
 +From: Julien Puydt <julien.puydt at laposte.net>
 +Date: Thu, 8 Oct 2015 13:13:34 -0700
 +Subject: remove dependance on certifi
 +
 + Since Debian is a distribution, we know where the certificates are
 + and don't need certifi to find them.
 +Forwarded: no
 +
 +Patch-Name: without-certifi.patch
 +---
 + setup.py                     |  2 +-
 + tornado/netutil.py           | 13 ++-----------
 + tornado/simple_httpclient.py | 12 +-----------
 + 3 files changed, 4 insertions(+), 23 deletions(-)
 +
 +diff --git a/setup.py b/setup.py
- index a6c7495..9f5cf0c 100644
++index a64bc3a..2423793 100644
 +--- a/setup.py
 ++++ b/setup.py
- @@ -132,7 +132,7 @@ if setuptools is not None:
++@@ -136,7 +136,7 @@ if setuptools is not None:
 +         # Certifi is also optional on 2.7.9+, although making our dependencies
 +         # conditional on micro version numbers seems like a bad idea
 +         # until we have more declarative metadata.
 +-        install_requires.append('certifi')
 ++        # install_requires.append('certifi')
 +     if sys.version_info < (3, 5):
 +         install_requires.append('backports_abc>=0.4')
 +     kwargs['install_requires'] = install_requires
 +diff --git a/tornado/netutil.py b/tornado/netutil.py
- index e6bb0bb..f25fc33 100644
++index b7113d6..d5479ec 100644
 +--- a/tornado/netutil.py
 ++++ b/tornado/netutil.py
- @@ -36,15 +36,6 @@ except ImportError:
++@@ -35,15 +35,6 @@ except ImportError:
++     # ssl is not available on Google App Engine
 +     ssl = None
 + 
-  try:
++-try:
 +-    import certifi
 +-except ImportError:
 +-    # certifi is optional as long as we have ssl.create_default_context.
 +-    if ssl is None or hasattr(ssl, 'create_default_context'):
 +-        certifi = None
 +-    else:
 +-        raise
 +-
- -try:
-      xrange  # py2
-  except NameError:
-      xrange = range  # py3
- @@ -72,7 +63,7 @@ if hasattr(ssl, 'SSLContext'):
++ if PY3:
++     xrange = range
++ 
++@@ -70,7 +61,7 @@ if hasattr(ssl, 'SSLContext'):
 +         # Python 3.2-3.3
 +         _client_ssl_defaults = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
 +         _client_ssl_defaults.verify_mode = ssl.CERT_REQUIRED
 +-        _client_ssl_defaults.load_verify_locations(certifi.where())
 ++        _client_ssl_defaults.load_verify_locations('/etc/ssl/certs/ca-certificates.crt')
 +         _server_ssl_defaults = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
 +         if hasattr(ssl, 'OP_NO_COMPRESSION'):
 +             # Disable TLS compression to avoid CRIME and related attacks.
- @@ -83,7 +74,7 @@ if hasattr(ssl, 'SSLContext'):
++@@ -81,7 +72,7 @@ if hasattr(ssl, 'SSLContext'):
 + elif ssl:
 +     # Python 2.6-2.7.8
 +     _client_ssl_defaults = dict(cert_reqs=ssl.CERT_REQUIRED,
 +-                                ca_certs=certifi.where())
 ++                                ca_certs='/etc/ssl/certs/ca-certificates.crt')
 +     _server_ssl_defaults = {}
 + else:
 +     # Google App Engine
 +diff --git a/tornado/simple_httpclient.py b/tornado/simple_httpclient.py
- index 37b0bc2..456f59c 100644
++index 82f8686..ad49675 100644
 +--- a/tornado/simple_httpclient.py
 ++++ b/tornado/simple_httpclient.py
- @@ -33,18 +33,8 @@ except ImportError:
++@@ -34,18 +34,8 @@ except ImportError:
 +     # ssl is not available on Google App Engine.
 +     ssl = None
 + 
 +-try:
 +-    import certifi
 +-except ImportError:
 +-    certifi = None
 +-
 +-
 + def _default_ca_certs():
 +-    if certifi is None:
 +-        raise Exception("The 'certifi' package is required to use https "
 +-                        "in simple_httpclient")
 +-    return certifi.where()
 +-
 ++    return '/etc/ssl/certs/ca-certificates.crt'
 + 
 + class SimpleAsyncHTTPClient(AsyncHTTPClient):
 +     """Non-blocking HTTP client with no external dependencies.

-- 
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