[Python-modules-commits] [python-tornado] 10/17: merge patched into master
Ondrej Novy
onovy at debian.org
Mon Jan 15 13:07:43 UTC 2018
This is an automated email from the git hooks/post-receive script.
onovy pushed a commit to branch master
in repository python-tornado.
commit 14bd0c2eb0928784bd101738aa70d4e3ebe26d2e
Merge: 8773d1a cc63163
Author: Ondřej Nový <onovy at debian.org>
Date: Mon Jan 15 12:57:06 2018 +0100
merge patched into master
.travis.yml | 3 +-
debian/.git-dpm | 6 +--
...local-objects.inv-for-intersphinx-mapping.patch | 2 +-
debian/patches/disable-domain-tests.patch | 2 +-
debian/patches/fix-ftbfs-on-hurd.patch | 4 +-
debian/patches/ignoreuserwarning.patch | 2 +-
debian/patches/skip-timing-tests.patch | 6 +--
debian/patches/sockopt.patch | 6 +--
debian/patches/without-certifi.patch | 4 +-
docs/releases.rst | 1 +
docs/releases/v4.5.3.rst | 49 ++++++++++++++++++++++
setup.py | 2 +-
tornado/__init__.py | 4 +-
tornado/curl_httpclient.py | 1 +
tornado/http1connection.py | 10 +++--
tornado/iostream.py | 18 +++++++-
tornado/options.py | 6 +--
tornado/test/httpserver_test.py | 7 +++-
tornado/test/iostream_test.py | 6 ++-
tornado/test/options_test.py | 20 ++++++++-
tornado/test/simple_httpclient_test.py | 15 ++-----
tornado/test/util.py | 44 +++++++++++++++++--
tornado/test/web_test.py | 4 +-
tornado/test/websocket_test.py | 7 ++++
tornado/testing.py | 2 +-
tornado/web.py | 3 +-
tornado/websocket.py | 8 ++++
27 files changed, 190 insertions(+), 52 deletions(-)
diff --cc debian/.git-dpm
index bd5245c,0000000..04a9db3
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
- ae886c3d0c8290e2b5092b2bd6616cf49ce7743c
- ae886c3d0c8290e2b5092b2bd6616cf49ce7743c
- e889a879916c589d031215316fdabded28f62a9d
++cc6316374c95737dbd2233796aec410306c93d03
++cc6316374c95737dbd2233796aec410306c93d03
++fc4b473db4e6d6591c63f1b03ebee1fd3f4eeea1
+fc4b473db4e6d6591c63f1b03ebee1fd3f4eeea1
+python-tornado_4.5.3.orig.tar.gz
+068448750104012deed1186e25cb2513356d1cca
+507307
+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 c027f7d,0000000..e770d2e
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 ae886c3d0c8290e2b5092b2bd6616cf49ce7743c Mon Sep 17 00:00:00 2001
++From cc6316374c95737dbd2233796aec410306c93d03 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 5bc6635..13a098d 100644
+--- a/docs/conf.py
++++ b/docs/conf.py
+@@ -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 1d0d136,0000000..e039b23
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 580709c89ead6ee26ee602d3f7eb33af579f0387 Mon Sep 17 00:00:00 2001
++From 31b5f00e4189ec7e619992eca1770398a2e4dbaf 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 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 410695e,0000000..5d56d5c
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 2e6b95748a85d9110f1cc76cfe8b83ebf0d2a76b Mon Sep 17 00:00:00 2001
++From d2f9e204430b258a05de0d81776a41b654809788 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 11cb723..3535c56 100644
++index 59eb6fd..5da7271 100644
+--- a/tornado/test/httpserver_test.py
++++ b/tornado/test/httpserver_test.py
+@@ -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 e0b1281,0000000..53819bd
mode 100644,000000..100644
--- a/debian/patches/ignoreuserwarning.patch
+++ b/debian/patches/ignoreuserwarning.patch
@@@ -1,24 -1,0 +1,24 @@@
- From 42aee5633b7c0dba08177b8089e0bd92fdd3fc6d Mon Sep 17 00:00:00 2001
++From 605566d38eed104b9e5ece9870ff228488e0d269 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 b81c5f2..b4b2569 100644
+--- a/tornado/test/runtests.py
++++ b/tornado/test/runtests.py
+@@ -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 871de3a,0000000..1e4ae3d
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 1209b9b0d8883e9a141385b5e47bdf4f66853321 Mon Sep 17 00:00:00 2001
++From 2bc847616d56623a3038419d84f5c09e93c6c290 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 6c032da..e819771 100644
++index 90a9c7b..126d426 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',
++@@ -24,7 +24,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 b13fbd8,0000000..252c7ff
mode 100644,000000..100644
--- a/debian/patches/sockopt.patch
+++ b/debian/patches/sockopt.patch
@@@ -1,55 -1,0 +1,55 @@@
- From 372e881ad0340313dce63bbce2bbc1ef55110cb5 Mon Sep 17 00:00:00 2001
++From 7d1cb0dd05fedcdb13740ce24b798b7adf673f31 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 a1619c4..1b64723 100644
++index 639ed50..279e558 100644
+--- a/tornado/iostream.py
++++ b/tornado/iostream.py
- @@ -1214,7 +1214,12 @@ class IOStream(BaseIOStream):
++@@ -1219,7 +1219,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 5233b20..af8e0ca 100644
+--- a/tornado/netutil.py
++++ b/tornado/netutil.py
+@@ -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 7fde296,0000000..6deff66
mode 100644,000000..100644
--- a/debian/patches/without-certifi.patch
+++ b/debian/patches/without-certifi.patch
@@@ -1,91 -1,0 +1,91 @@@
- From a5406c8674f27e9800fe8e17f7cc95d4b4db168d Mon Sep 17 00:00:00 2001
++From 072a0c3c557ff1da84c2a2b641edf57db20147df 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 66d846b..026775f 100644
++index a1feea6..a475920 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 af8e0ca..b0e49fc 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 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