14
0

Accepting request 722027 from home:TheBlackCat:branches:devel:languages:python

- Split tornado versions into their own packages.
  This package now depends on the current preferred version.

OBS-URL: https://build.opensuse.org/request/show/722027
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tornado?expand=0&rev=102
This commit is contained in:
Todd R
2019-08-09 16:04:51 +00:00
committed by Git OBS Bridge
parent c1d6b694f4
commit cfa3e60698
8 changed files with 20 additions and 318 deletions

6
README.suse Normal file
View File

@@ -0,0 +1,6 @@
This package should always depend on the preferred numbered
version of tornado, so "python-tornadoX" where "X" is the
major version number.
Currently that is python-tornado5 since it is the most
widely-supported.

View File

@@ -1,51 +0,0 @@
From: Benjamin Drung <benjamin.drung@cloud.ionos.com>
Date: Thu, 15 Nov 2018 16:18:51 +0100
Subject: [PATCH] Add support for Python 3.7
---
tornado/gen.py | 3 +--
tornado/queues.py | 1 -
tornado/test/asyncio_test.py | 3 ++-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/tornado/gen.py b/tornado/gen.py
index 99f9106..bdb32ff 100644
--- a/tornado/gen.py
+++ b/tornado/gen.py
@@ -482,9 +482,8 @@ class WaitIterator(object):
self.current_future = done
self.current_index = self._unfinished.pop(done)
- @coroutine
def __aiter__(self):
- raise Return(self)
+ return self
def __anext__(self):
if self.done():
diff --git a/tornado/queues.py b/tornado/queues.py
index 0041a80..141c539 100644
--- a/tornado/queues.py
+++ b/tornado/queues.py
@@ -253,7 +253,6 @@ class Queue(object):
"""
return self._finished.wait(timeout)
- @gen.coroutine
def __aiter__(self):
return _QueueIterator(self)
diff --git a/tornado/test/asyncio_test.py b/tornado/test/asyncio_test.py
index d0e3f2b..ae9125f 100644
--- a/tornado/test/asyncio_test.py
+++ b/tornado/test/asyncio_test.py
@@ -46,7 +46,8 @@ class AsyncIOLoopTest(AsyncTestCase):
if hasattr(asyncio, 'ensure_future'):
ensure_future = asyncio.ensure_future
else:
- ensure_future = asyncio.async
+ # async is a reserved word in Python 3.7
+ ensure_future = getattr(asyncio, "async")
x = yield ensure_future(
asyncio.get_event_loop().run_in_executor(None, lambda: 42))

View File

@@ -1,95 +0,0 @@
From: =?utf-8?b?T25kxZllaiBOb3bDvQ==?= <onovy@debian.org>
Date: Thu, 27 Dec 2018 01:18:41 +0000
Subject: Regenerate test crt
Forwarded: https://github.com/tornadoweb/tornado/pull/2509
---
tornado/test/test.crt | 31 ++++++++++++++++++-------------
tornado/test/test.key | 40 ++++++++++++++++++++++++++--------------
2 files changed, 44 insertions(+), 27 deletions(-)
diff --git a/tornado/test/test.crt b/tornado/test/test.crt
index 25538c8..ffc49b0 100644
--- a/tornado/test/test.crt
+++ b/tornado/test/test.crt
@@ -1,15 +1,20 @@
-----BEGIN CERTIFICATE-----
-MIICSDCCAbGgAwIBAgIJAN1oTowzMbkzMA0GCSqGSIb3DQEBBQUAMD0xCzAJBgNV
-BAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRkwFwYDVQQKDBBUb3JuYWRvIFdl
-YiBUZXN0MB4XDTEwMDgyNTE4MjQ0NFoXDTIwMDgyMjE4MjQ0NFowPTELMAkGA1UE
-BhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExGTAXBgNVBAoMEFRvcm5hZG8gV2Vi
-IFRlc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALirW3mX4jbdFse2aZwW
-zszCJ1IsRDrzALpbvMYLLbIZqo+Z8v5aERKTRQpXFqGaZyY+tdwYy7X7YXcLtKqv
-jnw/MSeIaqkw5pROKz5aR0nkPLvcTmhJVLVPCLc8dFnIlu8aC9TrDhr90P+PzU39
-UG7zLweA9zXKBuW3Tjo5dMP3AgMBAAGjUDBOMB0GA1UdDgQWBBRhJjMBYrzddCFr
-/0vvPyHMeqgo0TAfBgNVHSMEGDAWgBRhJjMBYrzddCFr/0vvPyHMeqgo0TAMBgNV
-HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAGP6GaxSfb21bikcqaK3ZKCC1sRJ
-tiCuv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m/CgR+vhF
+F59/YrzwXj+G8bdbuVl/UbB6f9RSp+Zo93rUZAtPWr77gxLUrcwSRzzDwxFjC2nC
+6eigbkvt1OQY775RwnFAt7HKPclE0Out+cGJIboJuO1f3r57ZdyFH0GzbZEff/7K
+atGXohijWJjYvU4mk0KFHORZrcBpsv9cfkFbmgVmiRwxRJ1tLauHM3Ne+VfqYE5M
+4rTStSyz3ASqVKJ2iFMQueNR/tUOuDlfRt+0nhJMuYSSkW+KTgnwyOGU9cv+mxA=
-----END CERTIFICATE-----
diff --git a/tornado/test/test.key b/tornado/test/test.key
index 577d518..7cb7d8d 100644
--- a/tornado/test/test.key
+++ b/tornado/test/test.key
@@ -1,16 +1,28 @@
-----BEGIN PRIVATE KEY-----
-MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBALirW3mX4jbdFse2
-aZwWzszCJ1IsRDrzALpbvMYLLbIZqo+Z8v5aERKTRQpXFqGaZyY+tdwYy7X7YXcL
-tKqvjnw/MSeIaqkw5pROKz5aR0nkPLvcTmhJVLVPCLc8dFnIlu8aC9TrDhr90P+P
-zU39UG7zLweA9zXKBuW3Tjo5dMP3AgMBAAECgYEAiygNaWYrf95AcUQi9w00zpUr
-nj9fNvCwxr2kVbRMvd2balS/CC4EmXPCXdVcZ3B7dBVjYzSIJV0Fh/iZLtnVysD9
-fcNMZ+Cz71b/T0ItsNYOsJk0qUVyP52uqsqkNppIPJsD19C+ZeMLZj6iEiylZyl8
-2U16c/kVIjER63mUEGkCQQDayQOTGPJrKHqPAkUqzeJkfvHH2yCf+cySU+w6ezyr
-j9yxcq8aZoLusCebDVT+kz7RqnD5JePFvB38cMuepYBLAkEA2BTFdZx30f4moPNv
-JlXlPNJMUTUzsXG7n4vNc+18O5ous0NGQII8jZWrIcTrP8wiP9fF3JwUsKrJhcBn
-xRs3hQJBAIDUgz1YIE+HW3vgi1gkOh6RPdBAsVpiXtr/fggFz3j60qrO7FswaAMj
-SX8c/6KUlBYkNjgP3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tFsLFOmlJpGL9n3sX8UnkJN90oHfWrzJ8BZnXaSw2eOuyw8LLj+
+Q+ISl6Go8/xfsuy3EDv4AP1wCwKBgQDJJ4vEV3Kr+bc6N/xeu+G0oHvRAWwuQpcx
+9D+XpnqbJbFDnWKNE7oGsDCs8Qjr0CdFUN1pm1ppITDZ5N1cWuDg/47ZAXqEK6D1
+z13S7O0oQPlnsPL7mHs2Vl73muAaBPAojFvceHHfccr7Z94BXqKsiyfaWz6kclT/
+Nl4JTdsC3QKBgQCeYgozL2J/da2lUhnIXcyPstk+29kbueFYu/QBh2HwqnzqqLJ4
+5+t2H3P3plQUFp/DdDSZrvhcBiTsKiNgqThEtkKtfSCvIvBf4a2W/4TJsW6MzxCm
+2KQDuK/UqM4Y+APKWN/N6Lln2VWNbNyBkWuuRVKFatccyJyJnSjxeqW7cwKBgGyN
+idCYPIrwROAHLItXKvOWE5t0ABRq3TsZC2RkdA/b5HCPs4pclexcEriRjvXrK/Yt
+MH94Ve8b+UftSUQ4ytjBMS6MrLg87y0YDhLwxv8NKUq65DXAUOW+8JsAmmWQOqY3
+MK+m1BT4TMklgVoN3w3sPsKIsSJ/jLz5cv/kYweFAoGAG4iWU1378tI2Ts/Fngsv
+7eoWhoda77Y9D0Yoy20aN9VdMHzIYCBOubtRPEuwgaReNwbUBWap01J63yY/fF3K
+8PTz6covjoOJqxQJOvM7nM0CsJawG9ccw3YXyd9KgRIdSt6ooEhb7N8W2EXYoKl3
+g1i2t41Q/SC3HUGC5mJjpO8=
-----END PRIVATE KEY-----

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 9 16:02:49 UTC 2019 - Todd R <toddrme2178@gmail.com>
- Split tornado versions into their own packages.
This package now depends on the current preferred version.
-------------------------------------------------------------------
Thu Mar 7 11:27:44 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@@ -16,61 +16,18 @@
#
%bcond_without python2
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-tornado
Version: 4.5.3
Version: 5
Release: 0
Summary: Open source version of scalable, non-blocking web server that power FriendFeed
License: Apache-2.0
Source0: README.suse
Group: Development/Languages/Python
Url: http://www.tornadoweb.org
Source: https://files.pythonhosted.org/packages/source/t/tornado/tornado-%{version}.tar.gz
Patch1: tornado-testsuite_timeout.patch
# meshed from upstream and local changes (Tornado 5 update blocked by salt)
Patch2: asyncio.patch
Patch3: openssl-cert-size.patch
Patch4: skip-failing-tests.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pycurl}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module simplejson}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python
Requires: python-simplejson
%if 0%{?suse_version} || 0%{?fedora_version} || 0%{?rhel} >= 8
Recommends: python-Twisted
Recommends: python-pycares
Recommends: python-pycurl
Recommends: python-service_identity
%endif
%if 0%{?sle_version} == 120300 || 0%{?sle_version} == 120400 || 0%{?fedora} || 0%{?rhel}
BuildRequires: %{python_module backports_abc}
%endif
%if 0%{?sle_version} == 120000 && !0%{?is_opensuse}
BuildRequires: %{python_module backports.ssl_match_hostname}
BuildRequires: %{python_module certifi}
%endif
%if %{with python2}
BuildRequires: python-futures
BuildRequires: python-singledispatch
%endif
# SECTION test requirements
BuildRequires: python-backports_abc
%if %{python3_version_nodots} < 35
BuildRequires: python3-backports_abc
%endif
# /SECTION
%if %{python_version_nodots} < 35
Requires: python-backports_abc
%endif
%ifpython2
Requires: python-singledispatch
%if 0%{?suse_version} || 0%{?fedora_version} || 0%{?rhel} >= 8
Recommends: python-futures
%endif
%endif
Requires: python-tornado5
BuildArch: noarch
%python_subpackages
%description
@@ -90,36 +47,15 @@ FriendFeed servers. (For more information on scaling servers to support
thousands of clients, see The C10K problem.)
%prep
%setup -q -n tornado-%{version}
# Fix non-executable script rpmlint issue:
find demos tornado -name "*.py" -exec sed -i "/#\!\/usr\/bin\/.*/d" {} \;
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%pre
# remove egg-info _file_, being replaced by an egg-info directory
if [ -f %{python_sitearch}/tornado-%{version}-py%{python_version}.egg-info ]; then
rm %{python_sitearch}/tornado-%{version}-py%{python_version}.egg-info
fi
cp %{SOURCE0} .
%build
%python_build
# None
%install
%python_install
%fdupes -s demos
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
export ASYNC_TEST_TIMEOUT=30
%python_exec -m tornado.test.runtests
# None
%files %{python_files}
%license LICENSE
%doc demos
%{python_sitearch}/tornado
%{python_sitearch}/tornado-%{version}-py*.egg-info
%doc README.suse
%changelog

View File

@@ -1,48 +0,0 @@
From: Benjamin Drung <benjamin.drung@cloud.ionos.com>
Date: Tue, 18 Dec 2018 18:35:28 +0100
Subject: [PATCH] Skip failing openssl 1.1.1 tests (for now)
Four tests fail when using openssl 1.1.1 with TLS 1.3 support. Disable
these tests for now. Please fix the bug and re-enable them again.
Bug: https://github.com/tornadoweb/tornado/issues/2536
---
tornado/test/iostream_test.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tornado/test/iostream_test.py b/tornado/test/iostream_test.py
index 56fffe6..b1d5f5d 100644
--- a/tornado/test/iostream_test.py
+++ b/tornado/test/iostream_test.py
@@ -212,6 +212,7 @@ class TestIOStreamMixin(object):
server.close()
client.close()
+ @unittest.skip("Failing when using openssl 1.1.1 with TLS 1.3 support. See https://github.com/tornadoweb/tornado/issues/2536")
def test_write_zero_bytes(self):
# Attempting to write zero bytes should run the callback without
# going into an infinite loop.
@@ -437,6 +438,7 @@ class TestIOStreamMixin(object):
server.close()
client.close()
+ @unittest.skip("Failing when using openssl 1.1.1 with TLS 1.3 support. See https://github.com/tornadoweb/tornado/issues/2536")
def test_read_until_close_after_close(self):
# Similar to test_delayed_close_callback, but read_until_close takes
# a separate code path so test it separately.
@@ -469,6 +471,7 @@ class TestIOStreamMixin(object):
server.close()
client.close()
+ @unittest.skip("Failing when using openssl 1.1.1 with TLS 1.3 support. See https://github.com/tornadoweb/tornado/issues/2536")
def test_streaming_read_until_close_after_close(self):
# Same as the preceding test but with a streaming_callback.
# All data should go through the streaming callback,
@@ -540,6 +543,7 @@ class TestIOStreamMixin(object):
@skipIfNonUnix
@skipPypy3V58
+ @unittest.skip("Failing when using openssl 1.1.1 with TLS 1.3 support. See https://github.com/tornadoweb/tornado/issues/2536")
def test_inline_read_error(self):
# An error on an inline read is raised without logging (on the
# assumption that it will eventually be noticed or logged further

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6d14e47eab0e15799cf3cdcc86b0b98279da68522caace2bd7ce644287685f0a
size 484221

View File

@@ -1,49 +0,0 @@
--- 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)