public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-dbus-fast] f44: Fix compatibility with Python 3.15
@ 2026-11-09 21:22 Karolina Surma
0 siblings, 0 replies; only message in thread
From: Karolina Surma @ 2026-11-09 21:22 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-dbus-fast
Branch : f44
Commit : 7a2b3e5aa74f37b7946626972676eb378d46a29f
Author : Karolina Surma <ksurma@redhat.com>
Date : 2026-05-19T10:39:49+02:00
Stats : +32/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-dbus-fast/c/7a2b3e5aa74f37b7946626972676eb378d46a29f?branch=f44
Log:
Fix compatibility with Python 3.15
---
diff --git a/633.patch b/633.patch
new file mode 100644
index 0000000..f472964
--- /dev/null
+++ b/633.patch
@@ -0,0 +1,29 @@
+From 9330c6c96281f9f04d4bbd8a06d8734d9b097496 Mon Sep 17 00:00:00 2001
+From: Bluetooth Devices Bot <bluetooth@koston.org>
+Date: Thu, 14 May 2026 22:23:14 +0000
+Subject: [PATCH] fix: avoid segfault on Python 3.15 by using bytearray()
+ constructor
+
+Initializing the unmarshaller buffer via bytearray.__new__(bytearray)
+crashes the interpreter on Python 3.15 (python/cpython#139871).
+The constructor form has identical observable behavior and is safe
+across all supported Python versions.
+
+Closes #628
+---
+ src/dbus_fast/_private/unmarshaller.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/dbus_fast/_private/unmarshaller.py b/src/dbus_fast/_private/unmarshaller.py
+index 01d14f97..b2aff161 100644
+--- a/src/dbus_fast/_private/unmarshaller.py
++++ b/src/dbus_fast/_private/unmarshaller.py
+@@ -301,7 +301,7 @@ def __init__(
+ negotiate_unix_fd: bool = True,
+ ) -> None:
+ self._unix_fds: list[int] = []
+- self._buf: bytearray = bytearray.__new__(bytearray) # Actual buffer
++ self._buf: bytearray = bytearray() # Actual buffer
+ self._buf_ustr = self._buf # Used to avoid type checks
+ self._buf_len = 0
+ self._stream = stream
diff --git a/python-dbus-fast.spec b/python-dbus-fast.spec
index 4fe0925..e04f7b4 100644
--- a/python-dbus-fast.spec
+++ b/python-dbus-fast.spec
@@ -5,6 +5,8 @@ Summary: A faster version of dbus-next
License: MIT
URL: https://github.com/bluetooth-devices/dbus-fast
Source: %{URL}/archive/v%{version}/%{name}-%{version}.tar.gz
+# Fix compatibility with Python 3.15
+Patch: https://github.com/Bluetooth-Devices/dbus-fast/pull/633.patch
BuildRequires: python3-devel
BuildRequires: gcc
@@ -34,7 +36,7 @@ Summary: %{summary}
%prep
-%autosetup -n dbus-fast-%{version}
+%autosetup -n dbus-fast-%{version} -p1
# Relax poetry dependencies
sed -i 's/Cython>=3,<3.1.0/Cython>=3/' pyproject.toml
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-09 21:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09 21:22 [rpms/python-dbus-fast] f44: Fix compatibility with Python 3.15 Karolina Surma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox