From 352f85d701f7811e74c1f67bf2be838bb387cf18606c2ec827a05006df9eb53f Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 19 Jul 2018 07:35:04 +0000 Subject: [PATCH] Revert: tornado 5.1 breaks salt (boo#1101780) OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-tornado?expand=0&rev=50 --- python-tornado.changes | 10 ------- python-tornado.spec | 13 +++++---- tornado-4.5.3.tar.gz | 3 ++ tornado-5.1.tar.gz | 3 -- tornado-async-deprecations.patch | 14 +++++++++ tornado-testsuite_timeout.patch | 49 ++++++++++++++++++++++++++++++++ 6 files changed, 74 insertions(+), 18 deletions(-) create mode 100644 tornado-4.5.3.tar.gz delete mode 100644 tornado-5.1.tar.gz create mode 100644 tornado-async-deprecations.patch create mode 100644 tornado-testsuite_timeout.patch diff --git a/python-tornado.changes b/python-tornado.changes index bcf7228..49aeb98 100644 --- a/python-tornado.changes +++ b/python-tornado.changes @@ -1,13 +1,3 @@ -------------------------------------------------------------------- -Sun Jul 15 21:17:57 UTC 2018 - mimi.vx@gmail.com - -- update to 5.1 -- drop tornado-async-deprecations.patch - tornado-testsuite_timeout.patch - * support python 3.7 - * big bunch of changes, please check: - http://www.tornadoweb.org/en/stable/releases.html - ------------------------------------------------------------------- Thu May 10 16:35:09 UTC 2018 - toddrme2178@gmail.com diff --git a/python-tornado.spec b/python-tornado.spec index aa3dc27..3b7cb86 100644 --- a/python-tornado.spec +++ b/python-tornado.spec @@ -16,16 +16,18 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-tornado -Version: 5.1 +Version: 4.5.3 Release: 0 Summary: Open source version of scalable, non-blocking web server that power FriendFeed License: Apache-2.0 Group: Development/Languages/Python -URL: http://www.tornadoweb.org +Url: http://www.tornadoweb.org Source: https://files.pythonhosted.org/packages/source/t/tornado/tornado-%{version}.tar.gz +Patch0: tornado-async-deprecations.patch +Patch1: tornado-testsuite_timeout.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module pycurl} BuildRequires: %{python_module setuptools} @@ -88,6 +90,8 @@ thousands of clients, see The C10K problem.) %setup -q -n tornado-%{version} # Fix non-executable script rpmlint issue: find demos tornado -name "*.py" -exec sed -i "/#\!\/usr\/bin\/.*/d" {} \; +%patch0 -p1 +%patch1 -p1 %pre # remove egg-info _file_, being replaced by an egg-info directory @@ -108,8 +112,7 @@ export ASYNC_TEST_TIMEOUT=30 %python_exec -m tornado.test.runtests %files %{python_files} -%license LICENSE -%doc demos +%doc demos LICENSE %{python_sitearch}/tornado %{python_sitearch}/tornado-%{version}-py*.egg-info diff --git a/tornado-4.5.3.tar.gz b/tornado-4.5.3.tar.gz new file mode 100644 index 0000000..59cb582 --- /dev/null +++ b/tornado-4.5.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d14e47eab0e15799cf3cdcc86b0b98279da68522caace2bd7ce644287685f0a +size 484221 diff --git a/tornado-5.1.tar.gz b/tornado-5.1.tar.gz deleted file mode 100644 index c87cb63..0000000 --- a/tornado-5.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4f66a2172cb947387193ca4c2c3e19131f1c70fa8be470ddbbd9317fd0801582 -size 516359 diff --git a/tornado-async-deprecations.patch b/tornado-async-deprecations.patch new file mode 100644 index 0000000..b3bc66b --- /dev/null +++ b/tornado-async-deprecations.patch @@ -0,0 +1,14 @@ +Index: tornado-4.4.2/tornado/test/runtests.py +=================================================================== +--- tornado-4.4.2.orig/tornado/test/runtests.py ++++ tornado-4.4.2/tornado/test/runtests.py +@@ -125,6 +125,9 @@ def main(): + # 3.5.2's PendingDeprecationWarning became a DeprecationWarning in 3.6. + warnings.filterwarnings("ignore", category=DeprecationWarning, + message=".*legacy __aiter__ protocol") ++ # simply ignore all async-related deprecations, for a rough support for python 3.6 ++ warnings.filterwarnings("ignore", category=DeprecationWarning, ++ message="async") + + logging.getLogger("tornado.access").setLevel(logging.CRITICAL) + diff --git a/tornado-testsuite_timeout.patch b/tornado-testsuite_timeout.patch new file mode 100644 index 0000000..092be36 --- /dev/null +++ b/tornado-testsuite_timeout.patch @@ -0,0 +1,49 @@ +--- tornado-4.5.3/tornado/test/simple_httpclient_test.py 2018/03/16 13:18:41 1.1 ++++ tornado-4.5.3/tornado/test/simple_httpclient_test.py 2018/03/16 13:41:14 +@@ -239,7 +239,7 @@ + @skipOnTravis + def test_connect_timeout(self): + timeout = 0.1 +- timeout_min, timeout_max = 0.099, 1.0 ++ timeout_min, timeout_max = 0.099, 3.0 + + class TimeoutResolver(Resolver): + def resolve(self, *args, **kwargs): +@@ -257,7 +257,7 @@ + @skipOnTravis + def test_request_timeout(self): + timeout = 0.1 +- timeout_min, timeout_max = 0.099, 0.15 ++ timeout_min, timeout_max = 0.099, 0.25 + if os.name == 'nt': + timeout = 0.5 + timeout_min, timeout_max = 0.4, 0.6 +@@ -360,7 +360,7 @@ + response = self.wait() + + self.assertEqual(response.code, 599) +- self.assertTrue(response.request_time < 1, response.request_time) ++ self.assertTrue(response.request_time < 2.5, response.request_time) + self.assertEqual(str(response.error), "HTTP 599: Timeout in request queue") + self.triggers.popleft()() + self.wait() +--- tornado-4.5.3/tornado/test/testing_test.py 2018/03/16 13:18:44 1.1 ++++ tornado-4.5.3/tornado/test/testing_test.py 2018/03/16 13:18:56 +@@ -61,7 +61,7 @@ + self.io_loop.add_timeout(self.io_loop.time() + 0.00, self.stop) + self.wait(timeout=0.02) + self.io_loop.add_timeout(self.io_loop.time() + 0.03, self.stop) +- self.wait(timeout=0.15) ++ self.wait(timeout=0.25) + + def test_multiple_errors(self): + def fail(message): +@@ -206,7 +206,7 @@ + self.finished = True + + def test_timeout_environment_variable(self): +- @gen_test(timeout=0.5) ++ @gen_test(timeout=0.9) + def test_long_timeout(self): + time = self.io_loop.time + yield gen.Task(self.io_loop.add_timeout, time() + 0.25)