Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pysrt for openSUSE:Factory 
checked in at 2024-02-14 23:19:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pysrt (Old)
 and      /work/SRC/openSUSE:Factory/.python-pysrt.new.1815 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pysrt"

Wed Feb 14 23:19:10 2024 rev:6 rq:1146498 version:1.1.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pysrt/python-pysrt.changes        
2020-05-06 11:04:39.335312693 +0200
+++ /work/SRC/openSUSE:Factory/.python-pysrt.new.1815/python-pysrt.changes      
2024-02-14 23:19:11.693239599 +0100
@@ -1,0 +2,7 @@
+Wed Feb 14 04:41:27 UTC 2024 - Steve Kowalik <[email protected]>
+
+- Add patch use-assertequal.patch:
+  * Support Python 3.12 by using TestCase.assertEqual().
+- Switch to autosetup and pyproject macros.
+
+-------------------------------------------------------------------

New:
----
  use-assertequal.patch

BETA DEBUG BEGIN:
  New:
- Add patch use-assertequal.patch:
  * Support Python 3.12 by using TestCase.assertEqual().
BETA DEBUG END:

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

Other differences:
------------------
++++++ python-pysrt.spec ++++++
--- /var/tmp/diff_new_pack.D7bIhM/_old  2024-02-14 23:19:12.445266712 +0100
+++ /var/tmp/diff_new_pack.D7bIhM/_new  2024-02-14 23:19:12.449266856 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pysrt
 #
-# 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
@@ -16,7 +16,6 @@
 #
 
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pysrt
 Version:        1.1.2
 Release:        0
@@ -24,10 +23,13 @@
 License:        GPL-3.0-only
 URL:            https://github.com/byroot/pysrt
 Source0:        
https://files.pythonhosted.org/packages/source/p/pysrt/pysrt-%{version}.tar.gz
-BuildRequires:  %{python_module base}
+# PATCH-FIX-UPSTREAM gh#byroot/pysrt#74946098ce136a5b4b1d5766ca573e999c785686
+Patch0:         use-assertequal.patch
 BuildRequires:  %{python_module chardet}
+BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-chardet
@@ -41,15 +43,15 @@
 It comes with an easy to use CLI suitable for direct use or cron jobs.
 
 %prep
-%setup -q -n pysrt-%{version}
+%autosetup -p1 -n pysrt-%{version}
 # Remove shebang from non-executable file
 sed -e '1d' -i pysrt/commands.py
 
 %build
-%python_build
+%pyproject_wheel
 
 %install
-%python_install
+%pyproject_install
 %python_clone -a %{buildroot}%{_bindir}/srt
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
@@ -66,5 +68,5 @@
 %doc README.rst
 %python_alternative %{_bindir}/srt
 %{python_sitelib}/pysrt
-%{python_sitelib}/pysrt-%{version}-py%{python_version}.egg-info
+%{python_sitelib}/pysrt-%{version}.dist-info
 

++++++ use-assertequal.patch ++++++
>From 74946098ce136a5b4b1d5766ca573e999c785686 Mon Sep 17 00:00:00 2001
From: Karthikeyan Singaravelan <[email protected]>
Date: Sat, 15 Jan 2022 05:05:40 +0000
Subject: [PATCH] Use assertEqual instead of assertEquals for Python 3.11
 compatibility.

---
 tests/test_srtfile.py | 10 +++++-----
 tests/test_srtitem.py | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/test_srtfile.py b/tests/test_srtfile.py
index 819aa4d..b24e8ac 100644
--- a/tests/test_srtfile.py
+++ b/tests/test_srtfile.py
@@ -117,8 +117,8 @@ def test_slice(self):
                           459)
 
     def test_at(self):
-        self.assertEquals(len(self.file.at((0, 0, 31, 0))), 1)
-        self.assertEquals(len(self.file.at(seconds=31)), 1)
+        self.assertEqual(len(self.file.at((0, 0, 31, 0))), 1)
+        self.assertEqual(len(self.file.at(seconds=31)), 1)
 
 
 class TestShifting(unittest.TestCase):
@@ -137,14 +137,14 @@ def test_single_item(self):
         srt_file = SubRipFile([
             SubRipItem(1, {'seconds': 1}, {'seconds': 2}, 'Hello')
         ])
-        self.assertEquals(srt_file.text, 'Hello')
+        self.assertEqual(srt_file.text, 'Hello')
 
     def test_multiple_item(self):
         srt_file = SubRipFile([
             SubRipItem(1, {'seconds': 0}, {'seconds': 3}, 'Hello'),
             SubRipItem(1, {'seconds': 1}, {'seconds': 2}, 'World !')
         ])
-        self.assertEquals(srt_file.text, 'Hello\nWorld !')
+        self.assertEqual(srt_file.text, 'Hello\nWorld !')
 
 
 class TestDuckTyping(unittest.TestCase):
@@ -251,7 +251,7 @@ def test_blank_lines(self):
 
     def test_missing_indexes(self):
         items = pysrt.open(os.path.join(self.base_path, 'no-indexes.srt'))
-        self.assertEquals(len(items), 7)
+        self.assertEqual(len(items), 7)
 
 if __name__ == '__main__':
     unittest.main()
diff --git a/tests/test_srtitem.py b/tests/test_srtitem.py
index f4a6f2f..9d29538 100644
--- a/tests/test_srtitem.py
+++ b/tests/test_srtitem.py
@@ -197,17 +197,17 @@ def test_paring_error(self):
 
     def test_string_index(self):
         item = SubRipItem.from_string(self.string_index)
-        self.assertEquals(item.index, 'foo')
-        self.assertEquals(item.text, 'Hello !')
+        self.assertEqual(item.index, 'foo')
+        self.assertEqual(item.text, 'Hello !')
 
     def test_no_index(self):
         item = SubRipItem.from_string(self.no_index)
-        self.assertEquals(item.index, None)
-        self.assertEquals(item.text, 'Hello world !')
+        self.assertEqual(item.index, None)
+        self.assertEqual(item.text, 'Hello world !')
 
     def test_junk_after_timestamp(self):
         item = SubRipItem.from_string(self.junk_after_timestamp)
-        self.assertEquals(item, self.item)
+        self.assertEqual(item, self.item)
 
 if __name__ == '__main__':
     unittest.main()

Reply via email to