From 9c2bc907e60d15756002988866af32f65eb5b1788abc5687f7889257ee5f0de0 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 23 Jan 2021 01:06:13 +0000 Subject: [PATCH 1/2] - 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. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-evdev?expand=0&rev=16 --- python-evdev.changes | 14 ++++++++++++++ python-evdev.spec | 4 ++-- v1.3.0.tar.gz | 3 --- v1.4.0.tar.gz | 3 +++ 4 files changed, 19 insertions(+), 5 deletions(-) delete mode 100644 v1.3.0.tar.gz create mode 100644 v1.4.0.tar.gz diff --git a/python-evdev.changes b/python-evdev.changes index 9b51c0c..0b803ef 100644 --- a/python-evdev.changes +++ b/python-evdev.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +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..88bbcef 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 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 From 2c64f60f4519118c1d0577941dd41e6241a93bc4db67781d2a7f1e498b25d207 Mon Sep 17 00:00:00 2001 From: Matthias Bach Date: Sat, 10 Apr 2021 08:46:57 +0000 Subject: [PATCH 2/2] Accepting request 884132 from home:bnavigator:branches:devel:languages:python - Add evdev-re-Pattern.patch -- gh#gvalkov/python-evdev#152 OBS-URL: https://build.opensuse.org/request/show/884132 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-evdev?expand=0&rev=17 --- evdev-re-Pattern.patch | 22 ++++++++++++++++++++++ python-evdev.changes | 5 +++++ python-evdev.spec | 4 +++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 evdev-re-Pattern.patch 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 0b803ef..69ccd79 100644 --- a/python-evdev.changes +++ b/python-evdev.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +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 diff --git a/python-evdev.spec b/python-evdev.spec index 88bbcef..5451c42 100644 --- a/python-evdev.spec +++ b/python-evdev.spec @@ -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