Compare commits
6 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| d4ce2b1630 | |||
| 029a6dce20 | |||
| ad6b408dca | |||
| d84a561f6b | |||
| 5e145a378b | |||
| 22d79be81f |
27
avoid-resourcewarning.patch
Normal file
27
avoid-resourcewarning.patch
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
From 9b0efb31aa77cabf1eafa99a14855f2993aec129 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Steve Kowalik <steven@wedontsleep.org>
|
||||||
|
Date: Mon, 11 Aug 2025 12:44:39 +1000
|
||||||
|
Subject: [PATCH] No warnings when parsing JSON in the test metacls
|
||||||
|
|
||||||
|
Newer versions of pytest will now keep track of warnings in setup
|
||||||
|
methods (or classes that are used in the creation of test methods), and
|
||||||
|
may end up raising them. Avoid that by using a context manager to close
|
||||||
|
the file when we're done with it.
|
||||||
|
---
|
||||||
|
curlylint/rules/rule_test_case.py | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/curlylint/rules/rule_test_case.py b/curlylint/rules/rule_test_case.py
|
||||||
|
index c4b8679..ef3d1e8 100644
|
||||||
|
--- a/curlylint/rules/rule_test_case.py
|
||||||
|
+++ b/curlylint/rules/rule_test_case.py
|
||||||
|
@@ -20,7 +20,8 @@ def test(self):
|
||||||
|
|
||||||
|
return test
|
||||||
|
|
||||||
|
- fixtures = json.loads(open(tests["fixtures"], "r").read())
|
||||||
|
+ with open(tests["fixtures"], "r") as data:
|
||||||
|
+ fixtures = json.loads(data.read())
|
||||||
|
|
||||||
|
for item in fixtures:
|
||||||
|
test_label = item["label"].lower().replace(" ", "_")
|
||||||
@@ -1,3 +1,20 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 11 03:00:48 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Add patch avoid-resourcewarning.patch:
|
||||||
|
* Avoid ResourceWarning in a metaclass, avoids test failures with
|
||||||
|
pytest 8.4.1.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 4 14:26:00 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
|
||||||
|
|
||||||
|
- Migrate to libalternatives
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 26 10:57:52 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to pip-based build
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 27 15:26:50 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
Tue Sep 27 15:26:50 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-curlylint
|
# spec file for package python-curlylint
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,8 +16,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%bcond_without libalternatives
|
||||||
%define skip_python2 1
|
|
||||||
Name: python-curlylint
|
Name: python-curlylint
|
||||||
Version: 0.13.1
|
Version: 0.13.1
|
||||||
Release: 0
|
Release: 0
|
||||||
@@ -25,9 +24,15 @@ Summary: HTML templates linting for Jinja, Nunjucks, Django templates, Tw
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/thibaudcolas/curlylint
|
URL: https://github.com/thibaudcolas/curlylint
|
||||||
Source: https://files.pythonhosted.org/packages/source/c/curlylint/curlylint-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/c/curlylint/curlylint-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM gh#thibaudcolas/curlylint#158
|
||||||
|
Patch0: avoid-resourcewarning.patch
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: alts
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: alts
|
||||||
Requires: python-attrs >= 17.2.0
|
Requires: python-attrs >= 17.2.0
|
||||||
Requires: python-click >= 6.5
|
Requires: python-click >= 6.5
|
||||||
Requires: python-parsy >= 1.1.0
|
Requires: python-parsy >= 1.1.0
|
||||||
@@ -48,29 +53,30 @@ BuildRequires: %{python_module toml >= 0.9.4}
|
|||||||
HTML templates linting for Jinja, Nunjucks, Django templates, Twig, Liquid.
|
HTML templates linting for Jinja, Nunjucks, Django templates, Twig, Liquid.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n curlylint-%{version}
|
%autosetup -p1 -n curlylint-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_clone -a %{buildroot}%{_bindir}/curlylint
|
%python_clone -a %{buildroot}%{_bindir}/curlylint
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%pytest
|
%pytest
|
||||||
|
|
||||||
%post
|
%pre
|
||||||
%python_install_alternative curlylint
|
# If libalternatives is used: Removing old update-alternatives entries.
|
||||||
|
%python_libalternatives_reset_alternative curlylint
|
||||||
|
|
||||||
%postun
|
# post and postun macro call is not needed with only libalternatives
|
||||||
%python_uninstall_alternative curlylint
|
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%python_alternative %{_bindir}/curlylint
|
%python_alternative %{_bindir}/curlylint
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/curlylint
|
||||||
|
%{python_sitelib}/curlylint-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
Reference in New Issue
Block a user