evdev 1.9.2__tar.gz → 1.9.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {evdev-1.9.2/src/evdev.egg-info → evdev-1.9.3}/PKG-INFO +3 -33
  2. {evdev-1.9.2 → evdev-1.9.3}/pyproject.toml +5 -6
  3. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/input.c +25 -24
  4. {evdev-1.9.2 → evdev-1.9.3/src/evdev.egg-info}/PKG-INFO +3 -33
  5. {evdev-1.9.2 → evdev-1.9.3}/LICENSE +0 -0
  6. {evdev-1.9.2 → evdev-1.9.3}/MANIFEST.in +0 -0
  7. {evdev-1.9.2 → evdev-1.9.3}/README.md +0 -0
  8. {evdev-1.9.2 → evdev-1.9.3}/setup.cfg +0 -0
  9. {evdev-1.9.2 → evdev-1.9.3}/setup.py +0 -0
  10. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/__init__.py +0 -0
  11. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/device.py +0 -0
  12. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/ecodes.py +0 -0
  13. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/ecodes_runtime.py +0 -0
  14. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/eventio.py +0 -0
  15. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/eventio_async.py +0 -0
  16. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/events.py +0 -0
  17. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/evtest.py +0 -0
  18. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/ff.py +0 -0
  19. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/genecodes_c.py +0 -0
  20. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/genecodes_py.py +0 -0
  21. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/py.typed +0 -0
  22. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/uinput.c +0 -0
  23. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/uinput.py +0 -0
  24. {evdev-1.9.2 → evdev-1.9.3}/src/evdev/util.py +0 -0
  25. {evdev-1.9.2 → evdev-1.9.3}/src/evdev.egg-info/SOURCES.txt +0 -0
  26. {evdev-1.9.2 → evdev-1.9.3}/src/evdev.egg-info/dependency_links.txt +0 -0
  27. {evdev-1.9.2 → evdev-1.9.3}/src/evdev.egg-info/top_level.txt +0 -0
  28. {evdev-1.9.2 → evdev-1.9.3}/tests/test_ecodes.py +0 -0
  29. {evdev-1.9.2 → evdev-1.9.3}/tests/test_events.py +0 -0
  30. {evdev-1.9.2 → evdev-1.9.3}/tests/test_uinput.py +0 -0
  31. {evdev-1.9.2 → evdev-1.9.3}/tests/test_util.py +0 -0
@@ -1,39 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: evdev
3
- Version: 1.9.2
3
+ Version: 1.9.3
4
4
  Summary: Bindings to the Linux input handling subsystem
5
5
  Author-email: Georgi Valkov <georgi.t.valkov@gmail.com>
6
6
  Maintainer-email: Tobi <proxima@sezanzeb.de>
7
- License: Copyright (c) 2012-2025 Georgi Valkov. All rights reserved.
8
-
9
- Redistribution and use in source and binary forms, with or without
10
- modification, are permitted provided that the following conditions are
11
- met:
12
-
13
- 1. Redistributions of source code must retain the above copyright
14
- notice, this list of conditions and the following disclaimer.
15
-
16
- 2. Redistributions in binary form must reproduce the above copyright
17
- notice, this list of conditions and the following disclaimer in
18
- the documentation and/or other materials provided with the
19
- distribution.
20
-
21
- 3. Neither the name of author nor the names of its contributors may
22
- be used to endorse or promote products derived from this software
23
- without specific prior written permission.
24
-
25
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
29
- COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
-
7
+ License-Expression: BSD-3-Clause
37
8
  Project-URL: Homepage, https://github.com/gvalkov/python-evdev
38
9
  Keywords: evdev,input,uinput
39
10
  Classifier: Development Status :: 5 - Production/Stable
@@ -41,9 +12,8 @@ Classifier: Programming Language :: Python :: 3
41
12
  Classifier: Operating System :: POSIX :: Linux
42
13
  Classifier: Intended Audience :: Developers
43
14
  Classifier: Topic :: Software Development :: Libraries
44
- Classifier: License :: OSI Approved :: BSD License
45
15
  Classifier: Programming Language :: Python :: Implementation :: CPython
46
- Requires-Python: >=3.8
16
+ Requires-Python: >=3.9
47
17
  Description-Content-Type: text/markdown
48
18
  License-File: LICENSE
49
19
  Dynamic: license-file
@@ -1,15 +1,15 @@
1
1
  [build-system]
2
- requires = ["setuptools>=61.0"]
2
+ requires = ["setuptools>=77.0"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "evdev"
7
- version = "1.9.2"
7
+ version = "1.9.3"
8
8
  description = "Bindings to the Linux input handling subsystem"
9
9
  keywords = ["evdev", "input", "uinput"]
10
10
  readme = "README.md"
11
- license = {file = "LICENSE"}
12
- requires-python = ">=3.8"
11
+ license = "BSD-3-Clause"
12
+ requires-python = ">=3.9"
13
13
  authors = [
14
14
  { name="Georgi Valkov", email="georgi.t.valkov@gmail.com" },
15
15
  ]
@@ -22,7 +22,6 @@ classifiers = [
22
22
  "Operating System :: POSIX :: Linux",
23
23
  "Intended Audience :: Developers",
24
24
  "Topic :: Software Development :: Libraries",
25
- "License :: OSI Approved :: BSD License",
26
25
  "Programming Language :: Python :: Implementation :: CPython",
27
26
  ]
28
27
 
@@ -36,7 +35,7 @@ line-length = 120
36
35
  ignore = ["E265", "E241", "F403", "F401", "E401", "E731"]
37
36
 
38
37
  [tool.bumpversion]
39
- current_version = "1.9.2"
38
+ current_version = "1.9.3"
40
39
  commit = true
41
40
  tag = true
42
41
  allow_dirty = true
@@ -63,12 +63,12 @@ device_read(PyObject *self, PyObject *args)
63
63
  return NULL;
64
64
  }
65
65
 
66
- PyObject* sec = PyLong_FromLong(event.input_event_sec);
67
- PyObject* usec = PyLong_FromLong(event.input_event_usec);
68
- PyObject* val = PyLong_FromLong(event.value);
69
- PyObject* type = PyLong_FromLong(event.type);
70
- PyObject* code = PyLong_FromLong(event.code);
71
- PyObject* py_input_event = PyTuple_Pack(5, sec, usec, type, code, val);
66
+ PyObject *py_input_event = PyTuple_New(5);
67
+ PyTuple_SET_ITEM(py_input_event, 0, PyLong_FromLong(event.input_event_sec));
68
+ PyTuple_SET_ITEM(py_input_event, 1, PyLong_FromLong(event.input_event_usec));
69
+ PyTuple_SET_ITEM(py_input_event, 2, PyLong_FromLong(event.type));
70
+ PyTuple_SET_ITEM(py_input_event, 3, PyLong_FromLong(event.code));
71
+ PyTuple_SET_ITEM(py_input_event, 4, PyLong_FromLong(event.value));
72
72
 
73
73
  return py_input_event;
74
74
  }
@@ -81,14 +81,6 @@ device_read_many(PyObject *self, PyObject *args)
81
81
  // get device file descriptor (O_RDONLY|O_NONBLOCK)
82
82
  int fd = (int)PyLong_AsLong(PyTuple_GET_ITEM(args, 0));
83
83
 
84
- PyObject* py_input_event = NULL;
85
- PyObject* events = NULL;
86
- PyObject* sec = NULL;
87
- PyObject* usec = NULL;
88
- PyObject* val = NULL;
89
- PyObject* type = NULL;
90
- PyObject* code = NULL;
91
-
92
84
  struct input_event event[64];
93
85
 
94
86
  size_t event_size = sizeof(struct input_event);
@@ -101,15 +93,15 @@ device_read_many(PyObject *self, PyObject *args)
101
93
 
102
94
  // Construct a tuple of event tuples. Each tuple is the arguments to InputEvent.
103
95
  size_t num_events = nread / event_size;
104
- events = PyTuple_New(num_events);
105
- for (size_t i = 0 ; i < num_events; i++) {
106
- sec = PyLong_FromLong(event[i].input_event_sec);
107
- usec = PyLong_FromLong(event[i].input_event_usec);
108
- val = PyLong_FromLong(event[i].value);
109
- type = PyLong_FromLong(event[i].type);
110
- code = PyLong_FromLong(event[i].code);
111
96
 
112
- py_input_event = PyTuple_Pack(5, sec, usec, type, code, val);
97
+ PyObject* events = PyTuple_New(num_events);
98
+ for (size_t i = 0 ; i < num_events; i++) {
99
+ PyObject *py_input_event = PyTuple_New(5);
100
+ PyTuple_SET_ITEM(py_input_event, 0, PyLong_FromLong(event[i].input_event_sec));
101
+ PyTuple_SET_ITEM(py_input_event, 1, PyLong_FromLong(event[i].input_event_usec));
102
+ PyTuple_SET_ITEM(py_input_event, 2, PyLong_FromLong(event[i].type));
103
+ PyTuple_SET_ITEM(py_input_event, 3, PyLong_FromLong(event[i].code));
104
+ PyTuple_SET_ITEM(py_input_event, 4, PyLong_FromLong(event[i].value));
113
105
  PyTuple_SET_ITEM(events, i, py_input_event);
114
106
  }
115
107
 
@@ -200,6 +192,11 @@ ioctl_capabilities(PyObject *self, PyObject *args)
200
192
  return capabilities;
201
193
 
202
194
  on_err:
195
+ Py_XDECREF(capabilities);
196
+ Py_XDECREF(eventcodes);
197
+ Py_XDECREF(capability);
198
+ Py_XDECREF(py_absinfo);
199
+ Py_XDECREF(absitem);
203
200
  PyErr_SetFromErrno(PyExc_OSError);
204
201
  return NULL;
205
202
  }
@@ -408,7 +405,9 @@ ioctl_EVIOCG_bits(PyObject *self, PyObject *args)
408
405
  PyObject* res = PyList_New(0);
409
406
  for (int i=0; i<=max; i++) {
410
407
  if (test_bit(bytes, i)) {
411
- PyList_Append(res, Py_BuildValue("i", i));
408
+ PyObject *val = PyLong_FromLong(i);
409
+ PyList_Append(res, val);
410
+ Py_DECREF(val);
412
411
  }
413
412
  }
414
413
 
@@ -523,7 +522,9 @@ ioctl_EVIOCGPROP(PyObject *self, PyObject *args)
523
522
  PyObject* res = PyList_New(0);
524
523
  for (int i=0; i<INPUT_PROP_MAX; i++) {
525
524
  if (test_bit(bytes, i)) {
526
- PyList_Append(res, Py_BuildValue("i", i));
525
+ PyObject *val = PyLong_FromLong(i);
526
+ PyList_Append(res, val);
527
+ Py_DECREF(val);
527
528
  }
528
529
  }
529
530
 
@@ -1,39 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: evdev
3
- Version: 1.9.2
3
+ Version: 1.9.3
4
4
  Summary: Bindings to the Linux input handling subsystem
5
5
  Author-email: Georgi Valkov <georgi.t.valkov@gmail.com>
6
6
  Maintainer-email: Tobi <proxima@sezanzeb.de>
7
- License: Copyright (c) 2012-2025 Georgi Valkov. All rights reserved.
8
-
9
- Redistribution and use in source and binary forms, with or without
10
- modification, are permitted provided that the following conditions are
11
- met:
12
-
13
- 1. Redistributions of source code must retain the above copyright
14
- notice, this list of conditions and the following disclaimer.
15
-
16
- 2. Redistributions in binary form must reproduce the above copyright
17
- notice, this list of conditions and the following disclaimer in
18
- the documentation and/or other materials provided with the
19
- distribution.
20
-
21
- 3. Neither the name of author nor the names of its contributors may
22
- be used to endorse or promote products derived from this software
23
- without specific prior written permission.
24
-
25
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
29
- COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
-
7
+ License-Expression: BSD-3-Clause
37
8
  Project-URL: Homepage, https://github.com/gvalkov/python-evdev
38
9
  Keywords: evdev,input,uinput
39
10
  Classifier: Development Status :: 5 - Production/Stable
@@ -41,9 +12,8 @@ Classifier: Programming Language :: Python :: 3
41
12
  Classifier: Operating System :: POSIX :: Linux
42
13
  Classifier: Intended Audience :: Developers
43
14
  Classifier: Topic :: Software Development :: Libraries
44
- Classifier: License :: OSI Approved :: BSD License
45
15
  Classifier: Programming Language :: Python :: Implementation :: CPython
46
- Requires-Python: >=3.8
16
+ Requires-Python: >=3.9
47
17
  Description-Content-Type: text/markdown
48
18
  License-File: LICENSE
49
19
  Dynamic: license-file
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes