Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-tblib for openSUSE:Factory 
checked in at 2024-06-04 12:50:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-tblib (Old)
 and      /work/SRC/openSUSE:Factory/.python-tblib.new.24587 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-tblib"

Tue Jun  4 12:50:53 2024 rev:8 rq:1177999 version:3.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-tblib/python-tblib.changes        
2023-06-12 15:24:45.542451254 +0200
+++ /work/SRC/openSUSE:Factory/.python-tblib.new.24587/python-tblib.changes     
2024-06-04 12:51:27.208528425 +0200
@@ -1,0 +2,18 @@
+Fri May 31 22:34:24 UTC 2024 - Matej Cepl <[email protected]>
+
+- Clean up SPEC file.
+
+-------------------------------------------------------------------
+Fri May 17 09:22:14 UTC 2024 - Markéta Machová <[email protected]>
+
+- Update to 3.0.0
+  * Removed support for legacy Pythons (2.7 up to 3.7) and added Pythons 
+    3.11 and 3.12 in the test grid.
+  * Added support for __context__, __suppress_context__ and __notes__.
+  * Added the get_locals argument to tblib.pickling_support.install(), 
+    tblib.Traceback and tblib.Frame.
+- Add vendore-reraise-from-six.patch to get rid of six
+- Add more-aggressive-location-stripping.patch to fix test failure
+- Standardize multibuild
+
+-------------------------------------------------------------------

Old:
----
  tblib-1.7.0.tar.gz

New:
----
  more-aggressive-location-stripping.patch
  tblib-3.0.0.tar.gz
  vendore-reraise-from-six.patch

BETA DEBUG BEGIN:
  New:- Add vendore-reraise-from-six.patch to get rid of six
- Add more-aggressive-location-stripping.patch to fix test failure
- Standardize multibuild
  New:    tblib.Traceback and tblib.Frame.
- Add vendore-reraise-from-six.patch to get rid of six
- Add more-aggressive-location-stripping.patch to fix test failure
BETA DEBUG END:

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

Other differences:
------------------
++++++ python-tblib.spec ++++++
--- /var/tmp/diff_new_pack.8vRZIZ/_old  2024-06-04 12:51:27.924554408 +0200
+++ /var/tmp/diff_new_pack.8vRZIZ/_new  2024-06-04 12:51:27.928554554 +0200
@@ -1,7 +1,7 @@
 #
-# spec file for package python
+# spec file for package python-tblib
 #
-# 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
@@ -18,36 +18,36 @@
 
 %global flavor @BUILD_FLAVOR@%{nil}
 %if "%{flavor}" == "test"
+%define psuffix -%{flavor}
 %bcond_without  test
-%bcond_without  test_twisted
-%define psuffix -test
 %else
-%bcond_without  test
-%bcond_with     test_twisted
+%define psuffix %{nil}
+%bcond_with     test
 %endif
 %{?sle15_python_module_pythons}
 Name:           python-tblib%{?psuffix}
-Version:        1.7.0
+Version:        3.0.0
 Release:        0
 Summary:        Traceback serialization library
 License:        BSD-2-Clause
 Group:          Development/Languages/Python
 URL:            https://github.com/ionelmc/python-tblib
 Source:         
https://files.pythonhosted.org/packages/source/t/tblib/tblib-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM https://github.com/ionelmc/python-tblib/pull/77 vendore 
reraise() from six
+Patch0:         vendore-reraise-from-six.patch
+# PATCH-FIX-UPSTREAM https://github.com/ionelmc/python-tblib/issues/74 More 
aggressive location stripping. Ref #74.
+Patch1:         more-aggressive-location-stripping.patch
+BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-%if %{with test_twisted}
-BuildRequires:  %{python_module Twisted}
-BuildRequires:  %{python_module tblib == %{version}}
-%endif
+BuildArch:      noarch
 %if %{with test}
+BuildRequires:  %{python_module Twisted}
 BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module six}
+BuildRequires:  %{python_module tblib == %{version}}
 %endif
-Requires:       python-six
-BuildArch:      noarch
-
 %python_subpackages
 
 %description
@@ -70,14 +70,14 @@
 the pickle support.
 
 %prep
-%setup -q -n tblib-%{version}
+%autosetup -p1 -n tblib-%{version}
 
 %build
-%python_build
+%pyproject_wheel
 
 %install
-%if "%{flavor}" != "test"
-%python_install
+%if !%{with test}
+%pyproject_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 %endif
 
@@ -86,10 +86,11 @@
 %pytest
 %endif
 
-%if "%{flavor}" != "test"
+%if !%{with test}
 %files %{python_files}
 %doc AUTHORS.rst CHANGELOG.rst README.rst
 %license LICENSE
-%{python_sitelib}/*
+%{python_sitelib}/tblib
+%{python_sitelib}/tblib-%{version}*-info
 %endif
 

++++++ more-aggressive-location-stripping.patch ++++++
>From 66e14cdd101e4214cca6acca8f48b9abe4f75729 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= <[email protected]>
Date: Fri, 15 Dec 2023 16:52:07 +0200
Subject: [PATCH] More aggressive location stripping. Ref #74.

---
 tests/test_pickle_exception.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Index: tblib-3.0.0/tests/test_pickle_exception.py
===================================================================
--- tblib-3.0.0.orig/tests/test_pickle_exception.py
+++ tblib-3.0.0/tests/test_pickle_exception.py
@@ -29,6 +29,10 @@ class CustomError(Exception):
     pass
 
 
+def strip_locations(tb_text):
+    return tb_text.replace('    ~~^~~\n', '').replace('    
^^^^^^^^^^^^^^^^^\n', '')
+
+
 @pytest.mark.parametrize('protocol', [None, *list(range(1, 
pickle.HIGHEST_PROTOCOL + 1))])
 @pytest.mark.parametrize('how', ['global', 'instance', 'class'])
 def test_install(clear_dispatch_table, how, protocol):
@@ -58,8 +62,8 @@ def test_install(clear_dispatch_table, h
     else:
         raise AssertionError
 
-    expected_format_exception = ''.join(format_exception(type(exc), exc, 
exc.__traceback__))
-    print(expected_format_exception)
+    expected_format_exception = 
strip_locations(''.join(format_exception(type(exc), exc, exc.__traceback__)))
+
     # Populate Exception.__dict__, which is used in some cases
     exc.x = 1
     exc.__cause__.x = 2
@@ -88,7 +92,7 @@ def test_install(clear_dispatch_table, h
     if has_python311:
         assert exc.__notes__ == ['note 1', 'note 2']
 
-    assert expected_format_exception == ''.join(format_exception(type(exc), 
exc, exc.__traceback__))
+    assert expected_format_exception == 
strip_locations(''.join(format_exception(type(exc), exc, exc.__traceback__)))
 
 
 @tblib.pickling_support.install

++++++ tblib-1.7.0.tar.gz -> tblib-3.0.0.tar.gz ++++++
++++ 5796 lines of diff (skipped)

++++++ vendore-reraise-from-six.patch ++++++
>From 9f6f864f7de6ce6640bab6d962f00b956da75361 Mon Sep 17 00:00:00 2001
From: Alexandre Detiste <[email protected]>
Date: Wed, 1 May 2024 13:43:53 +0200
Subject: [PATCH] vendore reraise() from six

---
 ci/requirements.txt     |  1 -
 setup.py                |  2 +-
 src/tblib/decorators.py | 14 ++++++++++++--
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/ci/requirements.txt b/ci/requirements.txt
index a1708f4..b4f1852 100644
--- a/ci/requirements.txt
+++ b/ci/requirements.txt
@@ -1,6 +1,5 @@
 virtualenv>=16.6.0
 pip>=19.1.1
 setuptools>=18.0.1
-six>=1.14.0
 tox
 twine
diff --git a/setup.py b/setup.py
index c5364a1..c09d4c3 100755
--- a/setup.py
+++ b/setup.py
@@ -64,7 +64,7 @@ def read(*names, **kwargs):
     ],
     python_requires='>=3.8',
     install_requires=[
-        # eg: "aspectlib==1.1.1", "six>=1.7",
+        # eg: "aspectlib==1.1.1",
     ],
     extras_require={
         # eg:
diff --git a/src/tblib/decorators.py b/src/tblib/decorators.py
index 38d0675..a1ace45 100644
--- a/src/tblib/decorators.py
+++ b/src/tblib/decorators.py
@@ -1,11 +1,21 @@
 import sys
 from functools import wraps
 
-from six import reraise
-
 from . import Traceback
 
 
+def reraise(tp, value, tb=None):
+    try:
+        if value is None:
+            value = tp()
+        if value.__traceback__ is not tb:
+            raise value.with_traceback(tb)
+        raise value
+    finally:
+        value = None
+        tb = None
+
+
 class Error:
     def __init__(self, exc_type, exc_value, traceback):
         self.exc_type = exc_type

Reply via email to