Hello community, here is the log from the commit of package python-tornado4 for openSUSE:Factory checked in at 2020-03-08 22:21:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-tornado4 (Old) and /work/SRC/openSUSE:Factory/.python-tornado4.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-tornado4" Sun Mar 8 22:21:01 2020 rev:3 rq:769773 version:4.5.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-tornado4/python-tornado4.changes 2019-11-07 23:12:50.880293032 +0100 +++ /work/SRC/openSUSE:Factory/.python-tornado4.new.26092/python-tornado4.changes 2020-03-08 22:21:02.663962952 +0100 @@ -1,0 +2,7 @@ +Mon Feb 3 19:17:42 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Add patches to work with python3.8 (kinda): + * py38-0001-test-silence-deprecation-warning.patch + * py38-0002-dont-log-CancelledError.patch + +------------------------------------------------------------------- New: ---- py38-0001-test-silence-deprecation-warning.patch py38-0002-dont-log-CancelledError.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-tornado4.spec ++++++ --- /var/tmp/diff_new_pack.jq6ZQ2/_old 2020-03-08 22:21:03.371963389 +0100 +++ /var/tmp/diff_new_pack.jq6ZQ2/_new 2020-03-08 22:21:03.371963389 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-tornado4 # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,9 +17,6 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%if %{python3_version_nodots} >= 38 -%define skip_python3 1 -%endif %define oldpython python %bcond_without python2 Name: python-tornado4 @@ -34,10 +31,14 @@ Patch2: asyncio.patch Patch3: openssl-cert-size.patch Patch4: skip-failing-tests.patch +# python 3.8 mashed from around +Patch5: py38-0001-test-silence-deprecation-warning.patch +Patch6: py38-0002-dont-log-CancelledError.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module pycurl} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module simplejson} +BuildRequires: %{pythons} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python @@ -102,10 +103,7 @@ %setup -q -n tornado-%{version} # Fix non-executable script rpmlint issue: find demos tornado -name "*.py" -exec sed -i "/#\!\/usr\/bin\/.*/d" {} \; -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 +%autopatch -p1 %pre # remove egg-info _file_, being replaced by an egg-info directory ++++++ py38-0001-test-silence-deprecation-warning.patch ++++++ >From 64308fbad38715afddc4f6b3c77e47f8606624b3 Mon Sep 17 00:00:00 2001 From: Ben Darnell <b...@bendarnell.com> Date: Sun, 28 Apr 2019 19:31:52 -0400 Subject: [PATCH] test: Silence a deprecation warning in py38+pycurl --- tornado/test/runtests.py | 10 ++++++++++ 1 file changed, 10 insertions(+) Index: tornado-4.5.3/tornado/test/runtests.py =================================================================== --- tornado-4.5.3.orig/tornado/test/runtests.py +++ tornado-4.5.3/tornado/test/runtests.py @@ -129,7 +129,16 @@ def main(): # 3.5.2's PendingDeprecationWarning became a DeprecationWarning in 3.6. warnings.filterwarnings("ignore", category=DeprecationWarning, message=".*legacy __aiter__ protocol") - + # This deprecation warning is introduced in Python 3.8 and is + # triggered by pycurl. Unforunately, because it is raised in the C + # layer it can't be filtered by module and we must match the + # message text instead (Tornado's C module uses PY_SSIZE_T_CLEAN + # so it's not at risk of running into this issue). + warnings.filterwarnings( + "ignore", + category=DeprecationWarning, + message="PY_SSIZE_T_CLEAN will be required", + ) logging.getLogger("tornado.access").setLevel(logging.CRITICAL) define('httpclient', type=str, default=None, ++++++ py38-0002-dont-log-CancelledError.patch ++++++ Description: gen.with_timeout: Don't log CancelledError after timeout This patch originated with upstream commit 0684b61c1d4feaaf5ac3. The patch has been modified to handle Python 2 as version 5.1 still supports Python 2. Upstream dropped Python 2 support prior to when this patch landed. Author: Petr Viktorin <encu...@gmail.com> (original author) Corey Bryant <corey.bry...@canonical.com> (modified original) See also: commit a237a995a1d54ad6e07c1ecdf5103ff8f45073b5 --- tornado/gen.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) Index: tornado-4.5.3/tornado/gen.py =================================================================== --- tornado-4.5.3.orig/tornado/gen.py +++ tornado-4.5.3/tornado/gen.py @@ -876,8 +876,9 @@ def with_timeout(timeout, future, io_loo relative to `.IOLoop.time`) If the wrapped `.Future` fails after it has timed out, the exception - will be logged unless it is of a type contained in ``quiet_exceptions`` - (which may be an exception type or a sequence of types). + will be logged unless it is either of a type contained in + ``quiet_exceptions`` (which may be an exception type or a sequence of + types), or a `CancelledError`. Does not support `YieldPoint` subclasses. @@ -905,12 +906,23 @@ def with_timeout(timeout, future, io_loo io_loop = IOLoop.current() def error_callback(future): - try: - future.result() - except Exception as e: - if not isinstance(e, quiet_exceptions): - app_log.error("Exception in Future %r after timeout", - future, exc_info=True) + if PY3: + import asyncio + try: + future.result() + except asyncio.CancelledError: + pass + except Exception as e: + if not isinstance(e, quiet_exceptions): + app_log.error("Exception in Future %r after timeout", + future, exc_info=True) + else: + try: + future.result() + except Exception as e: + if not isinstance(e, quiet_exceptions): + app_log.error("Exception in Future %r after timeout", + future, exc_info=True) def timeout_callback(): result.set_exception(TimeoutError("Timeout"))