forked from pool/python-pyudev
Accepting request 960810 from home:dimstar:Factory
Update to 0.23.2 plus a few git commits; does not fix build in F, but is a better base to work on OBS-URL: https://build.opensuse.org/request/show/960810 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyudev?expand=0&rev=49
This commit is contained in:
parent
fd8135d9ae
commit
9abcfd5abd
8
_service
8
_service
@ -1,14 +1,16 @@
|
|||||||
<services>
|
<services>
|
||||||
<service name="obs_scm" mode="disabled">
|
<service name="obs_scm" mode="disabled">
|
||||||
<param name="versionprefix">0.22.0+git</param>
|
|
||||||
<param name="url">https://github.com/pyudev/pyudev.git</param>
|
<param name="url">https://github.com/pyudev/pyudev.git</param>
|
||||||
<param name="scm">git</param>
|
<param name="scm">git</param>
|
||||||
<param name="exclude">.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="changesgenerate">enable</param>
|
||||||
<param name="changesauthor">mcepl@cepl.eu</param>
|
<param name="changesauthor">mcepl@cepl.eu</param>
|
||||||
</service>
|
</service>
|
||||||
<service mode="disabled" name="tar" />
|
<service mode="buildtime" name="tar" />
|
||||||
<service name="recompress" mode="disabled">
|
<service name="recompress" mode="buildtime">
|
||||||
<param name="compression">xz</param>
|
<param name="compression">xz</param>
|
||||||
<param name="file">*.tar</param>
|
<param name="file">*.tar</param>
|
||||||
</service>
|
</service>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<servicedata>
|
<servicedata>
|
||||||
<service name="tar_scm">
|
<service name="tar_scm">
|
||||||
<param name="url">https://github.com/pyudev/pyudev.git</param>
|
<param name="url">https://github.com/pyudev/pyudev.git</param>
|
||||||
<param name="changesrevision">e358af68d743a63caa48a2dd1469ad265be39aa9</param></service></servicedata>
|
<param name="changesrevision">bb199c6c840756301a6dc16c44ae0625b2c930cd</param></service></servicedata>
|
@ -1,7 +1,5 @@
|
|||||||
---
|
diff --git a/tests/test_enumerate.py b/tests/test_enumerate.py
|
||||||
tests/test_enumerate.py | 10 +++++-----
|
index 83af62d..0c97a18 100644
|
||||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
--- a/tests/test_enumerate.py
|
--- a/tests/test_enumerate.py
|
||||||
+++ b/tests/test_enumerate.py
|
+++ b/tests/test_enumerate.py
|
||||||
@@ -91,7 +91,7 @@ class TestEnumerator(object):
|
@@ -91,7 +91,7 @@ class TestEnumerator(object):
|
||||||
@ -13,7 +11,7 @@
|
|||||||
def test_match_subsystem(self, context, subsystem):
|
def test_match_subsystem(self, context, subsystem):
|
||||||
"""
|
"""
|
||||||
Subsystem match matches devices w/ correct subsystem.
|
Subsystem match matches devices w/ correct subsystem.
|
||||||
@@ -129,7 +129,7 @@ class TestEnumerator(object):
|
@@ -116,7 +116,7 @@ def test_match_subsystem_nomatch_unfulfillable(self, context, subsystem):
|
||||||
|
|
||||||
@failed_health_check_wrapper
|
@failed_health_check_wrapper
|
||||||
@given(_CONTEXT_STRATEGY, _SUBSYSTEM_STRATEGY)
|
@given(_CONTEXT_STRATEGY, _SUBSYSTEM_STRATEGY)
|
||||||
@ -22,25 +20,25 @@
|
|||||||
def test_match_subsystem_nomatch_complete(self, context, subsystem):
|
def test_match_subsystem_nomatch_complete(self, context, subsystem):
|
||||||
"""
|
"""
|
||||||
Test that w/ respect to the universe of devices returned by
|
Test that w/ respect to the universe of devices returned by
|
||||||
@@ -147,7 +147,7 @@ class TestEnumerator(object):
|
@@ -134,7 +134,7 @@ def test_match_subsystem_nomatch_complete(self, context, subsystem):
|
||||||
|
|
||||||
@failed_health_check_wrapper
|
@failed_health_check_wrapper
|
||||||
@given(_CONTEXT_STRATEGY, _SYSNAME_STRATEGY)
|
@given(_CONTEXT_STRATEGY, _MATCH_PROPERTY_STRATEGY.filter(lambda x: _is_bool(x[1])))
|
||||||
|
- @settings(max_examples=10)
|
||||||
|
+ @settings(max_examples=10, deadline=500)
|
||||||
|
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):
|
||||||
|
@given(
|
||||||
|
_CONTEXT_STRATEGY, device_strategy(filter_func=lambda d: d.parent is not None)
|
||||||
|
)
|
||||||
- @settings(max_examples=5)
|
- @settings(max_examples=5)
|
||||||
+ @settings(max_examples=5, deadline=500)
|
+ @settings(max_examples=5, deadline=500)
|
||||||
def test_match_sys_name(self, context, sysname):
|
def test_match_parent(self, context, device):
|
||||||
"""
|
"""
|
||||||
A sysname lookup only gives devices with that sysname.
|
For a given device, verify that it is in its parent's children.
|
||||||
@@ -221,7 +221,7 @@ class TestEnumeratorMatchCombinations(ob
|
@@ -178,7 +178,7 @@ class TestEnumeratorMatchCombinations(object):
|
||||||
unique_by=lambda p: p[0],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
- @settings(max_examples=2)
|
|
||||||
+ @settings(max_examples=2, deadline=500)
|
|
||||||
def test_combined_property_matches(self, context, ppairs):
|
|
||||||
"""
|
|
||||||
Test for behaviour as observed in #1
|
|
||||||
@@ -246,7 +246,7 @@ class TestEnumeratorMatchCombinations(ob
|
|
||||||
_SYSNAME_STRATEGY,
|
_SYSNAME_STRATEGY,
|
||||||
_MATCH_PROPERTY_STRATEGY,
|
_MATCH_PROPERTY_STRATEGY,
|
||||||
)
|
)
|
||||||
@ -49,3 +47,30 @@
|
|||||||
def test_match(self, context, subsystem, sysname, ppair):
|
def test_match(self, context, subsystem, sysname, ppair):
|
||||||
"""
|
"""
|
||||||
Test that matches from different categories are a conjunction.
|
Test that matches from different categories are a conjunction.
|
||||||
|
@@ -234,7 +234,7 @@ def test_match_passthrough_sys_name(self, enumerator):
|
||||||
|
match_sys_name.assert_called_with(mock.sentinel.sys_name)
|
||||||
|
|
||||||
|
@given(_ENUMERATOR_STRATEGY)
|
||||||
|
- @settings(max_examples=1)
|
||||||
|
+ @settings(max_examples=1, deadline=500)
|
||||||
|
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):
|
||||||
|
|
||||||
|
@_UDEV_TEST(172, "test_match_passthrough_parent")
|
||||||
|
@given(_ENUMERATOR_STRATEGY)
|
||||||
|
- @settings(max_examples=1)
|
||||||
|
+ @settings(max_examples=1, deadline=500)
|
||||||
|
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):
|
||||||
|
match_parent.assert_called_with(mock.sentinel.parent)
|
||||||
|
|
||||||
|
@given(_ENUMERATOR_STRATEGY)
|
||||||
|
- @settings(max_examples=1)
|
||||||
|
+ @settings(max_examples=1, deadline=500)
|
||||||
|
def test_match_passthrough_property(self, enumerator):
|
||||||
|
"""
|
||||||
|
Test that non-special keyword args are treated as properties.
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
---
|
diff --git a/pytest.ini b/pytest.ini
|
||||||
pytest.ini | 5 ++++-
|
index 9d9100b..9c60249 100644
|
||||||
tests/_device_tests/_attributes_tests.py | 1 +
|
|
||||||
tests/_device_tests/_device_tests.py | 1 +
|
|
||||||
tests/_device_tests/_devices_tests.py | 3 +++
|
|
||||||
tests/test_enumerate.py | 2 +-
|
|
||||||
tests/test_util.py | 2 ++
|
|
||||||
6 files changed, 12 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- a/pytest.ini
|
--- a/pytest.ini
|
||||||
+++ b/pytest.ini
|
+++ b/pytest.ini
|
||||||
@@ -1,3 +1,6 @@
|
@@ -1,3 +1,6 @@
|
||||||
@ -17,9 +10,11 @@
|
|||||||
+markers =
|
+markers =
|
||||||
+ conversion
|
+ conversion
|
||||||
+ real_udev
|
+ 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
|
--- a/tests/_device_tests/_attributes_tests.py
|
||||||
+++ b/tests/_device_tests/_attributes_tests.py
|
+++ b/tests/_device_tests/_attributes_tests.py
|
||||||
@@ -122,6 +122,7 @@ class TestAttributes(object):
|
@@ -122,6 +122,7 @@ def test_asbool(self, a_context, device_datum):
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
device.attributes.asbool(key)
|
device.attributes.asbool(key)
|
||||||
|
|
||||||
@ -27,9 +22,11 @@
|
|||||||
@_UDEV_TEST(167, "test_available_attributes")
|
@_UDEV_TEST(167, "test_available_attributes")
|
||||||
@given(strategies.sampled_from(_DEVICES))
|
@given(strategies.sampled_from(_DEVICES))
|
||||||
@settings(max_examples=5)
|
@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
|
--- a/tests/_device_tests/_device_tests.py
|
||||||
+++ b/tests/_device_tests/_device_tests.py
|
+++ b/tests/_device_tests/_device_tests.py
|
||||||
@@ -215,6 +215,7 @@ class TestDevice(object):
|
@@ -215,6 +215,7 @@ def test_device_node(self, a_context, device_datum):
|
||||||
if device.device_node:
|
if device.device_node:
|
||||||
assert is_unicode_string(device.device_node)
|
assert is_unicode_string(device.device_node)
|
||||||
|
|
||||||
@ -37,9 +34,11 @@
|
|||||||
@given(_CONTEXT_STRATEGY, strategies.sampled_from(_DEVICE_DATA))
|
@given(_CONTEXT_STRATEGY, strategies.sampled_from(_DEVICE_DATA))
|
||||||
@settings(max_examples=5)
|
@settings(max_examples=5)
|
||||||
def test_device_number(self, a_context, device_datum):
|
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
|
--- a/tests/_device_tests/_devices_tests.py
|
||||||
+++ b/tests/_device_tests/_devices_tests.py
|
+++ b/tests/_device_tests/_devices_tests.py
|
||||||
@@ -128,6 +128,7 @@ class TestDevices(object):
|
@@ -128,6 +128,7 @@ def test_from_name_nonexisting_subsystem(self):
|
||||||
assert error.subsystem == "no_such_subsystem"
|
assert error.subsystem == "no_such_subsystem"
|
||||||
assert error.sys_name == "foobar"
|
assert error.sys_name == "foobar"
|
||||||
|
|
||||||
@ -47,7 +46,7 @@
|
|||||||
@failed_health_check_wrapper
|
@failed_health_check_wrapper
|
||||||
@given(
|
@given(
|
||||||
_CONTEXT_STRATEGY,
|
_CONTEXT_STRATEGY,
|
||||||
@@ -143,6 +144,7 @@ class TestDevices(object):
|
@@ -143,6 +144,7 @@ def test_from_device_number(self, a_context, a_device):
|
||||||
device = Devices.from_device_number(a_context, typ, a_device.device_number)
|
device = Devices.from_device_number(a_context, typ, a_device.device_number)
|
||||||
assert a_device == device
|
assert a_device == device
|
||||||
|
|
||||||
@ -55,7 +54,7 @@
|
|||||||
@failed_health_check_wrapper
|
@failed_health_check_wrapper
|
||||||
@given(
|
@given(
|
||||||
_CONTEXT_STRATEGY,
|
_CONTEXT_STRATEGY,
|
||||||
@@ -178,6 +180,7 @@ class TestDevices(object):
|
@@ -178,6 +180,7 @@ def test_from_device_number_invalid_type(self):
|
||||||
with pytest.raises(DeviceNotFoundByNumberError):
|
with pytest.raises(DeviceNotFoundByNumberError):
|
||||||
Devices.from_device_number(_CONTEXT, "foobar", 100)
|
Devices.from_device_number(_CONTEXT, "foobar", 100)
|
||||||
|
|
||||||
@ -63,17 +62,21 @@
|
|||||||
@failed_health_check_wrapper
|
@failed_health_check_wrapper
|
||||||
@given(
|
@given(
|
||||||
_CONTEXT_STRATEGY,
|
_CONTEXT_STRATEGY,
|
||||||
|
diff --git a/tests/test_enumerate.py b/tests/test_enumerate.py
|
||||||
|
index 8efb1f8..83af62d 100644
|
||||||
--- a/tests/test_enumerate.py
|
--- a/tests/test_enumerate.py
|
||||||
+++ b/tests/test_enumerate.py
|
+++ b/tests/test_enumerate.py
|
||||||
@@ -104,7 +104,7 @@ class TestEnumerator(object):
|
@@ -104,7 +104,7 @@ def test_match_subsystem(self, context, subsystem):
|
||||||
|
|
||||||
@failed_health_check_wrapper
|
@failed_health_check_wrapper
|
||||||
@given(_CONTEXT_STRATEGY, _SUBSYSTEM_STRATEGY)
|
@given(_CONTEXT_STRATEGY, _SUBSYSTEM_STRATEGY)
|
||||||
- @settings(max_examples=1)
|
- @settings(max_examples=5)
|
||||||
+ @settings(max_examples=1, deadline=None)
|
+ @settings(max_examples=5, deadline=None)
|
||||||
def test_match_subsystem_nomatch(self, context, subsystem):
|
def test_match_subsystem_nomatch_unfulfillable(self, context, subsystem):
|
||||||
"""
|
"""
|
||||||
Subsystem no match gets no subsystem with 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
|
--- a/tests/test_util.py
|
||||||
+++ b/tests/test_util.py
|
+++ b/tests/test_util.py
|
||||||
@@ -132,6 +132,7 @@ def raise_valueerror():
|
@@ -132,6 +132,7 @@ def raise_valueerror():
|
||||||
@ -84,7 +87,7 @@
|
|||||||
@pytest.mark.skipif(len(_CHAR_DEVICES) == 0, reason="no tty devices")
|
@pytest.mark.skipif(len(_CHAR_DEVICES) == 0, reason="no tty devices")
|
||||||
@given(strategies.sampled_from(_CHAR_DEVICES))
|
@given(strategies.sampled_from(_CHAR_DEVICES))
|
||||||
@settings(max_examples=5)
|
@settings(max_examples=5)
|
||||||
@@ -145,6 +146,7 @@ def test_get_device_type_character_devic
|
@@ -145,6 +146,7 @@ def test_get_device_type_character_device(a_device):
|
||||||
_BLOCK_DEVICES = list(_CONTEXT.list_devices(subsystem="block"))
|
_BLOCK_DEVICES = list(_CONTEXT.list_devices(subsystem="block"))
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 10 14:04:43 UTC 2022 - mcepl@cepl.eu
|
||||||
|
|
||||||
|
- Update to version 0.23.2+14:
|
||||||
|
* Remove a bunch of python-2 only testing
|
||||||
|
* Bump some Python versions
|
||||||
|
* Get rid of six dependency
|
||||||
|
* Drop all pylint tasks
|
||||||
|
* Remove overly rigorous tests
|
||||||
|
* Make a package target that uses build
|
||||||
|
* Omit PyPy flakey test
|
||||||
|
* Check whether the Context has a "_libudev" attribute
|
||||||
|
* Remove setup.cfg
|
||||||
|
* Remove obsolete egg_info parameter
|
||||||
|
* Delete another flaky test
|
||||||
|
- Rebase hypothesis_settings.patch and pytest_register_mark.patch.
|
||||||
|
- Drop six (Build)?Requires.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jan 25 08:54:16 UTC 2022 - Bernhard Wiedemann <bwiedemann@suse.com>
|
Tue Jan 25 08:54:16 UTC 2022 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-pyudev
|
Name: python-pyudev
|
||||||
Version: 0.22.0+git.1642212208.d5630bf
|
Version: 0.23.2+14
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Udev bindings for Python
|
Summary: Udev bindings for Python
|
||||||
License: LGPL-2.1-or-later
|
License: LGPL-2.1-or-later
|
||||||
@ -32,20 +32,17 @@ Patch0: pytest_register_mark.patch
|
|||||||
# tests timeout on OBS
|
# tests timeout on OBS
|
||||||
Patch2: hypothesis_settings.patch
|
Patch2: hypothesis_settings.patch
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module six}
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: pkgconfig(libudev)
|
BuildRequires: pkgconfig(libudev)
|
||||||
BuildRequires: pkgconfig(udev)
|
BuildRequires: pkgconfig(udev)
|
||||||
Requires: libudev1
|
Requires: libudev1
|
||||||
Requires: python-six
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: %{python_module Sphinx}
|
BuildRequires: %{python_module Sphinx}
|
||||||
BuildRequires: %{python_module docutils}
|
BuildRequires: %{python_module docutils}
|
||||||
BuildRequires: %{python_module hypothesis}
|
BuildRequires: %{python_module hypothesis}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module six}
|
|
||||||
BuildRequires: %{python_module yapf}
|
BuildRequires: %{python_module yapf}
|
||||||
%if 0%{?suse_version} < 1550
|
%if 0%{?suse_version} < 1550
|
||||||
BuildRequires: python-mock
|
BuildRequires: python-mock
|
||||||
@ -66,7 +63,6 @@ in modern linux systems.
|
|||||||
|
|
||||||
# Disable intersphinx and issuetracker, we don't want to access the web during doc build:
|
# Disable intersphinx and issuetracker, we don't want to access the web during doc build:
|
||||||
sed -i -e "s|'sphinx.ext.intersphinx',\\?||" -e "s|'sphinxcontrib.issuetracker',\\?||" doc/conf.py
|
sed -i -e "s|'sphinx.ext.intersphinx',\\?||" -e "s|'sphinxcontrib.issuetracker',\\?||" doc/conf.py
|
||||||
sed -i -e 's/tag_date = true/tag_date = false/' setup.cfg
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:aadd5ef8d671bc6885f368361d0895bdcb4964a75fcd8cd8b37ddb4a08db137c
|
|
||||||
size 67520
|
|
3
pyudev-0.23.2+14.obscpio
Normal file
3
pyudev-0.23.2+14.obscpio
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:c9c30065a9f55885b2c140b8b361e6ab4be6b88f9617ab4959b83a077c49397e
|
||||||
|
size 390667
|
@ -1,4 +1,4 @@
|
|||||||
name: pyudev
|
name: pyudev
|
||||||
version: 0.22.0+git.1642212208.d5630bf
|
version: 0.23.2+14
|
||||||
mtime: 1642212208
|
mtime: 1646756777
|
||||||
commit: d5630bf15692b652db55d626f66274169f3448d5
|
commit: 3f60ee80d424178008b39c5ca323cc1a15f2b64e
|
||||||
|
Loading…
Reference in New Issue
Block a user