- update to 0.24.0:

* Remove six dependency
  * Drop pylint tasks
  * Support python 3.9 and 3.10

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyudev?expand=0&rev=54
This commit is contained in:
Dirk Mueller 2022-10-01 07:49:29 +00:00 committed by Git OBS Bridge
parent 1597d92213
commit bc00a63817
9 changed files with 60 additions and 78 deletions

View File

@ -1,18 +0,0 @@
<services>
<service name="obs_scm" mode="disabled">
<param name="url">https://github.com/pyudev/pyudev.git</param>
<param name="scm">git</param>
<param name="exclude">.git*</param>
<param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
<param name="versionrewrite-pattern">v(.*)(\+0)?</param>
<param name="versionrewrite-replacement">\1</param>
<param name="changesgenerate">enable</param>
<param name="changesauthor">mcepl@cepl.eu</param>
</service>
<service mode="buildtime" name="tar" />
<service name="recompress" mode="buildtime">
<param name="compression">xz</param>
<param name="file">*.tar</param>
</service>
<service name="set_version" mode="disabled"/>
</services>

View File

@ -1,4 +0,0 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/pyudev/pyudev.git</param>
<param name="changesrevision">bb199c6c840756301a6dc16c44ae0625b2c930cd</param></service></servicedata>

View File

@ -1,8 +1,8 @@
diff --git a/tests/test_enumerate.py b/tests/test_enumerate.py
index 83af62d..0c97a18 100644
--- a/tests/test_enumerate.py
+++ b/tests/test_enumerate.py
@@ -91,7 +91,7 @@ class TestEnumerator(object):
Index: pyudev-0.24.0/tests/test_enumerate.py
===================================================================
--- pyudev-0.24.0.orig/tests/test_enumerate.py
+++ pyudev-0.24.0/tests/test_enumerate.py
@@ -88,7 +88,7 @@ class TestEnumerator(object):
@failed_health_check_wrapper
@given(_CONTEXT_STRATEGY, _SUBSYSTEM_STRATEGY)
@ -11,7 +11,7 @@ index 83af62d..0c97a18 100644
def test_match_subsystem(self, context, subsystem):
"""
Subsystem match matches devices w/ correct subsystem.
@@ -116,7 +116,7 @@ def test_match_subsystem_nomatch_unfulfillable(self, context, subsystem):
@@ -113,7 +113,7 @@ class TestEnumerator(object):
@failed_health_check_wrapper
@given(_CONTEXT_STRATEGY, _SUBSYSTEM_STRATEGY)
@ -20,7 +20,7 @@ index 83af62d..0c97a18 100644
def test_match_subsystem_nomatch_complete(self, context, subsystem):
"""
Test that w/ respect to the universe of devices returned by
@@ -134,7 +134,7 @@ def test_match_subsystem_nomatch_complete(self, context, subsystem):
@@ -131,7 +131,7 @@ class TestEnumerator(object):
@failed_health_check_wrapper
@given(_CONTEXT_STRATEGY, _MATCH_PROPERTY_STRATEGY.filter(lambda x: _is_bool(x[1])))
@ -29,7 +29,7 @@ index 83af62d..0c97a18 100644
def test_match_property_bool(self, context, pair):
"""
Verify that a probably boolean property lookup works.
@@ -152,7 +152,7 @@ def test_match_property_bool(self, context, pair):
@@ -149,7 +149,7 @@ class TestEnumerator(object):
@given(
_CONTEXT_STRATEGY, device_strategy(filter_func=lambda d: d.parent is not None)
)
@ -38,7 +38,7 @@ index 83af62d..0c97a18 100644
def test_match_parent(self, context, device):
"""
For a given device, verify that it is in its parent's children.
@@ -178,7 +178,7 @@ class TestEnumeratorMatchCombinations(object):
@@ -175,7 +175,7 @@ class TestEnumeratorMatchCombinations(ob
_SYSNAME_STRATEGY,
_MATCH_PROPERTY_STRATEGY,
)
@ -47,7 +47,7 @@ index 83af62d..0c97a18 100644
def test_match(self, context, subsystem, sysname, ppair):
"""
Test that matches from different categories are a conjunction.
@@ -234,7 +234,7 @@ def test_match_passthrough_sys_name(self, enumerator):
@@ -231,7 +231,7 @@ class TestEnumeratorMatchMethod(object):
match_sys_name.assert_called_with(mock.sentinel.sys_name)
@given(_ENUMERATOR_STRATEGY)
@ -56,7 +56,7 @@ index 83af62d..0c97a18 100644
def test_match_passthrough_tag(self, enumerator):
"""
Test that special keyword tag results in a match_tag call.
@@ -245,7 +245,7 @@ def test_match_passthrough_tag(self, enumerator):
@@ -242,7 +242,7 @@ class TestEnumeratorMatchMethod(object):
@_UDEV_TEST(172, "test_match_passthrough_parent")
@given(_ENUMERATOR_STRATEGY)
@ -65,7 +65,7 @@ index 83af62d..0c97a18 100644
def test_match_passthrough_parent(self, enumerator):
"""
Test that special keyword 'parent' results in a match parent call.
@@ -257,7 +257,7 @@ def test_match_passthrough_parent(self, enumerator):
@@ -254,7 +254,7 @@ class TestEnumeratorMatchMethod(object):
match_parent.assert_called_with(mock.sentinel.parent)
@given(_ENUMERATOR_STRATEGY)

View File

@ -1,7 +1,7 @@
diff --git a/pytest.ini b/pytest.ini
index 9d9100b..9c60249 100644
--- a/pytest.ini
+++ b/pytest.ini
Index: pyudev-0.24.0/pytest.ini
===================================================================
--- pyudev-0.24.0.orig/pytest.ini
+++ pyudev-0.24.0/pytest.ini
@@ -1,3 +1,6 @@
-[tool:pytest]
+[pytest]
@ -10,23 +10,23 @@ index 9d9100b..9c60249 100644
+markers =
+ conversion
+ real_udev
diff --git a/tests/_device_tests/_attributes_tests.py b/tests/_device_tests/_attributes_tests.py
index 4e42cda..0ad1384 100644
--- a/tests/_device_tests/_attributes_tests.py
+++ b/tests/_device_tests/_attributes_tests.py
@@ -122,6 +122,7 @@ def test_asbool(self, a_context, device_datum):
with pytest.raises(ValueError):
device.attributes.asbool(key)
Index: pyudev-0.24.0/tests/_device_tests/_attributes_tests.py
===================================================================
--- pyudev-0.24.0.orig/tests/_device_tests/_attributes_tests.py
+++ pyudev-0.24.0/tests/_device_tests/_attributes_tests.py
@@ -125,6 +125,7 @@ class TestAttributes(object):
except KeyError:
pass
+ @pytest.mark.real_udev
@_UDEV_TEST(167, "test_available_attributes")
@given(strategies.sampled_from(_DEVICES))
@settings(max_examples=5)
diff --git a/tests/_device_tests/_device_tests.py b/tests/_device_tests/_device_tests.py
index 30230f8..1b9a1af 100644
--- a/tests/_device_tests/_device_tests.py
+++ b/tests/_device_tests/_device_tests.py
@@ -215,6 +215,7 @@ def test_device_node(self, a_context, device_datum):
Index: pyudev-0.24.0/tests/_device_tests/_device_tests.py
===================================================================
--- pyudev-0.24.0.orig/tests/_device_tests/_device_tests.py
+++ pyudev-0.24.0/tests/_device_tests/_device_tests.py
@@ -212,6 +212,7 @@ class TestDevice(object):
if device.device_node:
assert is_unicode_string(device.device_node)
@ -34,11 +34,11 @@ index 30230f8..1b9a1af 100644
@given(_CONTEXT_STRATEGY, strategies.sampled_from(_DEVICE_DATA))
@settings(max_examples=5)
def test_device_number(self, a_context, device_datum):
diff --git a/tests/_device_tests/_devices_tests.py b/tests/_device_tests/_devices_tests.py
index 2cb4825..01e5a8a 100644
--- a/tests/_device_tests/_devices_tests.py
+++ b/tests/_device_tests/_devices_tests.py
@@ -128,6 +128,7 @@ def test_from_name_nonexisting_subsystem(self):
Index: pyudev-0.24.0/tests/_device_tests/_devices_tests.py
===================================================================
--- pyudev-0.24.0.orig/tests/_device_tests/_devices_tests.py
+++ pyudev-0.24.0/tests/_device_tests/_devices_tests.py
@@ -125,6 +125,7 @@ class TestDevices(object):
assert error.subsystem == "no_such_subsystem"
assert error.sys_name == "foobar"
@ -46,7 +46,7 @@ index 2cb4825..01e5a8a 100644
@failed_health_check_wrapper
@given(
_CONTEXT_STRATEGY,
@@ -143,6 +144,7 @@ def test_from_device_number(self, a_context, a_device):
@@ -140,6 +141,7 @@ class TestDevices(object):
device = Devices.from_device_number(a_context, typ, a_device.device_number)
assert a_device == device
@ -54,7 +54,7 @@ index 2cb4825..01e5a8a 100644
@failed_health_check_wrapper
@given(
_CONTEXT_STRATEGY,
@@ -178,6 +180,7 @@ def test_from_device_number_invalid_type(self):
@@ -175,6 +177,7 @@ class TestDevices(object):
with pytest.raises(DeviceNotFoundByNumberError):
Devices.from_device_number(_CONTEXT, "foobar", 100)
@ -62,11 +62,11 @@ index 2cb4825..01e5a8a 100644
@failed_health_check_wrapper
@given(
_CONTEXT_STRATEGY,
diff --git a/tests/test_enumerate.py b/tests/test_enumerate.py
index 8efb1f8..83af62d 100644
--- a/tests/test_enumerate.py
+++ b/tests/test_enumerate.py
@@ -104,7 +104,7 @@ def test_match_subsystem(self, context, subsystem):
Index: pyudev-0.24.0/tests/test_enumerate.py
===================================================================
--- pyudev-0.24.0.orig/tests/test_enumerate.py
+++ pyudev-0.24.0/tests/test_enumerate.py
@@ -101,7 +101,7 @@ class TestEnumerator(object):
@failed_health_check_wrapper
@given(_CONTEXT_STRATEGY, _SUBSYSTEM_STRATEGY)
@ -75,11 +75,11 @@ index 8efb1f8..83af62d 100644
def test_match_subsystem_nomatch_unfulfillable(self, context, subsystem):
"""
Combining match and no match should give an empty result.
diff --git a/tests/test_util.py b/tests/test_util.py
index 1389b6b..4b8587d 100644
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -132,6 +132,7 @@ def raise_valueerror():
Index: pyudev-0.24.0/tests/test_util.py
===================================================================
--- pyudev-0.24.0.orig/tests/test_util.py
+++ pyudev-0.24.0/tests/test_util.py
@@ -129,6 +129,7 @@ def raise_valueerror():
_CHAR_DEVICES = list(_CONTEXT.list_devices(subsystem="tty"))
@ -87,7 +87,7 @@ index 1389b6b..4b8587d 100644
@pytest.mark.skipif(len(_CHAR_DEVICES) == 0, reason="no tty devices")
@given(strategies.sampled_from(_CHAR_DEVICES))
@settings(max_examples=5)
@@ -145,6 +146,7 @@ def test_get_device_type_character_device(a_device):
@@ -142,6 +143,7 @@ def test_get_device_type_character_devic
_BLOCK_DEVICES = list(_CONTEXT.list_devices(subsystem="block"))

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:91fbc62f3a8425871a943cc424bf93d7d2c9cb3c5df4480f81efe23ef3a64603
size 81712

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Sat Oct 1 07:48:17 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 0.24.0:
* Remove six dependency
* Drop pylint tasks
* Support python 3.9 and 3.10
-------------------------------------------------------------------
Thu Mar 17 09:06:05 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>

View File

@ -18,13 +18,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pyudev
Version: 0.23.2+14
Version: 0.24.0
Release: 0
Summary: Udev bindings for Python
License: LGPL-2.1-or-later
Group: Development/Libraries/Python
URL: http://pyudev.readthedocs.org/
Source0: pyudev-%{version}.tar.xz
URL: https://pyudev.readthedocs.io/
Source0: https://github.com/pyudev/pyudev/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}-gh.tar.gz
# PATCH-FIX-UPSTREAM pytest_register_mark.patch gh#pyudev/pyudev#404 mcepl@suse.com
# Add missing mark registration and register and use another mark
Patch0: pytest_register_mark.patch

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:099c0196ce9525072c4efe4e9cda78c426c8fac9bf9cae6834458012d7680964
size 390667

View File

@ -1,4 +0,0 @@
name: pyudev
version: 0.23.2+14
mtime: 1646756777
commit: 3f60ee80d424178008b39c5ca323cc1a15f2b64e