Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-requests-toolbelt for 
openSUSE:Factory checked in at 2021-12-13 20:41:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-requests-toolbelt (Old)
 and      /work/SRC/openSUSE:Factory/.python-requests-toolbelt.new.2520 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-requests-toolbelt"

Mon Dec 13 20:41:48 2021 rev:8 rq:940022 version:0.9.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-requests-toolbelt/python-requests-toolbelt.changes
        2021-11-29 09:34:47.709593729 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-requests-toolbelt.new.2520/python-requests-toolbelt.changes
      2021-12-13 20:45:59.844496846 +0100
@@ -1,0 +2,7 @@
+Sat Dec 11 21:24:19 UTC 2021 - Ben Greiner <c...@bnavigator.de>
+
+- Fix python310 failure due to moved collections.abc
+  * add requests-toolbelt-pr246-collections.abc.patch
+  * gh#requests/toolbelt#246
+
+-------------------------------------------------------------------

New:
----
  requests-toolbelt-pr246-collections.abc.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-requests-toolbelt.spec ++++++
--- /var/tmp/diff_new_pack.lQyzay/_old  2021-12-13 20:46:00.500496926 +0100
+++ /var/tmp/diff_new_pack.lQyzay/_new  2021-12-13 20:46:00.512496928 +0100
@@ -31,6 +31,8 @@
 # PATCH-FIX-UPSTREAM remove_mock.patch bsc#[0-9]+ mc...@suse.com
 # remove dependency on the external mock package
 Patch1:         remove_mock.patch
+# PATCH-FIX-UPSTREAM requests-toolbelt-pr246-collections.abc.patch -- fix 
python310 deprecation. gh#requests/toolbelt#246
+Patch2:         
https://github.com/requests/toolbelt/pull/246.patch#/requests-toolbelt-pr246-collections.abc.patch
 BuildRequires:  %{python_module requests >= 2.12.2}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes

++++++ requests-toolbelt-pr246-collections.abc.patch ++++++
>From 7188b06330e5260be20bce8cbcf0d5ae44e34eaf Mon Sep 17 00:00:00 2001
From: Jon Dufresne <jon.dufre...@gmail.com>
Date: Fri, 1 Feb 2019 16:30:01 -0800
Subject: [PATCH] Fix collections.abc deprecation warning in downloadutils

Warning appears as:

tests/test_downloadutils.py::test_stream_response_to_specific_filename
  requests_toolbelt/downloadutils/stream.py:161: DeprecationWarning: Using or 
importing the ABCs from 'collections' instead of from 'collections.abc' is 
deprecated, and in 3.8 it will stop working
    if path and isinstance(getattr(path, 'write', None), collections.Callable):
---
 requests_toolbelt/downloadutils/stream.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/requests_toolbelt/downloadutils/stream.py 
b/requests_toolbelt/downloadutils/stream.py
index eed60a7..1d1c31b 100644
--- a/requests_toolbelt/downloadutils/stream.py
+++ b/requests_toolbelt/downloadutils/stream.py
@@ -1,6 +1,5 @@
 # -*- coding: utf-8 -*-
 """Utilities for dealing with streamed requests."""
-import collections
 import os.path
 import re
 
@@ -158,7 +157,7 @@ def stream_response_to_file(response, path=None, 
chunksize=_DEFAULT_CHUNKSIZE):
     pre_opened = False
     fd = None
     filename = None
-    if path and isinstance(getattr(path, 'write', None), collections.Callable):
+    if path and callable(getattr(path, 'write', None)):
         pre_opened = True
         fd = path
         filename = getattr(fd, 'name', None)

Reply via email to