Update to 5.0.2
Add python2-futures as BuildRequires. Fix deprecation warnings when using unittest2. Add the license file within the resulting rpms.
This commit is contained in:
parent
8c53cb110b
commit
96baf859ca
1
.gitignore
vendored
1
.gitignore
vendored
@ -15,3 +15,4 @@ tornado-1.0.1.tar.gz
|
|||||||
/tornado-4.5.tar.gz
|
/tornado-4.5.tar.gz
|
||||||
/tornado-4.5.1.tar.gz
|
/tornado-4.5.1.tar.gz
|
||||||
/tornado-4.5.2.tar.gz
|
/tornado-4.5.2.tar.gz
|
||||||
|
/tornado-5.0.2.tar.gz
|
||||||
|
13
fix-erroneous-deprecation-warnings.patch
Normal file
13
fix-erroneous-deprecation-warnings.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/tornado/test/runtests.py b/tornado/test/runtests.py
|
||||||
|
index d5bd769..e4f938d 100644
|
||||||
|
--- a/tornado/test/runtests.py
|
||||||
|
+++ b/tornado/test/runtests.py
|
||||||
|
@@ -137,6 +137,8 @@ def main():
|
||||||
|
# 2.7 and 3.2
|
||||||
|
warnings.filterwarnings("ignore", category=DeprecationWarning,
|
||||||
|
message="Please use assert.* instead")
|
||||||
|
+ warnings.filterwarnings("ignore", category=PendingDeprecationWarning,
|
||||||
|
+ message="Please use assert.* instead")
|
||||||
|
# Twisted 15.0.0 triggers some warnings on py3 with -bb.
|
||||||
|
warnings.filterwarnings("ignore", category=BytesWarning,
|
||||||
|
module=r"twisted\..*")
|
@ -1,41 +0,0 @@
|
|||||||
diff -up tornado-4.5b2/setup.py.cert tornado-4.5b2/setup.py
|
|
||||||
--- tornado-4.5b2/setup.py.cert 2017-04-10 20:42:50.000000000 -0600
|
|
||||||
+++ tornado-4.5b2/setup.py 2017-04-11 13:30:36.653766615 -0600
|
|
||||||
@@ -133,10 +133,6 @@ if setuptools is not None:
|
|
||||||
install_requires.append('backports.ssl_match_hostname')
|
|
||||||
if sys.version_info < (3, 4):
|
|
||||||
install_requires.append('singledispatch')
|
|
||||||
- # 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')
|
|
||||||
if sys.version_info < (3, 5):
|
|
||||||
install_requires.append('backports_abc>=0.4')
|
|
||||||
kwargs['install_requires'] = install_requires
|
|
||||||
diff -up tornado-4.5b2/tornado/simple_httpclient.py.cert tornado-4.5b2/tornado/simple_httpclient.py
|
|
||||||
--- tornado-4.5b2/tornado/simple_httpclient.py.cert 2017-04-09 21:05:09.000000000 -0600
|
|
||||||
+++ tornado-4.5b2/tornado/simple_httpclient.py 2017-04-11 13:31:06.580629181 -0600
|
|
||||||
@@ -1,4 +1,3 @@
|
|
||||||
-#!/usr/bin/env python
|
|
||||||
from __future__ import absolute_import, division, print_function
|
|
||||||
|
|
||||||
from tornado.escape import utf8, _unicode
|
|
||||||
@@ -34,17 +33,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/pki/tls/cert.pem'
|
|
||||||
|
|
||||||
|
|
||||||
class SimpleAsyncHTTPClient(AsyncHTTPClient):
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up tornado-4.4.1/tornado/test/options_test.py.test tornado-4.4.1/tornado/test/options_test.py
|
|
||||||
--- tornado-4.4.1/tornado/test/options_test.py.test 2016-07-15 09:00:52.000000000 -0600
|
|
||||||
+++ tornado-4.4.1/tornado/test/options_test.py 2016-09-16 10:01:19.542583874 -0600
|
|
||||||
@@ -36,7 +36,7 @@ class OptionsTest(unittest.TestCase):
|
|
||||||
options.define("port", default=80)
|
|
||||||
options.define("username", default='foo')
|
|
||||||
options.define("my_path")
|
|
||||||
- config_path = os.path.join(os.path.dirname(__file__),
|
|
||||||
+ config_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
|
|
||||||
"options_test.cfg")
|
|
||||||
options.parse_config_file(config_path)
|
|
||||||
self.assertEqual(options.port, 443)
|
|
@ -8,16 +8,19 @@
|
|||||||
%global srcname tornado
|
%global srcname tornado
|
||||||
|
|
||||||
Name: python-%{srcname}
|
Name: python-%{srcname}
|
||||||
Version: 4.5.2
|
Version: 5.0.2
|
||||||
Release: 5%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Scalable, non-blocking web server and tools
|
Summary: Scalable, non-blocking web server and tools
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: http://www.tornadoweb.org
|
URL: http://www.tornadoweb.org
|
||||||
Source0: https://files.pythonhosted.org/packages/source/t/tornado/tornado-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/t/tornado/tornado-%{version}.tar.gz
|
||||||
# Patch to use system CA certs instead of certifi
|
|
||||||
Patch0: python-tornado-cert.patch
|
# If unittest2 instead of unittest is used while running the tests,
|
||||||
|
# the deprecation warnings will make the test suite error out.
|
||||||
|
# Fixed upstream: https://github.com/tornadoweb/tornado/pull/2350/commits/1a9b9939376b80d9f053734f539b860e0dca1aff
|
||||||
|
Patch0: fix-erroneous-deprecation-warnings.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
|
||||||
@ -25,6 +28,7 @@ BuildRequires: gcc
|
|||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python2-backports_abc
|
BuildRequires: python2-backports_abc
|
||||||
BuildRequires: python2-singledispatch
|
BuildRequires: python2-singledispatch
|
||||||
|
BuildRequires: python2-futures
|
||||||
%endif # with python2
|
%endif # with python2
|
||||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
@ -86,7 +90,7 @@ ideal for real-time web services.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{srcname}-%{version}
|
%setup -q -n %{srcname}-%{version}
|
||||||
%patch0 -p1 -b .cert
|
%patch0 -p1
|
||||||
# remove shebang from files
|
# remove shebang from files
|
||||||
%{__sed} -i.orig -e '/^#!\//, 1d' *py tornado/*.py tornado/*/*.py
|
%{__sed} -i.orig -e '/^#!\//, 1d' *py tornado/*.py tornado/*/*.py
|
||||||
|
|
||||||
@ -105,6 +109,7 @@ ideal for real-time web services.
|
|||||||
|
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
%files -n python2-%{srcname}
|
%files -n python2-%{srcname}
|
||||||
|
%license LICENSE
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%{python2_sitearch}/%{srcname}/
|
%{python2_sitearch}/%{srcname}/
|
||||||
%{python2_sitearch}/%{srcname}-%{version}-*.egg-info
|
%{python2_sitearch}/%{srcname}-%{version}-*.egg-info
|
||||||
@ -114,12 +119,16 @@ ideal for real-time web services.
|
|||||||
%doc demos
|
%doc demos
|
||||||
|
|
||||||
%files -n python%{python3_pkgversion}-%{srcname}
|
%files -n python%{python3_pkgversion}-%{srcname}
|
||||||
|
%license LICENSE
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%{python3_sitearch}/%{srcname}/
|
%{python3_sitearch}/%{srcname}/
|
||||||
%{python3_sitearch}/%{srcname}-%{version}-*.egg-info
|
%{python3_sitearch}/%{srcname}-%{version}-*.egg-info
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 18 2018 Charalampos Stratakis <cstratak@redhat.com> - 5.0.2-1
|
||||||
|
- Update to 5.0.2
|
||||||
|
|
||||||
* Thu Apr 26 2018 Lumír Balhar <lbalhar@redhat.com> - 4.5.2-5
|
* Thu Apr 26 2018 Lumír Balhar <lbalhar@redhat.com> - 4.5.2-5
|
||||||
- New conditionals for Python 2
|
- New conditionals for Python 2
|
||||||
- Drop Python 3 conditional
|
- Drop Python 3 conditional
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (tornado-4.5.2.tar.gz) = 75a7e94275a0f1cbbc3551a21659383a52fe68b2bb18bc1febf5099fb5fe4154012ba651f789b41f64c47f347757b948e2269f92c83b47325216affcaaa18ffd
|
SHA512 (tornado-5.0.2.tar.gz) = fbd360df34fe29ed3e5f406992923e2af2815f93446fb9d9810f7575fe06300a2cb15c3f36bd93150284ba297772f94c94a4227acca2dc65c94cf7d100cb5974
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
diff --git a/tornado/test/runtests.py b/tornado/test/runtests.py
|
|
||||||
index 526ae5d..36a841f 100644
|
|
||||||
--- a/tornado/test/runtests.py
|
|
||||||
+++ b/tornado/test/runtests.py
|
|
||||||
@@ -124,6 +124,9 @@ def main():
|
|
||||||
# Silence the warning until we can drop 3.5.[01].
|
|
||||||
warnings.filterwarnings("ignore", category=PendingDeprecationWarning,
|
|
||||||
message=".*legacy __aiter__ protocol")
|
|
||||||
+ # 3.5.2's PendingDeprecationWarning became a DeprecationWarning in 3.6.
|
|
||||||
+ warnings.filterwarnings("ignore", category=DeprecationWarning,
|
|
||||||
+ message=".*legacy __aiter__ protocol")
|
|
||||||
|
|
||||||
logging.getLogger("tornado.access").setLevel(logging.CRITICAL)
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user