Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-blist for openSUSE:Factory checked in at 2021-04-01 14:17:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-blist (Old) and /work/SRC/openSUSE:Factory/.python-blist.new.2401 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-blist" Thu Apr 1 14:17:52 2021 rev:6 rq:882379 version:1.3.6 Changes: -------- --- /work/SRC/openSUSE:Factory/python-blist/python-blist.changes 2018-08-08 14:53:48.797581061 +0200 +++ /work/SRC/openSUSE:Factory/.python-blist.new.2401/python-blist.changes 2021-04-01 14:19:15.676151864 +0200 @@ -1,0 +2,7 @@ +Wed Mar 31 10:32:09 UTC 2021 - Ben Greiner <[email protected]> + +- Add blist-pr91-py39.patch for compatibility with Python 3.9 + gh#DanielStutzbach/blist#91 +- Replace obsoleted setup.py test call + +------------------------------------------------------------------- New: ---- blist-pr91-py39.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-blist.spec ++++++ --- /var/tmp/diff_new_pack.kSIFs1/_old 2021-04-01 14:19:16.236152611 +0200 +++ /var/tmp/diff_new_pack.kSIFs1/_new 2021-04-01 14:19:16.240152616 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-blist # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# 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 @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -26,6 +26,8 @@ URL: http://stutzbachenterprises.com/blist/ Source: https://files.pythonhosted.org/packages/source/b/blist/blist-%{version}.tar.gz Patch0: 0001-Fix-compatibility-for-Python-3.7.patch +# PATCH-FIX-UPSTREAM blist-pr91-py39.patch -- gh#DanielStutzbach/blist/pull/91.patch +Patch1: https://github.com/DanielStutzbach/blist/pull/91.patch#/blist-pr91-py39.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -39,8 +41,7 @@ weaksortedset, sorteddict, and btuple types. %prep -%setup -q -n blist-%{version} -%patch0 -p1 +%autosetup -p1 -n blist-%{version} %build export CFLAGS="%{optflags} -fno-strict-aliasing" @@ -51,7 +52,15 @@ %python_expand %fdupes %{buildroot}%{$python_sitearch} %check -%python_exec setup.py test +%{python_expand # arcane test suite setup: needs the built module in the same tree as the test files +mkdir blist-test-%{$python_bin_suffix} +pushd blist-test-%{$python_bin_suffix} +cp -r %{buildroot}%{$python_sitearch}/blist ./ +cp -r ../blist/test blist/ +cp ../test_blist.py ./ +$python -m unittest -v test_blist.test_suite +popd +} %files %{python_files} %license LICENSE ++++++ blist-pr91-py39.patch ++++++ >From e63514f805e42dc6a5708e629e4153d91bc90bff Mon Sep 17 00:00:00 2001 From: Stefano Rivera <[email protected]> Date: Thu, 15 Oct 2020 08:51:34 -0700 Subject: [PATCH] Python 3.9 compatibility Replace _PyObject_GC_IS_TRACKED() with PyObject_GC_IsTracked(). This is the new public API from Python 3.9, relegating _PyObject_GC_IS_TRACKED() to private internal use. Fixes: #90 --- blist/_blist.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/blist/_blist.c b/blist/_blist.c index f7fcb60..53564db 100644 --- a/blist/_blist.c +++ b/blist/_blist.c @@ -101,8 +101,8 @@ /* This macro is defined in Python 3. We need it since calling * PyObject_GC_UnTrack twice is unsafe. */ /* True if the object is currently tracked by the GC. */ -#define _PyObject_GC_IS_TRACKED(o) \ - ((_Py_AS_GC(o))->gc.gc_refs != _PyGC_REFS_UNTRACKED) +#define PyObject_GC_IsTracked(ob) \ + (PyObject_IS_GC(ob) && (_Py_AS_GC(ob))->gc.gc_refs != _PyGC_REFS_UNTRACKED) #if PY_MINOR_VERSION < 6 /* Backward compatibility with Python 2.5 */ @@ -122,6 +122,12 @@ #define PyInt_AsLong PyLong_AsLong #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_FromLong PyLong_FromLong + +#if PY_MINOR_VERSION < 9 +#define PyObject_GC_IsTracked(ob) \ + (PyObject_IS_GC(ob) && _PyObject_GC_IS_TRACKED(ob)) +#endif + #endif #ifndef BLIST_IN_PYTHON @@ -4580,7 +4586,7 @@ unwrap_leaf_array(PyBList **leafs, int leafs_n, int n, for (i = 0; i < leafs_n; i++) { PyBList *leaf = leafs[i]; - if (leafs_n > 1 && !_PyObject_GC_IS_TRACKED(leafs[i])) + if (leafs_n > 1 && !PyObject_GC_IsTracked(leafs[i])) PyObject_GC_Track(leafs[i]); for (j = 0; j < leaf->num_children && k < n; j++, k++) { sortwrapperobject *wrapper; @@ -5783,7 +5789,7 @@ py_blist_dealloc(PyObject *oself) assert(PyBList_Check(oself)); self = (PyBList *) oself; - if (_PyObject_GC_IS_TRACKED(self)) + if (PyObject_GC_IsTracked(self)) PyObject_GC_UnTrack(self); Py_TRASHCAN_SAFE_BEGIN(self)
