From bc0d82e5e0e4085b4545239cd754fb8c006ac5d1 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Thu, 18 Feb 2016 14:09:20 -0700 Subject: [PATCH] Update to 4.3 - Drop upstream patches --- .gitignore | 1 + fix-test-python35.patch | 16 ---------------- python-tornado.spec | 28 ++++++++++++++++++---------- sources | 2 +- use-getfullargspec.patch | 24 ------------------------ 5 files changed, 20 insertions(+), 51 deletions(-) delete mode 100644 fix-test-python35.patch delete mode 100644 use-getfullargspec.patch diff --git a/.gitignore b/.gitignore index 44471ef..3806df1 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ tornado-1.0.1.tar.gz /tornado-3.2.1.tar.gz /tornado-4.1.tar.gz /tornado-4.2.1.tar.gz +/tornado-4.3.tar.gz diff --git a/fix-test-python35.patch b/fix-test-python35.patch deleted file mode 100644 index 3fd5bd2..0000000 --- a/fix-test-python35.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/tornado/test/web_test.py -+++ b/tornado/test/web_test.py -@@ -1547,8 +1547,11 @@ - def test_clear_all_cookies(self): - response = self.fetch('/', headers={'Cookie': 'foo=bar; baz=xyzzy'}) - set_cookies = sorted(response.headers.get_list('Set-Cookie')) -- self.assertTrue(set_cookies[0].startswith('baz=;')) -- self.assertTrue(set_cookies[1].startswith('foo=;')) -+ # Python 3.5 sends 'baz="";'; older versions use 'baz=;' -+ self.assertTrue(set_cookies[0].startswith('baz=;') or -+ set_cookies[0].startswith('baz="";')) -+ self.assertTrue(set_cookies[1].startswith('foo=;') or -+ set_cookies[1].startswith('foo="";')) - - - class PermissionError(Exception): diff --git a/python-tornado.spec b/python-tornado.spec index 17f3b7a..35ba9b4 100644 --- a/python-tornado.spec +++ b/python-tornado.spec @@ -5,8 +5,8 @@ %global srcname tornado Name: python-%{srcname} -Version: 4.2.1 -Release: 4%{?dist} +Version: 4.3 +Release: 1%{?dist} Summary: Scalable, non-blocking web server and tools Group: Development/Libraries @@ -15,20 +15,19 @@ URL: http://www.tornadoweb.org Source0: https://pypi.python.org/packages/source/t/tornado/tornado-%{version}.tar.gz # Patch to use system CA certs instead of certifi Patch0: python-tornado-cert.patch -# getargspec is deprecated in python3.5 and throws warnings -# this patch uses getfullargspec instead on python3 -# Already in upstream -Patch1: use-getfullargspec.patch -# Python 3.5 sends 'baz="";'; older versions use 'baz=;' -Patch2: fix-test-python35.patch BuildRequires: python2-devel +BuildRequires: python2-backports_abc %if 0%{?fedora} < 22 BuildRequires: python-backports-ssl_match_hostname %endif %if 0%{?with_python3} BuildRequires: python3-setuptools BuildRequires: python3-devel +%if 0%{?fedora} < 24 +# Only needed for python < 3.5 +BuildRequires: python3-backports_abc +%endif %endif %description @@ -49,6 +48,8 @@ Summary: Scalable, non-blocking web server and tools Requires: python-backports-ssl_match_hostname %endif Requires: python-pycurl +Requires: python2-backports_abc +Requires: python2-singledispatch %description -n python2-%{srcname} Tornado is an open source version of the scalable, non-blocking web @@ -74,6 +75,11 @@ server and and tools. This package contains some example applications. %package -n python3-%{srcname} Summary: Scalable, non-blocking web server and tools %{?python_provide:%python_provide python3-%{srcname}} +Requires: python3-pycurl +%if 0%{?fedora} < 24 +# Only needed for python < 3.5 +Requires: python3-backports_abc +%endif %description -n python3-%{srcname} Tornado is an open source version of the scalable, non-blocking web @@ -89,8 +95,6 @@ ideal for real-time web services. %prep %setup -q -n %{srcname}-%{version} %patch0 -p1 -b .cert -%patch1 -p1 -%patch2 -p1 # remove shebang from files %{__sed} -i.orig -e '/^#!\//, 1d' *py tornado/*.py tornado/*/*.py @@ -132,6 +136,10 @@ ideal for real-time web services. %changelog +* Thu Feb 18 2016 Orion Poplawski - 4.3-1 +- Update to 4.3 +- Drop upstream patches + * Thu Feb 04 2016 Fedora Release Engineering - 4.2.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index b95e4c1..250e2f4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d523204389cfb70121bb69709f551b20 tornado-4.2.1.tar.gz +d13a99dc0b60ba69f5f8ec1235e5b232 tornado-4.3.tar.gz diff --git a/use-getfullargspec.patch b/use-getfullargspec.patch deleted file mode 100644 index 30a3c1b..0000000 --- a/use-getfullargspec.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up tornado-4.2.1/tornado/util.py.argspec tornado-4.2.1/tornado/util.py ---- tornado-4.2.1/tornado/util.py.argspec 2015-10-14 13:07:58.133043900 +0200 -+++ tornado-4.2.1/tornado/util.py 2015-10-14 13:09:03.530841229 +0200 -@@ -18,6 +18,11 @@ import os - import sys - import zlib - -+try: -+ from inspect import getfullargspec as getargspec -+except: -+ from inspect import getargspec -+ - - try: - xrange # py2 -@@ -284,7 +289,7 @@ class ArgReplacer(object): - def __init__(self, func, name): - self.name = name - try: -- self.arg_pos = inspect.getargspec(func).args.index(self.name) -+ self.arg_pos = getargspec(func).args.index(self.name) - except ValueError: - # Not a positional parameter - self.arg_pos = None