[Python-modules-commits] [python-tornado] 10/14: merge patched into master
Ondřej Nový
onovy at moszumanska.debian.org
Fri May 12 14:52:10 UTC 2017
This is an automated email from the git hooks/post-receive script.
onovy pushed a commit to branch master
in repository python-tornado.
commit 320e29bd81e563ac0ca9fcda2d521119cdec9d11
Merge: 48d52eb 7c7251b
Author: Ondřej Nový <onovy at debian.org>
Date: Fri May 12 16:13:44 2017 +0200
merge patched into master
.travis.yml | 31 +-
MANIFEST.in | 1 +
appveyor.yml | 16 +-
debian/.git-dpm | 6 +-
...local-objects.inv-for-intersphinx-mapping.patch | 8 +-
debian/patches/disable-domain-tests.patch | 4 +-
debian/patches/fix-ftbfs-on-hurd.patch | 6 +-
debian/patches/ignoreuserwarning.patch | 6 +-
debian/patches/skip-timing-tests.patch | 4 +-
debian/patches/sockopt.patch | 10 +-
debian/patches/without-certifi.patch | 8 +-
demos/chat/static/chat.js | 9 +-
demos/chat/templates/index.html | 4 +-
demos/file_upload/file_receiver.py | 63 +++
demos/file_upload/file_uploader.py | 114 ++++
demos/tcpecho/README.md | 30 +
demos/tcpecho/client.py | 23 +
demos/tcpecho/server.py | 34 ++
demos/websocket/static/chat.js | 4 +-
demos/websocket/templates/index.html | 2 +-
docs/conf.py | 17 +-
docs/gen.rst | 2 +
docs/guide/coroutines.rst | 28 +-
docs/guide/structure.rst | 6 +-
docs/httpclient.rst | 8 +
docs/index.rst | 36 +-
docs/locks.rst | 10 +-
docs/releases.rst | 2 +
docs/releases/v2.3.0.rst | 2 +-
docs/releases/v3.2.0.rst | 8 +-
docs/releases/v4.1.0.rst | 2 +-
docs/releases/v4.5.0.rst | 231 ++++++++
docs/releases/v4.5.1.rst | 15 +
docs/routing.rst | 5 +
docs/web.rst | 16 +-
docs/webframework.rst | 1 +
docs/websocket.rst | 1 +
maint/circlerefs/circlerefs.py | 100 ++++
maint/requirements.txt | 62 +-
maint/scripts/custom_fixers/fix_future_imports.py | 3 +-
maint/test/cython/tox.ini | 3 +-
maint/vm/README | 4 +-
maint/vm/ubuntu10.04/Vagrantfile | 9 -
maint/vm/ubuntu10.04/setup.sh | 43 --
maint/vm/ubuntu10.04/tox.ini | 14 -
setup.py | 4 +-
tornado/__init__.py | 6 +-
tornado/_locale_data.py | 2 +-
tornado/auth.py | 25 +-
tornado/autoreload.py | 9 +-
tornado/concurrent.py | 19 +-
tornado/curl_httpclient.py | 14 +-
tornado/escape.py | 6 +-
tornado/gen.py | 69 ++-
tornado/http1connection.py | 7 +-
tornado/httpclient.py | 47 +-
tornado/httpserver.py | 113 ++--
tornado/httputil.py | 41 +-
tornado/ioloop.py | 67 +--
tornado/iostream.py | 236 ++++----
tornado/locale.py | 8 +-
tornado/locks.py | 2 +-
tornado/log.py | 83 ++-
tornado/netutil.py | 6 +-
tornado/options.py | 2 +-
tornado/platform/asyncio.py | 5 +-
tornado/platform/auto.py | 2 +-
tornado/platform/caresresolver.py | 2 +-
tornado/platform/common.py | 25 +-
tornado/platform/epoll.py | 2 +-
tornado/platform/interface.py | 3 +-
tornado/platform/kqueue.py | 2 +-
tornado/platform/posix.py | 8 +-
tornado/platform/select.py | 2 +-
tornado/platform/twisted.py | 3 +-
tornado/platform/windows.py | 2 +-
tornado/process.py | 8 +-
tornado/queues.py | 12 +-
tornado/routing.py | 625 +++++++++++++++++++++
tornado/simple_httpclient.py | 7 +-
tornado/stack_context.py | 4 +-
tornado/tcpclient.py | 55 +-
tornado/tcpserver.py | 28 +-
tornado/template.py | 6 +-
tornado/test/__main__.py | 2 +-
tornado/test/asyncio_test.py | 12 +-
tornado/test/auth_test.py | 7 +-
tornado/test/concurrent_test.py | 24 +-
tornado/test/curl_httpclient_test.py | 2 +-
tornado/test/escape_test.py | 2 +-
tornado/test/gen_test.py | 97 +++-
tornado/test/gettext_translations/extract_me.py | 2 +-
tornado/test/http1connection_test.py | 2 +-
tornado/test/httpclient_test.py | 2 +-
tornado/test/httpserver_test.py | 34 +-
tornado/test/httputil_test.py | 41 +-
tornado/test/import_test.py | 4 +-
tornado/test/ioloop_test.py | 22 +-
tornado/test/iostream_test.py | 47 +-
tornado/test/locale_test.py | 2 +-
tornado/test/locks_test.py | 2 +-
tornado/test/log_test.py | 2 +-
tornado/test/netutil_test.py | 2 +-
tornado/test/options_test.py | 4 +-
tornado/test/process_test.py | 27 +-
tornado/test/queues_test.py | 2 +-
tornado/test/resolve_test_helper.py | 2 +-
tornado/test/routing_test.py | 224 ++++++++
tornado/test/runtests.py | 7 +-
tornado/test/simple_httpclient_test.py | 2 +-
tornado/test/stack_context_test.py | 3 +-
tornado/test/tcpclient_test.py | 43 +-
tornado/test/tcpserver_test.py | 33 +-
tornado/test/template_test.py | 11 +-
tornado/test/testing_test.py | 2 +-
tornado/test/twisted_test.py | 2 +-
tornado/test/util.py | 20 +-
tornado/test/util_test.py | 9 +-
tornado/test/web_test.py | 57 +-
tornado/test/websocket_test.py | 224 +++++++-
tornado/test/windows_test.py | 2 +
tornado/test/wsgi_test.py | 6 +-
tornado/testing.py | 13 +-
tornado/util.py | 44 +-
tornado/web.py | 484 ++++++++--------
tornado/websocket.py | 314 ++++++++---
tornado/wsgi.py | 2 +-
tox.ini | 19 +-
128 files changed, 3474 insertions(+), 968 deletions(-)
diff --cc debian/.git-dpm
index 9054aca,0000000..ef07ff1
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
- 04e2fd04b7f435d5525a1d33161b1785d5cd9820
- 04e2fd04b7f435d5525a1d33161b1785d5cd9820
- c880b2d287eaa8696152bea04f15ff37ab39f837
++7c7251be13fd9a646e6bec11445fb460788edbee
++7c7251be13fd9a646e6bec11445fb460788edbee
++1f987a3c9a55782f3e1e10c318c91cae71630000
+1f987a3c9a55782f3e1e10c318c91cae71630000
+python-tornado_4.5.1.orig.tar.gz
+ff3bf2aa0e3d9bab73f067388865cb66dbc1ba4b
+506087
+debianTag="debian/%e%v"
+patchedTag="patched/%e%v"
+upstreamTag="upstream/%e%u"
diff --cc debian/patches/0007-Use-local-objects.inv-for-intersphinx-mapping.patch
index 6425003,0000000..7195d2c
mode 100644,000000..100644
--- a/debian/patches/0007-Use-local-objects.inv-for-intersphinx-mapping.patch
+++ b/debian/patches/0007-Use-local-objects.inv-for-intersphinx-mapping.patch
@@@ -1,22 -1,0 +1,22 @@@
- From 04e2fd04b7f435d5525a1d33161b1785d5cd9820 Mon Sep 17 00:00:00 2001
++From 7c7251be13fd9a646e6bec11445fb460788edbee Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Nov=C3=BD?= <onovy at debian.org>
+Date: Wed, 3 Aug 2016 19:02:48 +0200
+Subject: Use local objects.inv for intersphinx mapping
+
+---
+ docs/conf.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/docs/conf.py b/docs/conf.py
- index a12e7a4..54b55c2 100644
++index 5bc6635..13a098d 100644
+--- a/docs/conf.py
++++ b/docs/conf.py
- @@ -93,7 +93,7 @@ extlinks = {
- }
++@@ -82,7 +82,7 @@ latex_documents = [
++ ]
+
+ intersphinx_mapping = {
+- 'python': ('https://docs.python.org/3.5/', None),
++ 'python': ('/usr/share/doc/python3-doc/html', None),
+ }
+
+ on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
diff --cc debian/patches/disable-domain-tests.patch
index a6a3ff6,0000000..1224af1
mode 100644,000000..100644
--- a/debian/patches/disable-domain-tests.patch
+++ b/debian/patches/disable-domain-tests.patch
@@@ -1,30 -1,0 +1,30 @@@
- From 3b9d909ec11f0b89775b51ca4c779ad659a4aa52 Mon Sep 17 00:00:00 2001
++From e4208914e75ba45ab974d0284910bd2847aec2c8 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: Disable domain tests to prevent internet access during build
+
+Patch-Name: disable-domain-tests.patch
+---
+ tornado/test/netutil_test.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tornado/test/netutil_test.py b/tornado/test/netutil_test.py
- index 549c4fe..a519bbd 100644
++index 9564290..611d6ff 100644
+--- a/tornado/test/netutil_test.py
++++ b/tornado/test/netutil_test.py
+@@ -51,6 +51,7 @@ class _ResolverTestMixin(object):
+ # It is impossible to quickly and consistently generate an error in name
+ # resolution, so test this case separately, using mocks as needed.
+ class _ResolverErrorTestMixin(object):
++ @unittest.skip("Prevent internet access during build")
+ def test_bad_host(self):
+ def handler(exc_typ, exc_val, exc_tb):
+ self.stop(exc_val)
+@@ -63,6 +64,7 @@ class _ResolverErrorTestMixin(object):
+ self.assertIsInstance(result, Exception)
+
+ @gen_test
++ @unittest.skip("Prevent internet access during build")
+ def test_future_interface_bad_host(self):
+ with self.assertRaises(IOError):
+ yield self.resolver.resolve('an invalid domain', 80,
diff --cc debian/patches/fix-ftbfs-on-hurd.patch
index ef7bdf0,0000000..81a3bd9
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 6d57b019a63677b8771c55489a161b06942e57c7 Mon Sep 17 00:00:00 2001
++From 1796ee69175f8f4cbbb7d42835f54ae1f9c47c94 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 27052e6..1e1a561 100644
++index 11cb723..3535c56 100644
+--- a/tornado/test/httpserver_test.py
++++ b/tornado/test/httpserver_test.py
- @@ -555,6 +555,8 @@ class ManualProtocolTest(HandlerBaseTestCase):
++@@ -581,6 +581,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 dd8559e,0000000..10b7cf3
mode 100644,000000..100644
--- a/debian/patches/ignoreuserwarning.patch
+++ b/debian/patches/ignoreuserwarning.patch
@@@ -1,24 -1,0 +1,24 @@@
- From c01678888c625b66234618eb9250c3cb5f3290eb Mon Sep 17 00:00:00 2001
++From 177428d63e78a27f2167242ef4732d1f42d64c81 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 f4dd46d..a0c8684 100644
++index b81c5f2..b4b2569 100644
+--- a/tornado/test/runtests.py
++++ b/tornado/test/runtests.py
- @@ -101,6 +101,7 @@ def main():
++@@ -102,6 +102,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/skip-timing-tests.patch
index 6db6190,0000000..1fecbf0
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 568f0450d4cead0595436bdb48d2811bbaa33788 Mon Sep 17 00:00:00 2001
++From 50e3471c4b9bbdb18f92a2ee8ea3690b52069f5b 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 2e3d779..33b9cf0 100644
++index 6c032da..e819771 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 ca9b616,0000000..cacf41d
mode 100644,000000..100644
--- a/debian/patches/sockopt.patch
+++ b/debian/patches/sockopt.patch
@@@ -1,55 -1,0 +1,55 @@@
- From 96011f4a076432b45a7af37d9eeb29bddfc9aa14 Mon Sep 17 00:00:00 2001
++From 0ee0b386d8ba476b158abb404c41028d04329243 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 bcf4441..b5f49fa 100644
++index a1619c4..1b64723 100644
+--- a/tornado/iostream.py
++++ b/tornado/iostream.py
- @@ -1174,7 +1174,12 @@ class IOStream(BaseIOStream):
++@@ -1214,7 +1214,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 7bf9321..130966c 100644
++index c34c8c8..c973698 100644
+--- a/tornado/netutil.py
++++ b/tornado/netutil.py
- @@ -169,9 +169,17 @@ def bind_sockets(port, address=None, family=socket.AF_UNSPEC,
++@@ -172,9 +172,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 a71315d,0000000..817b0fb
mode 100644,000000..100644
--- a/debian/patches/without-certifi.patch
+++ b/debian/patches/without-certifi.patch
@@@ -1,91 -1,0 +1,91 @@@
- From e95fba1c03348f56c1143c5520ce22db1ba4a848 Mon Sep 17 00:00:00 2001
++From 94ef97f75dca92fe543fa53a3f25968cfd4d902f 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 0d35a3f..4a1a43f 100644
++index c65e25d..1b46d16 100644
+--- a/setup.py
++++ b/setup.py
+@@ -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 130966c..10ef8d3 100644
++index c973698..1f5afac 100644
+--- a/tornado/netutil.py
++++ b/tornado/netutil.py
+@@ -35,15 +35,6 @@ except ImportError:
+ # ssl is not available on Google App Engine
+ ssl = None
+
+-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
+-
+ 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.
+@@ -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 82f8686..ad49675 100644
++index 8fb7070..c3b3d42 100644
+--- a/tornado/simple_httpclient.py
++++ b/tornado/simple_httpclient.py
+@@ -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