Rebuilt for Python3.5 rebuild
Add patch to use getfullargspec on python3 Add patch to fix failing tests on python3.5
This commit is contained in:
parent
b29ffdb10c
commit
a9537d716c
16
fix-test-python35.patch
Normal file
16
fix-test-python35.patch
Normal file
@ -0,0 +1,16 @@
|
||||
--- 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):
|
@ -6,7 +6,7 @@
|
||||
|
||||
Name: python-%{pkgname}
|
||||
Version: 4.2.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Scalable, non-blocking web server and tools
|
||||
|
||||
Group: Development/Libraries
|
||||
@ -15,6 +15,12 @@ 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
|
||||
%if 0%{?fedora} < 22
|
||||
@ -73,6 +79,8 @@ server and and tools. This package contains some example applications.
|
||||
%prep
|
||||
%setup -q -n %{pkgname}-%{version}
|
||||
%patch0 -p1 -b .cert
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
# remove shebang from files
|
||||
%{__sed} -i.orig -e '/^#!\//, 1d' *py tornado/*.py tornado/*/*.py
|
||||
|
||||
@ -119,6 +127,11 @@ PYTHONPATH=%{python2_sitearch} %{__python2} -m tornado.test.runtests --verbose
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Oct 14 2015 Robert Kuska <rkuska@redhat.com> - 4.2.1-2
|
||||
- Rebuilt for Python3.5 rebuild
|
||||
- Add patch to use getfullargspec on python3
|
||||
- Add patch to fix failing tests with python3.5
|
||||
|
||||
* Fri Sep 19 2015 Orion Poplawski <orion@cora.nwra.com> - 4.2.1-1
|
||||
- Update to 4.2.1
|
||||
- Modernize spec
|
||||
|
24
use-getfullargspec.patch
Normal file
24
use-getfullargspec.patch
Normal file
@ -0,0 +1,24 @@
|
||||
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
|
Loading…
Reference in New Issue
Block a user