14
0
forked from pool/python-evdev

Accepting request 965007 from home:theMarix:branches:devel:languages:python

- Update to 1.5.0
  * Input device is now closed from main thread in
    InputDevice.close()
  * util.find_ecodes_by_regex now works across all Python versions
- Drop evdev-re-Pattern.patch now included upstream

OBS-URL: https://build.opensuse.org/request/show/965007
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-evdev?expand=0&rev=20
This commit is contained in:
Matthias Bach
2022-03-26 11:33:33 +00:00
committed by Git OBS Bridge
parent 7ee4ec8a7d
commit f7ce5e7c4d
5 changed files with 13 additions and 28 deletions

View File

@@ -1,22 +0,0 @@
diff --git a/evdev/util.py b/evdev/util.py
index 818be69..e8009f7 100644
--- a/evdev/util.py
+++ b/evdev/util.py
@@ -118,6 +118,8 @@ def find_ecodes_by_regex(regex):
'''
Find ecodes matching a regex and return a mapping of event type to event codes.
+ regex can be a pattern string or a compiled regular expression object.
+
Example
-------
>>> find_ecodes_by_regex(r'(ABS|KEY)_BR(AKE|EAK)')
@@ -130,7 +132,7 @@ def find_ecodes_by_regex(regex):
}
'''
- regex = regex if isinstance(regex, re.Pattern) else re.compile(regex)
+ regex = re.compile(regex) # re.compile is idempotent
result = collections.defaultdict(list)
for type_code, codes in ecodes.bytype.items():

View File

@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Sat Mar 26 11:04:09 UTC 2022 - Matthias Bach <marix@marix.org> - 1.5.0
- Update to 1.5.0
* Input device is now closed from main thread in
InputDevice.close()
* util.find_ecodes_by_regex now works across all Python versions
- Drop evdev-re-Pattern.patch now included upstream
-------------------------------------------------------------------
Mon Jan 10 20:16:20 UTC 2022 - Matthias Bach <marix@marix.org>

View File

@@ -18,7 +18,7 @@
%define modname evdev
Name: python-evdev
Version: 1.4.0
Version: 1.5.0
Release: 0
Summary: Python bindings to the Linux input handling subsystem
License: BSD-3-Clause
@@ -26,8 +26,6 @@ Group: Development/Languages/Python
URL: https://github.com/gvalkov/python-evdev
# Source needs to be pulled form Github as the source distribution on PyPI lacks the test directory
Source: https://github.com/gvalkov/python-evdev/archive/v%{version}.tar.gz
# PATCH-FIX-UPSTREAM evdev-re-Pattern.patch -- gh#gvalkov/python-evdev#152
Patch1: evdev-re-Pattern.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:979638719b205acdead3ea3f7861d7b19427a8dc6147c660c24c58e79f0bb427
size 86010

3
v1.5.0.tar.gz Normal file
View File

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