gpiod 2.2.2__tar.gz → 2.2.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 (62) hide show
  1. {gpiod-2.2.2/gpiod.egg-info → gpiod-2.2.3}/PKG-INFO +1 -1
  2. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/chip.py +0 -1
  3. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/ext/request.c +7 -4
  4. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/version.py +1 -1
  5. {gpiod-2.2.2 → gpiod-2.2.3/gpiod.egg-info}/PKG-INFO +1 -1
  6. {gpiod-2.2.2 → gpiod-2.2.3}/MANIFEST.in +0 -0
  7. {gpiod-2.2.2 → gpiod-2.2.3}/README.md +0 -0
  8. {gpiod-2.2.2 → gpiod-2.2.3}/build_tests.py +0 -0
  9. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/__init__.py +0 -0
  10. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/chip_info.py +0 -0
  11. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/edge_event.py +0 -0
  12. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/exception.py +0 -0
  13. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/ext/chip.c +0 -0
  14. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/ext/common.c +0 -0
  15. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/ext/internal.h +0 -0
  16. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/ext/line-config.c +0 -0
  17. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/ext/line-settings.c +0 -0
  18. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/ext/module.c +0 -0
  19. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/info_event.py +0 -0
  20. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/internal.py +0 -0
  21. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/line.py +0 -0
  22. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/line_info.py +0 -0
  23. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/line_request.py +0 -0
  24. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod/line_settings.py +0 -0
  25. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod.egg-info/SOURCES.txt +0 -0
  26. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod.egg-info/dependency_links.txt +0 -0
  27. {gpiod-2.2.2 → gpiod-2.2.3}/gpiod.egg-info/top_level.txt +0 -0
  28. {gpiod-2.2.2 → gpiod-2.2.3}/include/gpiod.h +0 -0
  29. {gpiod-2.2.2 → gpiod-2.2.3}/lib/chip-info.c +0 -0
  30. {gpiod-2.2.2 → gpiod-2.2.3}/lib/chip.c +0 -0
  31. {gpiod-2.2.2 → gpiod-2.2.3}/lib/edge-event.c +0 -0
  32. {gpiod-2.2.2 → gpiod-2.2.3}/lib/info-event.c +0 -0
  33. {gpiod-2.2.2 → gpiod-2.2.3}/lib/internal.c +0 -0
  34. {gpiod-2.2.2 → gpiod-2.2.3}/lib/internal.h +0 -0
  35. {gpiod-2.2.2 → gpiod-2.2.3}/lib/line-config.c +0 -0
  36. {gpiod-2.2.2 → gpiod-2.2.3}/lib/line-info.c +0 -0
  37. {gpiod-2.2.2 → gpiod-2.2.3}/lib/line-request.c +0 -0
  38. {gpiod-2.2.2 → gpiod-2.2.3}/lib/line-settings.c +0 -0
  39. {gpiod-2.2.2 → gpiod-2.2.3}/lib/misc.c +0 -0
  40. {gpiod-2.2.2 → gpiod-2.2.3}/lib/request-config.c +0 -0
  41. {gpiod-2.2.2 → gpiod-2.2.3}/lib/uapi/gpio.h +0 -0
  42. {gpiod-2.2.2 → gpiod-2.2.3}/libgpiod-version.txt +0 -0
  43. {gpiod-2.2.2 → gpiod-2.2.3}/pyproject.toml +0 -0
  44. {gpiod-2.2.2 → gpiod-2.2.3}/setup.cfg +0 -0
  45. {gpiod-2.2.2 → gpiod-2.2.3}/setup.py +0 -0
  46. {gpiod-2.2.2 → gpiod-2.2.3}/tests/__init__.py +0 -0
  47. {gpiod-2.2.2 → gpiod-2.2.3}/tests/__main__.py +0 -0
  48. {gpiod-2.2.2 → gpiod-2.2.3}/tests/gpiosim/__init__.py +0 -0
  49. {gpiod-2.2.2 → gpiod-2.2.3}/tests/gpiosim/chip.py +0 -0
  50. {gpiod-2.2.2 → gpiod-2.2.3}/tests/gpiosim/ext.c +0 -0
  51. {gpiod-2.2.2 → gpiod-2.2.3}/tests/helpers.py +0 -0
  52. {gpiod-2.2.2 → gpiod-2.2.3}/tests/procname/__init__.py +0 -0
  53. {gpiod-2.2.2 → gpiod-2.2.3}/tests/procname/ext.c +0 -0
  54. {gpiod-2.2.2 → gpiod-2.2.3}/tests/tests_chip.py +0 -0
  55. {gpiod-2.2.2 → gpiod-2.2.3}/tests/tests_chip_info.py +0 -0
  56. {gpiod-2.2.2 → gpiod-2.2.3}/tests/tests_edge_event.py +0 -0
  57. {gpiod-2.2.2 → gpiod-2.2.3}/tests/tests_info_event.py +0 -0
  58. {gpiod-2.2.2 → gpiod-2.2.3}/tests/tests_line.py +0 -0
  59. {gpiod-2.2.2 → gpiod-2.2.3}/tests/tests_line_info.py +0 -0
  60. {gpiod-2.2.2 → gpiod-2.2.3}/tests/tests_line_request.py +0 -0
  61. {gpiod-2.2.2 → gpiod-2.2.3}/tests/tests_line_settings.py +0 -0
  62. {gpiod-2.2.2 → gpiod-2.2.3}/tests/tests_module.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gpiod
3
- Version: 2.2.2
3
+ Version: 2.2.3
4
4
  Summary: Python bindings for libgpiod
5
5
  Home-page: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
6
6
  Author: Bartosz Golaszewski
@@ -14,7 +14,6 @@ from collections import Counter
14
14
  from collections.abc import Iterable
15
15
  from datetime import timedelta
16
16
  from errno import ENOENT
17
- from select import select
18
17
  from typing import Union, Optional
19
18
 
20
19
  __all__ = "Chip"
@@ -205,7 +205,7 @@ static PyObject *request_get_values(request_object *self, PyObject *args)
205
205
  static PyObject *request_set_values(request_object *self, PyObject *args)
206
206
  {
207
207
  PyObject *values, *key, *val, *val_stripped;
208
- Py_ssize_t pos = 0;
208
+ Py_ssize_t pos = 0, index = 0;
209
209
  int ret;
210
210
 
211
211
  ret = PyArg_ParseTuple(args, "O", &values);
@@ -214,8 +214,9 @@ static PyObject *request_set_values(request_object *self, PyObject *args)
214
214
 
215
215
  clear_buffers(self);
216
216
 
217
+ /* Note: pos may not be contiguous. */
217
218
  while (PyDict_Next(values, &pos, &key, &val)) {
218
- self->offsets[pos - 1] = Py_gpiod_PyLongAsUnsignedInt(key);
219
+ self->offsets[index] = Py_gpiod_PyLongAsUnsignedInt(key);
219
220
  if (PyErr_Occurred())
220
221
  return NULL;
221
222
 
@@ -223,15 +224,17 @@ static PyObject *request_set_values(request_object *self, PyObject *args)
223
224
  if (!val_stripped)
224
225
  return NULL;
225
226
 
226
- self->values[pos - 1] = PyLong_AsLong(val_stripped);
227
+ self->values[index] = PyLong_AsLong(val_stripped);
227
228
  Py_DECREF(val_stripped);
228
229
  if (PyErr_Occurred())
229
230
  return NULL;
231
+
232
+ index++;
230
233
  }
231
234
 
232
235
  Py_BEGIN_ALLOW_THREADS;
233
236
  ret = gpiod_line_request_set_values_subset(self->request,
234
- pos,
237
+ index,
235
238
  self->offsets,
236
239
  self->values);
237
240
  Py_END_ALLOW_THREADS;
@@ -2,4 +2,4 @@
2
2
  # SPDX-FileCopyrightText: 2022 Linaro Ltd.
3
3
  # SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
4
4
 
5
- __version__ = "2.2.2"
5
+ __version__ = "2.2.3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gpiod
3
- Version: 2.2.2
3
+ Version: 2.2.3
4
4
  Summary: Python bindings for libgpiod
5
5
  Home-page: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
6
6
  Author: Bartosz Golaszewski
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
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes