Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-deprecation for 
openSUSE:Factory checked in at 2024-02-27 22:48:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-deprecation (Old)
 and      /work/SRC/openSUSE:Factory/.python-deprecation.new.1770 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-deprecation"

Tue Feb 27 22:48:06 2024 rev:8 rq:1151994 version:2.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-deprecation/python-deprecation.changes    
2023-11-20 21:19:22.978435241 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-deprecation.new.1770/python-deprecation.changes
  2024-02-27 22:48:12.070205079 +0100
@@ -1,0 +2,8 @@
+Tue Feb 27 03:49:53 UTC 2024 - Steve Kowalik <steven.kowa...@suse.com>
+
+- Replace python-deprecation-no-unittest2.patch with a different upstream
+  patch.
+- Switch to autosetup and pyproject macros.
+- No more greedy globs in %files.
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ python-deprecation.spec ++++++
--- /var/tmp/diff_new_pack.jldPbD/_old  2024-02-27 22:48:13.366251723 +0100
+++ /var/tmp/diff_new_pack.jldPbD/_new  2024-02-27 22:48:13.366251723 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-deprecation
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,26 +17,24 @@
 
 
 %{?sle15_python_module_pythons}
-%bcond_without python2
 Name:           python-deprecation
 Version:        2.1.0
 Release:        0
 Summary:        A library to handle automated deprecations
 License:        Apache-2.0
-Group:          Development/Languages/Python
 URL:            https://github.com/briancurtin/deprecation
 Source:         
https://files.pythonhosted.org/packages/source/d/deprecation/deprecation-%{version}.tar.gz
-# https://github.com/briancurtin/deprecation/pull/50
+# PATCH-FIX-UPSTREAM Based on gh#briancurtin/deprecation#57
 Patch0:         python-deprecation-no-unittest2.patch
+BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module wheel}
 # SECTION test requirements
 BuildRequires:  %{python_module pytest}
-%if %{with python2}
-BuildRequires:  python-unittest2
-%endif
 # /SECTION
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
+Requires:       python-packaging
 BuildArch:      noarch
 %python_subpackages
 
@@ -46,15 +44,13 @@
 enable the automation of several things:
 
 %prep
-%setup -q -n deprecation-%{version}
-%patch0 -p1
+%autosetup -p1 -n deprecation-%{version}
 
 %build
-
-%python_build
+%pyproject_wheel
 
 %install
-%python_install
+%pyproject_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
@@ -63,5 +59,7 @@
 %files %{python_files}
 %license LICENSE
 %doc README.rst
-%{python_sitelib}/*
+%{python_sitelib}/deprecation.py
+%pycache_only %{python_sitelib}/__pycache__/deprecation.*.py*
+%{python_sitelib}/deprecation-%{version}.dist-info
 

++++++ python-deprecation-no-unittest2.patch ++++++
--- /var/tmp/diff_new_pack.jldPbD/_old  2024-02-27 22:48:13.390252587 +0100
+++ /var/tmp/diff_new_pack.jldPbD/_new  2024-02-27 22:48:13.390252587 +0100
@@ -1,42 +1,31 @@
-Index: deprecation-2.1.0/tests/test_deprecation.py
-===================================================================
---- deprecation-2.1.0.orig/tests/test_deprecation.py   2020-04-20 
16:14:19.000000000 +0200
-+++ deprecation-2.1.0/tests/test_deprecation.py        2020-06-01 
13:51:55.484939683 +0200
-@@ -12,14 +12,16 @@
+From e13e23068cb8d653a02a434a159e8b0b7226ffd6 Mon Sep 17 00:00:00 2001
+From: Jonathan Ringer <jonringer...@gmail.com>
+Date: Tue, 11 Jan 2022 14:23:03 -0800
+Subject: [PATCH] Make unittest optional for python3.5+
+
+---
+ docs-requirements.txt     | 2 +-
+ test-requirements.txt     | 2 +-
+ tests/test_deprecation.py | 7 ++++++-
+ tox.ini                   | 2 +-
+ 4 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/tests/test_deprecation.py b/tests/test_deprecation.py
+index 0fd29b3..14e9510 100644
+--- a/tests/test_deprecation.py
++++ b/tests/test_deprecation.py
+@@ -12,7 +12,12 @@
  
  # As we unfortunately support Python 2.7, it lacks TestCase.subTest which
  # is in 3.4+ or in unittest2
 -import unittest2
-+import unittest
-+if not hasattr(unittest.TestCase, "subTest"):
-+    import unittest2 as unittest
++try:
++    import unittest2
++except ImportError:
++    import unittest
++    unittest2 = unittest
++
  import warnings
  
  import deprecation
- from datetime import date
- 
- 
--class Test_deprecated(unittest2.TestCase):
-+class Test_deprecated(unittest.TestCase):
- 
-     def test_args_set_on_base_class(self):
-         args = (1, 2, 3, 4)
-@@ -230,7 +232,7 @@ class Test_deprecated(unittest2.TestCase
-             self.assertEqual(sot.method(), ret_val)
- 
- 
--class Test_fail_if_not_removed(unittest2.TestCase):
-+class Test_fail_if_not_removed(unittest.TestCase):
- 
-     @deprecation.deprecated(deprecated_in="1.0", current_version="2.0")
-     def _deprecated_method(self):
-@@ -259,7 +261,7 @@ class Test_fail_if_not_removed(unittest2
-         except AssertionError:
-             self.fail("A DeprecatedWarning shouldn't cause a failure")
- 
--    @unittest2.expectedFailure
-+    @unittest.expectedFailure
-     @deprecation.fail_if_not_removed
-     def test_literal_UnsupportedWarning(self):
-         self._unsupported_method()
 

Reply via email to