Sync from SUSE:SLFO:Main python-handy-archives revision 41e2eadd53a00ab02b63cdd3f982281b
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 12 09:12:23 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Add upstream patch to fix tests with pytest >= 8.1:
|
||||
0001-Use-reason-instead-of-msg-for-pytest.skip.patch
|
||||
gh#domdfcoding/handy-archives#35
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 26 07:14:29 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Initial release of 0.2.0
|
||||
- Add patch ignore-tarfile-deprecation-warning.patch:
|
||||
* Ignore DeprecationWarning raised by tarfile.
|
||||
@@ -0,0 +1,82 @@
|
||||
#
|
||||
# spec file for package python-handy-archives
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
Name: python-handy-archives%{psuffix}
|
||||
Version: 0.2.0
|
||||
Release: 0
|
||||
Summary: Some handy archive helpers for Python
|
||||
License: MIT
|
||||
URL: https://github.com/domdfcoding/handy-archives
|
||||
Source: https://github.com/domdfcoding/handy-archives/archive/refs/tags/v%{version}.tar.gz#/handy_archives-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM gh#domdfcoding/handy-archives#3bc48dda6a06545ba53a829c6efb0f1a1b95349e
|
||||
Patch0: ignore-tarfile-deprecation-warning.patch
|
||||
# PATCH-FIX-UPSTREAM: 0001-Use-reason-instead-of-msg-for-pytest.skip.patch gh#domdfcoding/handy-archives#35
|
||||
Patch1: 0001-Use-reason-instead-of-msg-for-pytest.skip.patch
|
||||
BuildRequires: %{python_module flit-core >= 3.2}
|
||||
BuildRequires: %{python_module pip}
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module coincidence}
|
||||
BuildRequires: %{python_module handy-archives = %{version}}
|
||||
BuildRequires: %{python_module pytest-timeout}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module testsuite}
|
||||
%endif
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Suggests: python-coincidence >= 0.2.0
|
||||
Suggests: python-pytest >= 6.0.0
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Some handy archive helpers for Python.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n handy-archives-%{version}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%if !%{with test}
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
%pytest
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python_sitelib}/handy_archives
|
||||
%{python_sitelib}/handy_archives-%{version}.dist-info
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
@@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
||||
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
@@ -0,0 +1,32 @@
|
||||
From 51c1bad2af2a9bfd65f3543d5548ffbd218ee6a3 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
|
||||
Date: Mon, 12 Aug 2024 11:05:45 +0200
|
||||
Subject: [PATCH] Use reason instead of msg for pytest.skip
|
||||
|
||||
msg argument is removed since version 8.1.0
|
||||
https://github.com/pytest-dev/pytest/commit/0591569b4ba9bfb12e5b5307da621a83c4ceced6
|
||||
---
|
||||
tests/test_zipfile.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/test_zipfile.py b/tests/test_zipfile.py
|
||||
index 3e5e0b1..da81e75 100644
|
||||
--- a/tests/test_zipfile.py
|
||||
+++ b/tests/test_zipfile.py
|
||||
@@ -761,11 +761,11 @@ class TestStoredTestsWithSourceFile(AbstractTestsWithSourceFile):
|
||||
try:
|
||||
time.localtime(ts)
|
||||
except OverflowError:
|
||||
- pytest.skip(msg=f'time.localtime({ts}) raises OverflowError')
|
||||
+ pytest.skip(reason=f'time.localtime({ts}) raises OverflowError')
|
||||
try:
|
||||
os.utime(testfn, (ts, ts))
|
||||
except OverflowError:
|
||||
- pytest.skip(msg="Host fs cannot set timestamp to required value.")
|
||||
+ pytest.skip(reason="Host fs cannot set timestamp to required value.")
|
||||
|
||||
mtime_ns = os.stat(tmp_pathplus / TESTFN).st_mtime_ns
|
||||
if mtime_ns != (4386268800 * 10**9):
|
||||
--
|
||||
2.45.2
|
||||
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
From 3bc48dda6a06545ba53a829c6efb0f1a1b95349e Mon Sep 17 00:00:00 2001
|
||||
From: Dominic Davis-Foster <dominic@davis-foster.co.uk>
|
||||
Date: Mon, 31 Jul 2023 15:38:24 +0100
|
||||
Subject: [PATCH] Don't error on Python 3.12 tarfile deprecation warning
|
||||
|
||||
---
|
||||
tox.ini | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tox.ini b/tox.ini
|
||||
index 51dda43..c36d4be 100644
|
||||
--- a/tox.ini
|
||||
+++ b/tox.ini
|
||||
@@ -181,7 +181,7 @@ commands =
|
||||
|
||||
[flake8]
|
||||
max-line-length = 120
|
||||
-select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E303 E304 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 ENC001 ENC002 ENC003 ENC004 ENC011 ENC012 ENC021 ENC022 ENC023 ENC024 ENC025 ENC026 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 NQA001 NQA002 NQA003 NQA004 NQA005 NQA102 NQA103 E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002
|
||||
+select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E303 E304 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 ENC001 ENC002 ENC003 ENC004 ENC011 ENC012 ENC021 ENC022 ENC023 ENC024 ENC025 ENC026 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 NQA001 NQA002 NQA003 NQA004 NQA005 NQA102 NQA103 E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002
|
||||
extend-exclude = doc-source,old,build,dist,__pkginfo__.py,setup.py,venv
|
||||
rst-directives =
|
||||
TODO
|
||||
@@ -230,3 +230,4 @@ filterwarnings =
|
||||
error
|
||||
ignore:can't resolve package from __spec__ or __package__, falling back on __name__ and __path__:ImportWarning
|
||||
always:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated:DeprecationWarning
|
||||
+ always:Python 3.14 will, by default, filter extracted tar archives and reject files or modify:DeprecationWarning
|
||||
Reference in New Issue
Block a user