Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pyScss for openSUSE:Factory 
checked in at 2022-01-11 21:20:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyScss (Old)
 and      /work/SRC/openSUSE:Factory/.python-pyScss.new.1892 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pyScss"

Tue Jan 11 21:20:23 2022 rev:4 rq:945620 version:1.3.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pyScss/python-pyScss.changes      
2020-04-29 20:54:37.909307035 +0200
+++ /work/SRC/openSUSE:Factory/.python-pyScss.new.1892/python-pyScss.changes    
2022-01-11 21:24:34.265182561 +0100
@@ -1,0 +2,9 @@
+Tue Jan 11 11:19:13 UTC 2022 - John Vandenberg <jay...@gmail.com>
+
+- Activate tests
+- Add missing build dependency six
+- Add pr_411.patch for Python 3.10 support
+- Add merged_pr_408.patch for pytest 6 support
+- Disable Python 2 builds due to incompatibility
+
+-------------------------------------------------------------------

New:
----
  merged_pr_408.patch
  pr_411.patch

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

Other differences:
------------------
++++++ python-pyScss.spec ++++++
--- /var/tmp/diff_new_pack.QllWEf/_old  2022-01-11 21:24:34.661182840 +0100
+++ /var/tmp/diff_new_pack.QllWEf/_new  2022-01-11 21:24:34.669182845 +0100
@@ -18,6 +18,7 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
 Name:           python-pyScss
 Version:        1.3.7
 Release:        0
@@ -25,18 +26,19 @@
 License:        MIT
 Group:          Development/Languages/Python
 URL:            https://github.com/Kronuz/pyScss
-Source:         
https://files.pythonhosted.org/packages/source/p/pyScss/pyScss-%{version}.tar.gz
+Source:         
https://github.com/Kronuz/pyScss/archive/refs/tags/%{version}.tar.gz#/pyScss-%{version}.tar.gz
+Patch0:         pr_411.patch
+Patch1:         merged_pr_408.patch
 BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module six}
 BuildRequires:  pcre-devel
 BuildRequires:  python-rpm-macros
 Requires:       python-setuptools
 Requires:       python-six
 Requires(post): update-alternatives
 Requires(postun): update-alternatives
-%ifpython2
-Requires:       python-enum34
-%endif
 %python_subpackages
 
 %description
@@ -56,6 +58,8 @@
 
 %prep
 %setup -q -n pyScss-%{version}
+%patch0 -p1
+%patch1 -p1
 
 %build
 export CFLAGS="%{optflags}"
@@ -74,6 +78,10 @@
 %python_uninstall_alternative pyscss
 %python_uninstall_alternative less2scss
 
+%check
+# test_stdio depends on 'python' binary
+%pytest -k 'not test_stdio'
+
 %files %{python_files}
 %license LICENSE
 %doc README.rst

++++++ merged_pr_408.patch ++++++
>From 5d880813f9706f71f33d5fc585b36ffbf4dbfe75 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Wed, 5 Aug 2020 13:35:45 +0300
Subject: [PATCH] Add compatibility against Pytest 5.4+

The direct construction of nodes is deprecated since Pytest 5.4 [0]:
> The construction of nodes now should use the named constructor
from_parent. This limitation in api surface intends to enable
better/simpler refactoring of the collection tree.
    This means that instead of MyItem(name="foo", parent=collector, obj=42)
one now has to invoke MyItem.from_parent(collector, name="foo").

[0]: 
https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent

Fixes: https://github.com/Kronuz/pyScss/issues/407
Signed-off-by: Stanislav Levin <s...@altlinux.org>
---
 conftest.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/conftest.py b/conftest.py
index 535bb68..86c213a 100644
--- a/conftest.py
+++ b/conftest.py
@@ -58,7 +58,10 @@ def pytest_collect_file(path, parent):
         parts = str(path).split(path.sep)
         # -4 tests / -3 files / -2 directory / -1 file.scss
         if parts[-4:-2] == ['tests', 'files']:
-            return SassFile(path, parent)
+            if hasattr(SassFile, "from_parent"):
+                return SassFile.from_parent(parent, fspath=path)
+            else:
+                return SassFile(path, parent)
 
 
 class SassFile(pytest.File):
@@ -67,7 +70,10 @@ def collect(self):
         if not fontforge and parent_name == 'fonts':
             pytest.skip("font tests require fontforge")
 
-        yield SassItem(str(self.fspath), self)
+        if hasattr(SassItem, "from_parent"):
+            yield SassItem.from_parent(parent=self, name=str(self.fspath))
+        else:
+            yield SassItem(str(self.fspath), self)
 
 
 class SassItem(pytest.Item):

++++++ pr_411.patch ++++++
>From 147a49013a2f72f20edd058d9df7175d1283e2b1 Mon Sep 17 00:00:00 2001
From: Chris Sewell <chrisj_sew...@hotmail.com>
Date: Thu, 3 Sep 2020 19:51:14 +0100
Subject: [PATCH] Fix collections deprecation warning

---
 scss/types.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scss/types.py b/scss/types.py
index c35905a..acaf72c 100644
--- a/scss/types.py
+++ b/scss/types.py
@@ -3,7 +3,10 @@
 from __future__ import print_function
 from __future__ import unicode_literals
 
-from collections import Iterable
+try:
+    from collections.abc import Iterable
+except ImportError:
+    from collections import Iterable
 import colorsys
 from fractions import Fraction
 import operator

++++++ pyScss-1.3.7.tar.gz ++++++
++++ 67560 lines of diff (skipped)

Reply via email to