From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5C489138334 for ; Sat, 14 Jul 2018 10:40:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9F9C5E0A65; Sat, 14 Jul 2018 10:40:20 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 471C2E0A65 for ; Sat, 14 Jul 2018 10:40:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A0DAF335C99 for ; Sat, 14 Jul 2018 10:40:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1A2FD370 for ; Sat, 14 Jul 2018 10:40:06 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1531564796.ec359b78d0555300752968ebaf7729e0f3023d33.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/urllib3/, dev-python/urllib3/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/urllib3/files/urllib3-1.23-tornado5.patch dev-python/urllib3/urllib3-1.23.ebuild X-VCS-Directories: dev-python/urllib3/ dev-python/urllib3/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: ec359b78d0555300752968ebaf7729e0f3023d33 X-VCS-Branch: master Date: Sat, 14 Jul 2018 10:40:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 614eb5be-ecdb-4371-a5fd-f30e1cf319e9 X-Archives-Hash: 10aec4606be47df5dd78dbeef859d567 commit: ec359b78d0555300752968ebaf7729e0f3023d33 Author: Michał Górny gentoo org> AuthorDate: Sat Jul 14 10:39:41 2018 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Jul 14 10:39:56 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec359b78 dev-python/urllib3: Add tornado-5 support .../urllib3/files/urllib3-1.23-tornado5.patch | 72 ++++++++++++++++++++++ dev-python/urllib3/urllib3-1.23.ebuild | 6 +- 2 files changed, 77 insertions(+), 1 deletion(-) diff --git a/dev-python/urllib3/files/urllib3-1.23-tornado5.patch b/dev-python/urllib3/files/urllib3-1.23-tornado5.patch new file mode 100644 index 00000000000..b5224564c56 --- /dev/null +++ b/dev-python/urllib3/files/urllib3-1.23-tornado5.patch @@ -0,0 +1,72 @@ +From f8c3e96df731eccda202e0dc909f0a51cdc41267 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sat, 14 Jul 2018 12:21:50 +0200 +Subject: [PATCH] dummyserver: Update for tornado-5 API changes + +Tornado 5 has apparently removed support for multiple IOLoops, +and appropriately removed the io_loop parameter to the server class +in favor of using IOLoop.current(). Update the tests to use the latter. +The code remains compatible with tornado-4. +--- + dummyserver/server.py | 9 +++++---- + dummyserver/testcase.py | 4 ++-- + 2 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/dummyserver/server.py b/dummyserver/server.py +index e1745b7..3ba5124 100755 +--- a/dummyserver/server.py ++++ b/dummyserver/server.py +@@ -226,15 +226,16 @@ def bind_sockets(port, address=None, family=socket.AF_UNSPEC, backlog=128, + + + def run_tornado_app(app, io_loop, certs, scheme, host): ++ assert io_loop == tornado.ioloop.IOLoop.current() ++ + # We can't use fromtimestamp(0) because of CPython issue 29097, so we'll + # just construct the datetime object directly. + app.last_req = datetime(1970, 1, 1) + + if scheme == 'https': +- http_server = tornado.httpserver.HTTPServer(app, ssl_options=certs, +- io_loop=io_loop) ++ http_server = tornado.httpserver.HTTPServer(app, ssl_options=certs) + else: +- http_server = tornado.httpserver.HTTPServer(app, io_loop=io_loop) ++ http_server = tornado.httpserver.HTTPServer(app) + + sockets = bind_sockets(None, address=host) + port = sockets[0].getsockname()[1] +@@ -268,7 +269,7 @@ if __name__ == '__main__': + from .testcase import TestingApp + host = '127.0.0.1' + +- io_loop = tornado.ioloop.IOLoop() ++ io_loop = tornado.ioloop.IOLoop.current() + app = tornado.web.Application([(r".*", TestingApp)]) + server, port = run_tornado_app(app, io_loop, None, + 'http', host) +diff --git a/dummyserver/testcase.py b/dummyserver/testcase.py +index f73f028..d9ff8cf 100644 +--- a/dummyserver/testcase.py ++++ b/dummyserver/testcase.py +@@ -124,7 +124,7 @@ class HTTPDummyServerTestCase(unittest.TestCase): + + @classmethod + def _start_server(cls): +- cls.io_loop = ioloop.IOLoop() ++ cls.io_loop = ioloop.IOLoop.current() + app = web.Application([(r".*", TestingApp)]) + cls.server, cls.port = run_tornado_app(app, cls.io_loop, cls.certs, + cls.scheme, cls.host) +@@ -170,7 +170,7 @@ class HTTPDummyProxyTestCase(unittest.TestCase): + + @classmethod + def setUpClass(cls): +- cls.io_loop = ioloop.IOLoop() ++ cls.io_loop = ioloop.IOLoop.current() + + app = web.Application([(r'.*', TestingApp)]) + cls.http_server, cls.http_port = run_tornado_app( +-- +2.18.0 + diff --git a/dev-python/urllib3/urllib3-1.23.ebuild b/dev-python/urllib3/urllib3-1.23.ebuild index 7ac1e3770eb..7dad09add02 100644 --- a/dev-python/urllib3/urllib3-1.23.ebuild +++ b/dev-python/urllib3/urllib3-1.23.ebuild @@ -33,7 +33,6 @@ DEPEND=" test? ( ${RDEPEND} >=www-servers/tornado-4.2.1[$(python_gen_usedep 'python*')] -