diff --git a/.gitignore b/.gitignore index b8530de..860358c 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ tornado-1.0.1.tar.gz /tornado-4.5.1.tar.gz /tornado-4.5.2.tar.gz /tornado-5.0.2.tar.gz +/tornado-5.1.1.tar.gz diff --git a/fix-erroneous-deprecation-warnings.patch b/fix-erroneous-deprecation-warnings.patch deleted file mode 100644 index 6592feb..0000000 --- a/fix-erroneous-deprecation-warnings.patch +++ /dev/null @@ -1,13 +0,0 @@ -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\..*") diff --git a/fix-syntax-warnings.patch b/fix-syntax-warnings.patch new file mode 100644 index 0000000..e77b77d --- /dev/null +++ b/fix-syntax-warnings.patch @@ -0,0 +1,39 @@ +diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py +index 16938c4..b1ae474 100644 +--- a/tornado/test/web_test.py ++++ b/tornado/test/web_test.py +@@ -398,7 +398,7 @@ class AuthRedirectTest(WebTestCase): + follow_redirects=False) + self.assertEqual(response.code, 302) + self.assertTrue(re.match( +- 'http://example.com/login\?next=http%3A%2F%2F127.0.0.1%3A[0-9]+%2Fabsolute', ++ r'http://example.com/login\?next=http%3A%2F%2F127.0.0.1%3A[0-9]+%2Fabsolute', + response.headers['Location']), response.headers['Location']) + + +diff --git a/tornado/util.py b/tornado/util.py +index a42ebeb..0b93ff9 100644 +--- a/tornado/util.py ++++ b/tornado/util.py +@@ -252,7 +252,7 @@ _re_unescape_pattern = re.compile(r'\\(.)', re.DOTALL) + + def re_unescape(s): + # type: (str) -> str +- """Unescape a string escaped by `re.escape`. ++ r"""Unescape a string escaped by `re.escape`. + + May raise ``ValueError`` for regular expressions which could not + have been produced by `re.escape` (for example, strings containing +diff --git a/tornado/web.py b/tornado/web.py +index 6760b0b..4340b16 100644 +--- a/tornado/web.py ++++ b/tornado/web.py +@@ -1887,7 +1887,7 @@ class _ApplicationRouter(ReversibleRuleRouter): + + + class Application(ReversibleRouter): +- """A collection of request handlers that make up a web application. ++ r"""A collection of request handlers that make up a web application. + + Instances of this class are callable and can be passed directly to + HTTPServer to serve the application:: diff --git a/python-tornado.spec b/python-tornado.spec index b963dfd..84868db 100644 --- a/python-tornado.spec +++ b/python-tornado.spec @@ -8,18 +8,18 @@ %global srcname tornado Name: python-%{srcname} -Version: 5.0.2 -Release: 5%{?dist} +Version: 5.1.1 +Release: 1%{?dist} Summary: Scalable, non-blocking web server and tools License: ASL 2.0 URL: http://www.tornadoweb.org -Source0: https://files.pythonhosted.org/packages/source/t/tornado/tornado-%{version}.tar.gz +Source0: %{pypi_source} -# 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 +# Python 3.8 introduces SyntaxWarnings on invalid escape sequences +# Tornado has them, mostly in docstrings and the tests treat them as errors +# Fixed upstream: https://github.com/tornadoweb/tornado/commit/6dceb64ed27c1d48af22142f2ebae946f0e85e95 +Patch0: fix-syntax-warnings.patch BuildRequires: gcc @@ -48,9 +48,6 @@ Summary: Scalable, non-blocking web server and tools %{?python_provide:%python_provide python2-%{srcname}} Requires: python2-pycurl -Requires: python2-backports_abc -Requires: python2-singledispatch -Requires: python2-futures %description -n python2-%{srcname} Tornado is an open source version of the scalable, non-blocking web @@ -88,8 +85,7 @@ handle thousands of simultaneous standing connections, which means it is ideal for real-time web services. %prep -%setup -q -n %{srcname}-%{version} -%patch0 -p1 +%autosetup -p1 -n %{srcname}-%{version} # remove shebang from files %{__sed} -i.orig -e '/^#!\//, 1d' *py tornado/*.py tornado/*/*.py @@ -125,6 +121,10 @@ ideal for real-time web services. %changelog +* Wed Mar 27 2019 Miro HronĨok - 5.1.1-1 +- Update to 5.1.1 +- Fix SyntaxWarnings (turned into SyntaxErrors) on Python 3.8 + * Sat Feb 02 2019 Fedora Release Engineering - 5.0.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index a238e62..87b124c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tornado-5.0.2.tar.gz) = fbd360df34fe29ed3e5f406992923e2af2815f93446fb9d9810f7575fe06300a2cb15c3f36bd93150284ba297772f94c94a4227acca2dc65c94cf7d100cb5974 +SHA512 (tornado-5.1.1.tar.gz) = f9ecedb20c055981f482c9a2a8bb30082dcc479674f75f6c8654afcf40f2ce5a45e82c7e2b5a6ce5d1c9da7896e865e78c7d29a64b6b1d28d6e74a718be62dc7