* [libgpiod][PATCH v2 11/14] bindings: python: include Python.h before other headers
@ 2026-10-20 21:12 Vincent Fazio
2026-10-21 7:56 ` Bartosz Golaszewski
0 siblings, 1 reply; 9+ messages in thread
From: Vincent Fazio @ 2026-10-20 21:12 UTC (permalink / raw)
To: linux-gpio; +Cc: brgl, Vincent Fazio
Per the Python C API reference manual [0], Python.h should be included
before other headers since it specifies some pre-processor definitions
that may differ from system defaults.
This was noticed when testing on CPython 3.15 [1] which emitted warnings
due to redefinitions of _XOPEN_SOURCE and _POSIX_C_SOURCE during builds
of the Python bindings.
Note: despite the manual stating that `PY_SSIZE_T_CLEAN` should also be
defined, it is intentionally not included. The Python bindings do not
use the `#` format specifier when parsing any arguments so defining it
provides no value [2] and it is deprecated in future versions.
[0]: https://docs.python.org/3/c-api/intro.html#include-files
[1]: https://github.com/python/cpython/commit/927eb448aad6436d794ec9f55780013e25609600
[2]: https://docs.python.org/3/c-api/arg.html#strings-and-buffers
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
---
Changes in v2
- Added white space to separate the Python.h include from others
(Bartosz)
- Added a comment beside the include to provide rationale (vfazio)
- Expanded to include tests/system/ext.c for consistency (vfazio)
---
bindings/python/gpiod/ext/internal.h | 4 +++-
bindings/python/gpiod/ext/module.c | 4 +++-
bindings/python/tests/gpiosim/ext.c | 4 +++-
bindings/python/tests/system/ext.c | 2 ++
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/bindings/python/gpiod/ext/internal.h b/bindings/python/gpiod/ext/internal.h
index 2996884..2c7ecd2 100644
--- a/bindings/python/gpiod/ext/internal.h
+++ b/bindings/python/gpiod/ext/internal.h
@@ -4,9 +4,11 @@
#ifndef __LIBGPIOD_PYTHON_MODULE_H__
#define __LIBGPIOD_PYTHON_MODULE_H__
-#include <gpiod.h>
+/* Import Python.h before other headers per API documentation */
#include <Python.h>
+#include <gpiod.h>
+
PyObject *Py_gpiod_SetErrFromErrno(void);
unsigned int Py_gpiod_PyLongAsUnsignedInt(PyObject *pylong);
void Py_gpiod_dealloc(PyObject *self);
diff --git a/bindings/python/gpiod/ext/module.c b/bindings/python/gpiod/ext/module.c
index 21ea519..8a9a07f 100644
--- a/bindings/python/gpiod/ext/module.c
+++ b/bindings/python/gpiod/ext/module.c
@@ -1,9 +1,11 @@
// SPDX-License-Identifier: LGPL-2.1-or-later
// SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <brgl@bgdev.pl>
-#include <gpiod.h>
+/* Import Python.h before other headers per API documentation */
#include <Python.h>
+#include <gpiod.h>
+
struct module_const {
const char *name;
long val;
diff --git a/bindings/python/tests/gpiosim/ext.c b/bindings/python/tests/gpiosim/ext.c
index cc7bd37..1a6a238 100644
--- a/bindings/python/tests/gpiosim/ext.c
+++ b/bindings/python/tests/gpiosim/ext.c
@@ -1,9 +1,11 @@
// SPDX-License-Identifier: LGPL-2.1-or-later
// SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <brgl@bgdev.pl>
-#include <gpiosim.h>
+/* Import Python.h before other headers per API documentation */
#include <Python.h>
+#include <gpiosim.h>
+
struct module_const {
const char *name;
long val;
diff --git a/bindings/python/tests/system/ext.c b/bindings/python/tests/system/ext.c
index 8b307f6..88d594d 100644
--- a/bindings/python/tests/system/ext.c
+++ b/bindings/python/tests/system/ext.c
@@ -2,7 +2,9 @@
// SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <brgl@bgdev.pl>
// SPDX-FileCopyrightText: 2024 Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+/* Import Python.h before other headers per API documentation */
#include <Python.h>
+
#include <linux/version.h>
#include <sys/prctl.h>
#include <sys/utsname.h>
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [libgpiod][PATCH v2 11/14] bindings: python: include Python.h before other headers
2026-10-20 21:12 [libgpiod][PATCH v2 11/14] bindings: python: include Python.h before other headers Vincent Fazio
@ 2026-10-21 7:56 ` Bartosz Golaszewski
0 siblings, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2026-10-21 7:56 UTC (permalink / raw)
To: Vincent Fazio; +Cc: brgl, linux-gpio
On Tue, 20 Oct 2026 23:12:37 +0200, Vincent Fazio <vfazio@gmail.com> said:
> Per the Python C API reference manual [0], Python.h should be included
> before other headers since it specifies some pre-processor definitions
> that may differ from system defaults.
>
> This was noticed when testing on CPython 3.15 [1] which emitted warnings
> due to redefinitions of _XOPEN_SOURCE and _POSIX_C_SOURCE during builds
> of the Python bindings.
>
> Note: despite the manual stating that `PY_SSIZE_T_CLEAN` should also be
> defined, it is intentionally not included. The Python bindings do not
> use the `#` format specifier when parsing any arguments so defining it
> provides no value [2] and it is deprecated in future versions.
>
> [0]: https://docs.python.org/3/c-api/intro.html#include-files
> [1]: https://github.com/python/cpython/commit/927eb448aad6436d794ec9f55780013e25609600
> [2]: https://docs.python.org/3/c-api/arg.html#strings-and-buffers
>
> Signed-off-by: Vincent Fazio <vfazio@gmail.com>
> ---
> Changes in v2
> - Added white space to separate the Python.h include from others
> (Bartosz)
> - Added a comment beside the include to provide rationale (vfazio)
> - Expanded to include tests/system/ext.c for consistency (vfazio)
> ---
> bindings/python/gpiod/ext/internal.h | 4 +++-
> bindings/python/gpiod/ext/module.c | 4 +++-
> bindings/python/tests/gpiosim/ext.c | 4 +++-
> bindings/python/tests/system/ext.c | 2 ++
> 4 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/bindings/python/gpiod/ext/internal.h b/bindings/python/gpiod/ext/internal.h
> index 2996884..2c7ecd2 100644
> --- a/bindings/python/gpiod/ext/internal.h
> +++ b/bindings/python/gpiod/ext/internal.h
> @@ -4,9 +4,11 @@
> #ifndef __LIBGPIOD_PYTHON_MODULE_H__
> #define __LIBGPIOD_PYTHON_MODULE_H__
>
> -#include <gpiod.h>
> +/* Import Python.h before other headers per API documentation */
> #include <Python.h>
>
No need for this comment, I think the break alone tells the story.
Bart
^ permalink raw reply [flat|nested] 9+ messages in thread
* [libgpiod][PATCH v2 09/14] bindings: python: chip: use literals for dict/list and declare types
@ 2026-10-24 20:00 Vincent Fazio
2026-10-24 20:00 ` [libgpiod][PATCH v2 10/14] bindings: python: bump ruff linter dependency Vincent Fazio
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Vincent Fazio @ 2026-10-24 20:00 UTC (permalink / raw)
To: linux-gpio; +Cc: brgl, Vincent Fazio
Per linter recommendation [0], use the literal form of the dict and list
constructors. The long form is not common in typical Python code so it
stays as readable for someone familiar with the short form syntax and it
has a very negligible performance benefit.
While making this change, specify type annotations for the collections
to reflect their contents so type checkers do not try to determine their
contents implicitly based on assignments.
[0]: https://docs.astral.sh/ruff/rules/unnecessary-collection-call/
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
---
Changes in v2:
- Reword commit message to provide better rationale (Bartosz)
---
bindings/python/gpiod/chip.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/bindings/python/gpiod/chip.py b/bindings/python/gpiod/chip.py
index 8712b2b..94c432a 100644
--- a/bindings/python/gpiod/chip.py
+++ b/bindings/python/gpiod/chip.py
@@ -275,13 +275,13 @@ class Chip:
for line, value in output_values.items()
}
- name_map = dict()
- requested_lines = list()
- global_output_values = list()
- seen_offsets = set()
+ name_map: dict[str, int] = {}
+ requested_lines: list[int | str] = []
+ global_output_values: list[Value] = []
+ seen_offsets: set[int] = set()
for line, settings in config_iter(config):
- offsets = list()
+ offsets: list[int] = []
offset = self.line_offset_from_id(line)
# don't allow offset repetitions or offset-name conflicts.
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [libgpiod][PATCH v2 10/14] bindings: python: bump ruff linter dependency
2026-10-24 20:00 [libgpiod][PATCH v2 09/14] bindings: python: chip: use literals for dict/list and declare types Vincent Fazio
@ 2026-10-24 20:00 ` Vincent Fazio
2026-10-24 20:00 ` [libgpiod][PATCH v2 11/14] bindings: python: include Python.h before other headers Vincent Fazio
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Vincent Fazio @ 2026-10-24 20:00 UTC (permalink / raw)
To: linux-gpio; +Cc: brgl, Vincent Fazio
Bump ruff to the recently released 0.17. Most of the important changes
are from 0.16, but there were no incompatibilities found during testing.
Of note is the expansion of the default ruleset [0] which is now
leveraged over the previously selected rules and simplifies the tool
configuration section significantly.
Two things are explicitly disabled as part of this migration:
* Formating of Python blocks in markdown files is disabled [1]
* The typing-extensions flag is set to false since the bindings do not
depend on this package [2] so appropriate lint rules get disabled
As part of this change:
* Unused error suppression flags were removed from
examples/toggle_multiple_line_values.py
* tests/tests_line_requests.py was reformatted to bring it in line
with the rest of the bindings
* The `readlines` call in setup.py has FURB129 [3] suppressed since it
only affects builds (edge case) on 3.10 (now EOL). When the minimal
version is bumped to 3.11, the entire block will go away.
[0]: https://astral.sh/blog/ruff-v0.16.0#better-default-rule-set
[1]: https://docs.astral.sh/ruff/formatter/#markdown-code-formatting
[2]: https://docs.astral.sh/ruff/settings/#lint_typing-extensions
[3]: https://docs.astral.sh/ruff/rules/readlines-in-for/#readlines-in-for-furb129
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
---
.../examples/toggle_multiple_line_values.py | 4 ++--
bindings/python/pyproject.toml | 17 ++++++-----------
bindings/python/setup.py | 2 +-
bindings/python/tests/tests_line_request.py | 3 ++-
4 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/bindings/python/examples/toggle_multiple_line_values.py b/bindings/python/examples/toggle_multiple_line_values.py
index 8c973f8..e5fbcd9 100755
--- a/bindings/python/examples/toggle_multiple_line_values.py
+++ b/bindings/python/examples/toggle_multiple_line_values.py
@@ -29,9 +29,9 @@ def toggle_multiple_line_values(
)
while True:
- print(" ".join(f"{l}={value_str[v]}" for (l, v) in line_values.items())) # noqa: E741
+ print(" ".join(f"{l}={value_str[v]}" for (l, v) in line_values.items()))
time.sleep(1)
- for l, v in line_values.items(): # noqa: E741
+ for l, v in line_values.items():
line_values[l] = toggle_value(v)
request.set_values(line_values)
diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml
index 3337306..7d1c777 100644
--- a/bindings/python/pyproject.toml
+++ b/bindings/python/pyproject.toml
@@ -36,7 +36,7 @@ Issues = "https://github.com/brgl/libgpiod/issues/"
Changelog = "https://github.com/brgl/libgpiod/blob/master/bindings/python/CHANGELOG.md"
[dependency-groups]
-lint = ["mypy>=1.18.1", "ruff~=0.15.0", "types-setuptools", "packaging"]
+lint = ["mypy>=1.18.1", "ruff~=0.17.0", "types-setuptools", "packaging"]
[tool.setuptools]
platforms = ["linux"]
@@ -56,19 +56,14 @@ files = [
".",
]
+[tool.ruff]
+extend-exclude = ["*.md"]
+
[tool.ruff.lint]
-select = ["B", "E", "F", "I", "TC", "UP"]
-ignore=[
- # Ignore chained exception warnings for now: https://docs.astral.sh/ruff/rules/raise-without-from-inside-except/
- "B904",
- # Never enforce line length violations. Let the formatter handle it: https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
- "E501",
-]
+typing-extensions = false
[tool.ruff.lint.per-file-ignores]
-"gpiod/__init__.py" = ["F403", "F405"] # ignore warnings about star imports
-"tests/__main__.py" = ["F403"]
-"tests/**.py" = ["F841"] # ignore warnings about unused variables
+"tests/**.py" = ["F841", "SIM117"] # ignore warnings about unused variables and chaining context managers
[tool.cibuildwheel]
build = "cp*"
diff --git a/bindings/python/setup.py b/bindings/python/setup.py
index 4297615..af922c8 100644
--- a/bindings/python/setup.py
+++ b/bindings/python/setup.py
@@ -167,7 +167,7 @@ def fetch_tarball(func: Callable[[T], None]) -> Callable[[T], None]:
project = cast("dict[str,str]", tomllib.load(f).get("project"))
license_file = project.get("license")
else: # tomllib isn't standard, fall back to parsing by line
- for line in f.readlines():
+ for line in f.readlines(): # noqa: FURB129
_line = line.decode()
if _line.startswith("license = "):
license_file = _line.split("=")[1].strip(' \r\n"')
diff --git a/bindings/python/tests/tests_line_request.py b/bindings/python/tests/tests_line_request.py
index bc85eba..8e74490 100644
--- a/bindings/python/tests/tests_line_request.py
+++ b/bindings/python/tests/tests_line_request.py
@@ -692,7 +692,8 @@ class UsingMoreLinesThanRequestedNotAllowed(TestCase):
def test_line_set_more_values_than_requested_lines(self) -> None:
with gpiod.request_lines(
- self.sim.dev_path, config={0: gpiod.LineSettings(direction=Direction.OUTPUT)}
+ self.sim.dev_path,
+ config={0: gpiod.LineSettings(direction=Direction.OUTPUT)},
) as req:
with self.assertRaises(ValueError):
req.set_values({i: Value.ACTIVE for i in range(64)})
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [libgpiod][PATCH v2 11/14] bindings: python: include Python.h before other headers
2026-10-24 20:00 [libgpiod][PATCH v2 09/14] bindings: python: chip: use literals for dict/list and declare types Vincent Fazio
2026-10-24 20:00 ` [libgpiod][PATCH v2 10/14] bindings: python: bump ruff linter dependency Vincent Fazio
@ 2026-10-24 20:00 ` Vincent Fazio
2026-10-24 20:00 ` [libgpiod][PATCH v2 12/14] bindings: python: advertise Python 3.15 support Vincent Fazio
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Vincent Fazio @ 2026-10-24 20:00 UTC (permalink / raw)
To: linux-gpio; +Cc: brgl, Vincent Fazio
Per the Python C API reference manual [0], Python.h should be included
before other headers since it specifies some pre-processor definitions
that may differ from system defaults.
This was noticed when testing on CPython 3.15 [1] which emitted warnings
due to redefinitions of _XOPEN_SOURCE and _POSIX_C_SOURCE during builds
of the Python bindings.
Note: despite the manual stating that `PY_SSIZE_T_CLEAN` should also be
defined, it is intentionally not included. The Python bindings do not
use the `#` format specifier when parsing any arguments so defining it
provides no value [2] and it is deprecated in future versions.
[0]: https://docs.python.org/3/c-api/intro.html#include-files
[1]: https://github.com/python/cpython/commit/927eb448aad6436d794ec9f55780013e25609600
[2]: https://docs.python.org/3/c-api/arg.html#strings-and-buffers
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
---
Changes in v2:
- Add an blank line between Python.h and other includes (Bartosz)
---
bindings/python/gpiod/ext/internal.h | 3 ++-
bindings/python/gpiod/ext/module.c | 3 ++-
bindings/python/tests/gpiosim/ext.c | 3 ++-
bindings/python/tests/system/ext.c | 1 +
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/bindings/python/gpiod/ext/internal.h b/bindings/python/gpiod/ext/internal.h
index 2996884..b600071 100644
--- a/bindings/python/gpiod/ext/internal.h
+++ b/bindings/python/gpiod/ext/internal.h
@@ -4,9 +4,10 @@
#ifndef __LIBGPIOD_PYTHON_MODULE_H__
#define __LIBGPIOD_PYTHON_MODULE_H__
-#include <gpiod.h>
#include <Python.h>
+#include <gpiod.h>
+
PyObject *Py_gpiod_SetErrFromErrno(void);
unsigned int Py_gpiod_PyLongAsUnsignedInt(PyObject *pylong);
void Py_gpiod_dealloc(PyObject *self);
diff --git a/bindings/python/gpiod/ext/module.c b/bindings/python/gpiod/ext/module.c
index 21ea519..f13b86e 100644
--- a/bindings/python/gpiod/ext/module.c
+++ b/bindings/python/gpiod/ext/module.c
@@ -1,9 +1,10 @@
// SPDX-License-Identifier: LGPL-2.1-or-later
// SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <brgl@bgdev.pl>
-#include <gpiod.h>
#include <Python.h>
+#include <gpiod.h>
+
struct module_const {
const char *name;
long val;
diff --git a/bindings/python/tests/gpiosim/ext.c b/bindings/python/tests/gpiosim/ext.c
index cc7bd37..e3cb2ef 100644
--- a/bindings/python/tests/gpiosim/ext.c
+++ b/bindings/python/tests/gpiosim/ext.c
@@ -1,9 +1,10 @@
// SPDX-License-Identifier: LGPL-2.1-or-later
// SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <brgl@bgdev.pl>
-#include <gpiosim.h>
#include <Python.h>
+#include <gpiosim.h>
+
struct module_const {
const char *name;
long val;
diff --git a/bindings/python/tests/system/ext.c b/bindings/python/tests/system/ext.c
index 8b307f6..7d8304d 100644
--- a/bindings/python/tests/system/ext.c
+++ b/bindings/python/tests/system/ext.c
@@ -3,6 +3,7 @@
// SPDX-FileCopyrightText: 2024 Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
#include <Python.h>
+
#include <linux/version.h>
#include <sys/prctl.h>
#include <sys/utsname.h>
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [libgpiod][PATCH v2 12/14] bindings: python: advertise Python 3.15 support
2026-10-24 20:00 [libgpiod][PATCH v2 09/14] bindings: python: chip: use literals for dict/list and declare types Vincent Fazio
2026-10-24 20:00 ` [libgpiod][PATCH v2 10/14] bindings: python: bump ruff linter dependency Vincent Fazio
2026-10-24 20:00 ` [libgpiod][PATCH v2 11/14] bindings: python: include Python.h before other headers Vincent Fazio
@ 2026-10-24 20:00 ` Vincent Fazio
2026-10-24 20:00 ` [libgpiod][PATCH v2 13/14] bindings: python: fix directory validation in artifact script Vincent Fazio
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Vincent Fazio @ 2026-10-24 20:00 UTC (permalink / raw)
To: linux-gpio; +Cc: brgl, Vincent Fazio
Add a trove classifier to advertise that the bindings have support for
Python 3.15.
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
---
bindings/python/pyproject.toml | 1 +
1 file changed, 1 insertion(+)
diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml
index 7d1c777..32a4fe3 100644
--- a/bindings/python/pyproject.toml
+++ b/bindings/python/pyproject.toml
@@ -27,6 +27,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
+ "Programming Language :: Python :: 3.15",
"Programming Language :: Python :: Free Threading :: 3 - Stable",
]
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [libgpiod][PATCH v2 13/14] bindings: python: fix directory validation in artifact script
2026-10-24 20:00 [libgpiod][PATCH v2 09/14] bindings: python: chip: use literals for dict/list and declare types Vincent Fazio
` (2 preceding siblings ...)
2026-10-24 20:00 ` [libgpiod][PATCH v2 12/14] bindings: python: advertise Python 3.15 support Vincent Fazio
@ 2026-10-24 20:00 ` Vincent Fazio
2026-10-24 20:00 ` [libgpiod][PATCH v2 14/14] bindings: python: bump dependencies " Vincent Fazio
2026-10-28 9:19 ` [libgpiod][PATCH v2 09/14] bindings: python: chip: use literals for dict/list and declare types Bartosz Golaszewski
5 siblings, 0 replies; 9+ messages in thread
From: Vincent Fazio @ 2026-10-24 20:00 UTC (permalink / raw)
To: linux-gpio; +Cc: brgl, Vincent Fazio
The PyPI artifact generation script had two issues with its directory
validation:
* When validating the source directory, it erroneously tested whether
output_dir was a directory instead of source_dir.
* When validating the output directory, it only tested for writability
(-w), which would allow an existing writable regular file to pass
validation and only fail later when copying build artifacts.
Fix the source_dir check to inspect source_dir, and ensure output_dir
is verified to be a directory in addition to being writable.
Fixes: 72d2fa01 ("bindings: python: add script to generate sdist and wheels")
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
---
bindings/python/generate_pypi_artifacts.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/bindings/python/generate_pypi_artifacts.sh b/bindings/python/generate_pypi_artifacts.sh
index 22dad9f..bc8aa05 100755
--- a/bindings/python/generate_pypi_artifacts.sh
+++ b/bindings/python/generate_pypi_artifacts.sh
@@ -58,13 +58,13 @@ while getopts :hv:o:s:cf value; do
esac
done
-if [ -z "${source_dir}" ] || [ ! -d "${output_dir}" ]; then
+if [ -z "${source_dir}" ] || [ ! -d "${source_dir}" ]; then
printf "Invalid source directory %s.\n" "${source_dir}"
exit 1
fi
-if [ -z "${output_dir}" ] || [ ! -w "${output_dir}" ]; then
- printf "Output directory %s is not writable.\n" "${output_dir}"
+if [ -z "${output_dir}" ] || [ ! -d "${output_dir}" ] || [ ! -w "${output_dir}" ]; then
+ printf "Output directory %s is not writable directory.\n" "${output_dir}"
exit 1
fi
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [libgpiod][PATCH v2 14/14] bindings: python: bump dependencies in artifact script
2026-10-24 20:00 [libgpiod][PATCH v2 09/14] bindings: python: chip: use literals for dict/list and declare types Vincent Fazio
` (3 preceding siblings ...)
2026-10-24 20:00 ` [libgpiod][PATCH v2 13/14] bindings: python: fix directory validation in artifact script Vincent Fazio
@ 2026-10-24 20:00 ` Vincent Fazio
2026-10-28 9:19 ` [libgpiod][PATCH v2 09/14] bindings: python: chip: use literals for dict/list and declare types Bartosz Golaszewski
5 siblings, 0 replies; 9+ messages in thread
From: Vincent Fazio @ 2026-10-24 20:00 UTC (permalink / raw)
To: linux-gpio; +Cc: brgl, Vincent Fazio
Bump the build and cibuildwheel dependencies to take recent fixes.
The new version of cibuildwheel enables building wheels for the recently
release Python 3.15. It also contains fixes that address recent eMudhra
CA concerns [0].
[0]: https://cibuildwheel.pypa.io/en/stable/changelog/#v434
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
---
Changes in v2:
- Bump cibuildwheel to 4.3.4 to include eMudhra fixes
---
bindings/python/generate_pypi_artifacts.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bindings/python/generate_pypi_artifacts.sh b/bindings/python/generate_pypi_artifacts.sh
index bc8aa05..c2febe6 100755
--- a/bindings/python/generate_pypi_artifacts.sh
+++ b/bindings/python/generate_pypi_artifacts.sh
@@ -108,7 +108,7 @@ python3 -m "${venv_module}" .venv
venv_python="${temp_dir}/.venv/bin/python"
# Install build dependencies
-${venv_python} -m pip install build==1.3.0 cibuildwheel==3.2.1
+${venv_python} -m pip install build==1.6.1 cibuildwheel==4.3.4
LIBGPIOD_VERSION=${src_version} ${venv_python} -m build --sdist --outdir ./dist "${source_dir}"
sdist=$(find ./dist -name '*.tar.gz')
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [libgpiod][PATCH v2 09/14] bindings: python: chip: use literals for dict/list and declare types
2026-10-24 20:00 [libgpiod][PATCH v2 09/14] bindings: python: chip: use literals for dict/list and declare types Vincent Fazio
` (4 preceding siblings ...)
2026-10-24 20:00 ` [libgpiod][PATCH v2 14/14] bindings: python: bump dependencies " Vincent Fazio
@ 2026-10-28 9:19 ` Bartosz Golaszewski
5 siblings, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2026-10-28 9:19 UTC (permalink / raw)
To: linux-gpio, Vincent Fazio; +Cc: Bartosz Golaszewski, brgl
On Sat, 24 Oct 2026 15:00:43 -0500, Vincent Fazio wrote:
> Per linter recommendation [0], use the literal form of the dict and list
> constructors. The long form is not common in typical Python code so it
> stays as readable for someone familiar with the short form syntax and it
> has a very negligible performance benefit.
>
> While making this change, specify type annotations for the collections
> to reflect their contents so type checkers do not try to determine their
> contents implicitly based on assignments.
>
> [...]
Applied, thanks!
[09/14] bindings: python: chip: use literals for dict/list and declare types
https://git.kernel.org/brgl/c/bc08d15e3070c6c18617019f324e30b76a142e0e
[10/14] bindings: python: bump ruff linter dependency
https://git.kernel.org/brgl/c/984547d54d4c4f7270bfd83dbfb6d46412bc362f
[11/14] bindings: python: include Python.h before other headers
https://git.kernel.org/brgl/c/ebd9313686c221cf87c8b1b420135200670cf1ca
[12/14] bindings: python: advertise Python 3.15 support
https://git.kernel.org/brgl/c/b82f782b6d1d30e43dae71073703f1a5769e2f24
[13/14] bindings: python: fix directory validation in artifact script
https://git.kernel.org/brgl/c/c8fc2496ead59f4a5b3c9d1d4892c370447f8342
[14/14] bindings: python: bump dependencies in artifact script
https://git.kernel.org/brgl/c/0d95a5ffcfe3f813984d3dec46bc714b328d95d7
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-10-28 9:19 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-24 20:00 [libgpiod][PATCH v2 09/14] bindings: python: chip: use literals for dict/list and declare types Vincent Fazio
2026-10-24 20:00 ` [libgpiod][PATCH v2 10/14] bindings: python: bump ruff linter dependency Vincent Fazio
2026-10-24 20:00 ` [libgpiod][PATCH v2 11/14] bindings: python: include Python.h before other headers Vincent Fazio
2026-10-24 20:00 ` [libgpiod][PATCH v2 12/14] bindings: python: advertise Python 3.15 support Vincent Fazio
2026-10-24 20:00 ` [libgpiod][PATCH v2 13/14] bindings: python: fix directory validation in artifact script Vincent Fazio
2026-10-24 20:00 ` [libgpiod][PATCH v2 14/14] bindings: python: bump dependencies " Vincent Fazio
2026-10-28 9:19 ` [libgpiod][PATCH v2 09/14] bindings: python: chip: use literals for dict/list and declare types Bartosz Golaszewski
-- strict thread matches above, loose matches on Subject: below --
2026-10-20 21:12 [libgpiod][PATCH v2 11/14] bindings: python: include Python.h before other headers Vincent Fazio
2026-10-21 7:56 ` Bartosz Golaszewski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.