diff -Nru python-tornado-4.2.0/debian/changelog python-tornado-4.2.0/debian/changelog --- python-tornado-4.2.0/debian/changelog 2015-07-23 02:15:37.000000000 -0500 +++ python-tornado-4.2.0/debian/changelog 2015-08-18 12:25:49.000000000 -0500 @@ -1,3 +1,11 @@ +python-tornado (4.2.0-1ubuntu1) wily; urgency=medium + + * Fixed test failure on python3.5 (Closes: #1478149) + - use inspect.getfullargspec instead of depricated getargspec on python3 + - update unit tests to accept small change in behavior in python3.5 + + -- Wesley Wiedenmeier Tue, 18 Aug 2015 12:15:38 -0500 + python-tornado (4.2.0-1build1) wily; urgency=medium * No-change rebuild for python3.5 transition diff -Nru python-tornado-4.2.0/debian/patches/fix-python35-tests.patch python-tornado-4.2.0/debian/patches/fix-python35-tests.patch --- python-tornado-4.2.0/debian/patches/fix-python35-tests.patch 1969-12-31 18:00:00.000000000 -0600 +++ python-tornado-4.2.0/debian/patches/fix-python35-tests.patch 2015-08-18 12:14:46.000000000 -0500 @@ -0,0 +1,57 @@ +Description: Make sure tests pass on python3.5 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1478149 + +Index: python-tornado-4.2.0/tornado/test/web_test.py +=================================================================== +--- python-tornado-4.2.0.orig/tornado/test/web_test.py ++++ python-tornado-4.2.0/tornado/test/web_test.py +@@ -1538,8 +1538,11 @@ class ClearAllCookiesTest(SimpleHandlerT + 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): +Index: python-tornado-4.2.0/tornado/util.py +=================================================================== +--- python-tornado-4.2.0.orig/tornado/util.py ++++ python-tornado-4.2.0/tornado/util.py +@@ -13,7 +13,6 @@ and `.Resolver`. + from __future__ import absolute_import, division, print_function, with_statement + + import array +-import inspect + import os + import sys + import zlib +@@ -25,6 +24,14 @@ except NameError: + xrange = range # py3 + + ++# inspect.getargspec() raises DeprecationWarnings in Python 3.5. ++# The two functions have compatible interfaces for the parts we need. ++try: ++ from inspect import getfullargspec as getargspec # py3 ++except ImportError: ++ from inspect import getargspec # py2 ++ ++ + class ObjectDict(dict): + """Makes a dictionary behave like an object, with attribute-style access. + """ +@@ -284,7 +291,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 diff -Nru python-tornado-4.2.0/debian/patches/series python-tornado-4.2.0/debian/patches/series --- python-tornado-4.2.0/debian/patches/series 2015-06-22 04:29:03.000000000 -0500 +++ python-tornado-4.2.0/debian/patches/series 2015-08-18 12:07:36.000000000 -0500 @@ -3,3 +3,4 @@ skip-timing-tests.patch sockopt.patch without-certifi.patch +fix-python35-tests.patch