diff --git a/evdev-re-Pattern.patch b/evdev-re-Pattern.patch new file mode 100644 index 0000000..9fc4b87 --- /dev/null +++ b/evdev-re-Pattern.patch @@ -0,0 +1,22 @@ +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(): diff --git a/python-evdev.changes b/python-evdev.changes index 9b51c0c..69ccd79 100644 --- a/python-evdev.changes +++ b/python-evdev.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Fri Apr 9 20:28:30 UTC 2021 - Ben Greiner + +- Add evdev-re-Pattern.patch -- gh#gvalkov/python-evdev#152 + +------------------------------------------------------------------- +Sat Jan 23 01:05:35 UTC 2021 - Dirk Müller + +- update to 1.4.0: +- Fix ``InputDevice.set_absinfo`` to allow setting parameters to zero. +- Fix off-by-one in ``ioctl_EVIOCG_bits``, which causes value at the end of the + list to not be reported back +- Fix ``set_absinfo`` to allow setting parameters to zero +- Fix leak when returning ``BlockingIOError`` from a read +- Fix "There is no current event loop in thread" error for non asyncio code +- Prevent ``InputDevice`` destructor from blocking +- Add missing return codes to ``os.strerror()`` calls and fix force feedback +- Add the ``util.find_ecodes_by_regex()`` helper function. + ------------------------------------------------------------------- Thu Dec 24 18:16:44 UTC 2020 - Matthias Bach - 1.3.0 diff --git a/python-evdev.spec b/python-evdev.spec index 8b20002..5451c42 100644 --- a/python-evdev.spec +++ b/python-evdev.spec @@ -1,7 +1,7 @@ # # spec file for package python-evdev # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define modname evdev Name: python-evdev -Version: 1.3.0 +Version: 1.4.0 Release: 0 Summary: Python bindings to the Linux input handling subsystem License: BSD-3-Clause @@ -26,6 +26,8 @@ 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} @@ -45,7 +47,7 @@ input devices that can inject events directly into the input subsystem. %prep -%autosetup +%autosetup -p1 %build %python_build diff --git a/v1.3.0.tar.gz b/v1.3.0.tar.gz deleted file mode 100644 index 010bfdd..0000000 --- a/v1.3.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:816367233ee23d86cef9b465bfdbaa778ab01e9a23d7604791acf7ff9434efe2 -size 85018 diff --git a/v1.4.0.tar.gz b/v1.4.0.tar.gz new file mode 100644 index 0000000..d1708ab --- /dev/null +++ b/v1.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:979638719b205acdead3ea3f7861d7b19427a8dc6147c660c24c58e79f0bb427 +size 86010