Accepting request 1007522 from devel:languages:python
- 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/request/show/1007522 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyScss?expand=0&rev=5
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
From 5d880813f9706f71f33d5fc585b36ffbf4dbfe75 Mon Sep 17 00:00:00 2001
|
||||
From: Stanislav Levin <slev@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 <slev@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):
|
||||
25
pr_411.patch
25
pr_411.patch
@@ -1,25 +0,0 @@
|
||||
From 147a49013a2f72f20edd058d9df7175d1283e2b1 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Sewell <chrisj_sewell@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
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:464a9cc6cc4dba65bfabe8668fb11a16c3255248a4c6b4ba78dc47add0504590
|
||||
size 316872
|
||||
3
pyScss-1.4.0.tar.gz
Normal file
3
pyScss-1.4.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a4c5885b8ec233293aa774e0ebbdf7db12b612acc0745e353395e3b4b9008089
|
||||
size 317094
|
||||
@@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 1 17:29:53 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- 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 <jayvdb@gmail.com>
|
||||
|
||||
|
||||
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user