From 06fb1b593c66690aaba0d4b71f74f60c903b6b9a6bb381faa25f8aa5f9afdffd Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 1 Oct 2022 17:31:34 +0000 Subject: [PATCH 1/2] - update to 1.4.0: * Add selector-append function support * Fix FutureWarning * Fix collections deprecation warning * use pathlib2 instead of pathlib - drop merged_pr_408.patch, pr_411.patch (upstream) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyScss?expand=0&rev=10 --- merged_pr_408.patch | 48 ------------------------------------------- pr_411.patch | 25 ---------------------- pyScss-1.4.0.tar.gz | 3 +++ python-pyScss.changes | 10 +++++++++ python-pyScss.spec | 12 ++++------- 5 files changed, 17 insertions(+), 81 deletions(-) delete mode 100644 merged_pr_408.patch delete mode 100644 pr_411.patch create mode 100644 pyScss-1.4.0.tar.gz diff --git a/merged_pr_408.patch b/merged_pr_408.patch deleted file mode 100644 index 4b9ff1b..0000000 --- a/merged_pr_408.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 5d880813f9706f71f33d5fc585b36ffbf4dbfe75 Mon Sep 17 00:00:00 2001 -From: Stanislav Levin -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 ---- - 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): diff --git a/pr_411.patch b/pr_411.patch deleted file mode 100644 index 453244f..0000000 --- a/pr_411.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 147a49013a2f72f20edd058d9df7175d1283e2b1 Mon Sep 17 00:00:00 2001 -From: Chris Sewell -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 diff --git a/pyScss-1.4.0.tar.gz b/pyScss-1.4.0.tar.gz new file mode 100644 index 0000000..66c0556 --- /dev/null +++ b/pyScss-1.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4c5885b8ec233293aa774e0ebbdf7db12b612acc0745e353395e3b4b9008089 +size 317094 diff --git a/python-pyScss.changes b/python-pyScss.changes index a9cf2ae..8888ffd 100644 --- a/python-pyScss.changes +++ b/python-pyScss.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sat Oct 1 17:29:53 UTC 2022 - Dirk Müller + +- update to 1.4.0: + * Add selector-append function support + * Fix FutureWarning + * Fix collections deprecation warning + * use pathlib2 instead of pathlib +- drop merged_pr_408.patch, pr_411.patch (upstream) + ------------------------------------------------------------------- Tue Jan 11 11:19:13 UTC 2022 - John Vandenberg diff --git a/python-pyScss.spec b/python-pyScss.spec index bf69623..c44b8ac 100644 --- a/python-pyScss.spec +++ b/python-pyScss.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyScss # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2022 SUSE LLC # Copyright (c) 2014 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties @@ -20,15 +20,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-pyScss -Version: 1.3.7 +Version: 1.4.0 Release: 0 Summary: pyScss, a Scss compiler for Python License: MIT Group: Development/Languages/Python URL: https://github.com/Kronuz/pyScss -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 +Source: https://github.com/Kronuz/pyScss/archive/refs/tags/v%{version}.tar.gz#/pyScss-%{version}.tar.gz BuildRequires: %{python_module devel} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} @@ -38,7 +36,7 @@ BuildRequires: python-rpm-macros Requires: python-setuptools Requires: python-six Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(postun):update-alternatives %python_subpackages %description @@ -58,8 +56,6 @@ http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html %prep %setup -q -n pyScss-%{version} -%patch0 -p1 -%patch1 -p1 %build export CFLAGS="%{optflags}" From 78c2153cc7d70f24d4ae10117f6fdc0d58615fd7fbff6ff3f9c03ca2b76b85c6 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 2 Oct 2022 09:29:52 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyScss?expand=0&rev=11 --- pyScss-1.3.7.tar.gz | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 pyScss-1.3.7.tar.gz diff --git a/pyScss-1.3.7.tar.gz b/pyScss-1.3.7.tar.gz deleted file mode 100644 index e57f4a3..0000000 --- a/pyScss-1.3.7.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:464a9cc6cc4dba65bfabe8668fb11a16c3255248a4c6b4ba78dc47add0504590 -size 316872