Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-ddt for openSUSE:Factory 
checked in at 2021-02-01 13:26:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ddt (Old)
 and      /work/SRC/openSUSE:Factory/.python-ddt.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ddt"

Mon Feb  1 13:26:42 2021 rev:12 rq:866682 version:1.4.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ddt/python-ddt.changes    2020-06-05 
19:59:20.759758493 +0200
+++ /work/SRC/openSUSE:Factory/.python-ddt.new.28504/python-ddt.changes 
2021-02-01 13:28:30.878132131 +0100
@@ -1,0 +2,5 @@
+Mon Jan 25 21:52:46 UTC 2021 - Dirk M??ller <dmuel...@suse.com>
+
+- add 0001-Use-Yaml-s-UnsafeLoader-for-Python-embedding-tests.patch 
+
+-------------------------------------------------------------------

New:
----
  0001-Use-Yaml-s-UnsafeLoader-for-Python-embedding-tests.patch

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

Other differences:
------------------
++++++ python-ddt.spec ++++++
--- /var/tmp/diff_new_pack.SLggtg/_old  2021-02-01 13:28:31.502133101 +0100
+++ /var/tmp/diff_new_pack.SLggtg/_new  2021-02-01 13:28:31.502133101 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-ddt
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,6 +25,8 @@
 License:        MIT
 URL:            https://github.com/txels/ddt
 Source:         
https://files.pythonhosted.org/packages/source/d/ddt/ddt-%{version}.tar.gz
+# https://github.com/datadriventests/ddt/pull/96
+Patch1:         0001-Use-Yaml-s-UnsafeLoader-for-Python-embedding-tests.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -43,6 +45,7 @@
 
 %prep
 %setup -q -n ddt-%{version}
+%autopatch -p1
 
 %build
 %python_build

++++++ 0001-Use-Yaml-s-UnsafeLoader-for-Python-embedding-tests.patch ++++++
>From 97f0a2315736e50f1b34a015447cd751da66ecb6 Mon Sep 17 00:00:00 2001
From: Dirk Mueller <d...@dmllr.de>
Date: Mon, 25 Jan 2021 22:49:04 +0100
Subject: [PATCH] Use Yaml's UnsafeLoader for Python embedding tests

In newer PyYAML versions the default FullLoader has
python/object/* integration removed. One has to use
UnsafeLoader instead. see this issue for details:

https://github.com/yaml/pyyaml/issues/321
---
 test/test_example.py    |  2 +-
 test/test_functional.py | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/test_example.py b/test/test_example.py
index db2cf17..1d27043 100644
--- a/test/test_example.py
+++ b/test/test_example.py
@@ -151,7 +151,7 @@ if have_yaml_support:
 
     @ddt
     class YamlOnlyTestCase(unittest.TestCase):
-        @file_data('data/test_custom_yaml_loader.yaml', yaml.FullLoader)
+        @file_data('data/test_custom_yaml_loader.yaml', yaml.UnsafeLoader)
         def test_custom_yaml_loader(self, instance, expected):
             """Test with yaml tags to create specific classes to compare"""
             self.assertEqual(expected, instance)
diff --git a/test/test_functional.py b/test/test_functional.py
index 45c1cae..f9609c6 100644
--- a/test/test_functional.py
+++ b/test/test_functional.py
@@ -440,7 +440,7 @@ def test_load_yaml_with_python_tag():
     loader allowing python tags is passed.
     """
 
-    from yaml import FullLoader
+    from yaml import UnsafeLoader
     from yaml.constructor import ConstructorError
 
     def str_to_type(class_name):
@@ -457,13 +457,13 @@ def test_load_yaml_with_python_tag():
             raise AssertionError()
 
     @ddt
-    class YamlFullLoaderTest(object):
-        @file_data('data/test_functional_custom_tags.yaml', FullLoader)
+    class YamlUnsafeLoaderTest(object):
+        @file_data('data/test_functional_custom_tags.yaml', UnsafeLoader)
         def test_cls_is_instance(self, instance, expected):
             assert isinstance(instance, str_to_type(expected))
 
-    tests = list(filter(_is_test, YamlFullLoaderTest.__dict__))
-    obj = YamlFullLoaderTest()
+    tests = list(filter(_is_test, YamlUnsafeLoaderTest.__dict__))
+    obj = YamlUnsafeLoaderTest()
 
     if not tests:
         raise AssertionError('No tests have been found.')
-- 
2.30.0

Reply via email to