Your message dated Wed, 16 Sep 2026 10:49:02 +0000
with message-id <[email protected]>
and subject line Bug#1144997: fixed in python-websockets 17.1-1
has caused the Debian Bug report #1144997,
regarding python-websockets: FTBFS building against python 3.15
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1144997: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1144997
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: src:python-websockets
Version: 16.0-1
User: [email protected]
Usertags: python3.15
Tags: patch

Hi!

While rebuilding the python related packages against the python version
3.15rc1 we found that python-websocket fails to build from source [1].

This is due to a change in 3.15 in the requirements on how the buffers need to
be present in memory. Upstream already applied a fix for this included
in the release 16.1.

I'm attaching the upstream patch that I'm using the sandbox, please
consider either adding this patch or updating the version.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/work-request/999586/
--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
commit f3bf8033276aa4fc272940e650c319c517bb3479
Author: Lumir Balhar <[email protected]>
Date:   Tue Apr 7 09:16:08 2026 +0200

    Python 3.15+ requires C-contiguous buffers for int.from_bytes()

diff --git a/src/websockets/utils.py b/src/websockets/utils.py
index b2a90e52..84904ea0 100644
--- a/src/websockets/utils.py
+++ b/src/websockets/utils.py
@@ -47,6 +47,14 @@ def apply_mask(data: BytesLike, mask: bytes | bytearray) -> bytes:
     if len(mask) != 4:
         raise ValueError("mask must contain 4 bytes")
 
+    # Python 3.15+ requires C-contiguous buffers for int.from_bytes()
+    # CPython (https://github.com/python/cpython/pull/132109) optimized
+    # int.from_bytes() to use the buffer protocol with PyBUF_SIMPLE, which requires
+    # C-contiguous buffers. Non-contiguous memoryviews (e.g., created by [::-1])
+    # now raise BufferError. Convert to bytes to create a contiguous copy.
+    if isinstance(data, memoryview) and not data.c_contiguous:
+        data = bytes(data)
+
     data_int = int.from_bytes(data, sys.byteorder)
     mask_repeated = mask * (len(data) // 4) + mask[: len(data) % 4]
     mask_int = int.from_bytes(mask_repeated, sys.byteorder)

--- End Message ---
--- Begin Message ---
Source: python-websockets
Source-Version: 17.1-1
Done: Dale Richards <[email protected]>

We believe that the bug you reported is fixed in the latest version of
python-websockets, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dale Richards <[email protected]> (supplier of updated python-websockets 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 16 Sep 2026 10:32:32 +0000
Source: python-websockets
Built-For-Profiles: noudeb
Architecture: source
Version: 17.1-1
Distribution: unstable
Urgency: medium
Maintainer: Piotr Ożarowski <[email protected]>
Changed-By: Dale Richards <[email protected]>
Closes: 1144997
Changes:
 python-websockets (17.1-1) unstable; urgency=medium
 .
   * Team upload.
   * New upstream release.
     - Fixes the FTBFS against Python 3.15 (Closes: #1144997)
   * d/watch: convert to version 5 and follow the upstream repository
     move to github.com/python-websockets.
   * d/gbp.conf: add, recording the branch layout and pristine-tar use.
   * d/source/options: drop; --git-ignore-new is a git-buildpackage
     option, not a dpkg-source one, and dpkg-source warned about it on
     every build.
   * d/control: bump Standards-Version to 4.7.4, no changes needed.
   * d/control: bump debhelper compat level to 14 and drop
     ${misc:Depends}, which dh_gencontrol now adds by itself.
   * d/control: build-depend on dh-sequence-python3 rather than dh-
     python, and drop the now redundant --with python3 from d/rules.
   * d/control: build-depend on dh-sequence-single-binary; debhelper warns that
     it will stop activating the addon implicitly in compat 15.
   * d/control: build-depend on pybuild-plugin-pyproject so the package
     is built through its declared PEP 517 backend and ships .dist-info
     instead of a legacy .egg-info.
   * d/control: build-depend on python3-trio; websockets 17.0 adds a trio
     implementation whose tests import trio unconditionally.
   * d/control: mark the test-only build dependencies <!nocheck>.
   * d/control: switch Testsuite to autopkgtest-pkg-pybuild, which runs
     the upstream test suite against the installed package.
   * d/control: drop Priority and Rules-Requires-Root, both dpkg defaults
     now.
   * d/control: update Homepage for the upstream repository move.
   * d/control: suggest python3-trio and python3-python-socks, needed for
     the trio implementation and for SOCKS proxy support respectively.
   * d/control: refresh the package description; websockets now ships
     asyncio, threading and trio implementations plus a Sans-I/O layer.
   * d/rules: set BUILD_EXTENSION=yes so a failure to compile the C
     speedups extension fails the build instead of silently shipping a
     pure-Python package on an Architecture: any package.
   * d/rules: enable all hardening options for the C extension.
   * d/rules: export the proxy variables empty instead of clearing them on a
     dh_auto_test override, so that pybuild-autopkgtest gets them too, and
     cover ws_proxy, wss_proxy and socks_proxy; websockets has consulted those
     since 15.0.
   * d/copyright: follow the upstream repository move, and sync the
     Files: * copyright statement and the licence text with upstream's
     LICENSE.
   * d/upstream/metadata: follow the upstream repository move and add
     Documentation.
   * d/salsa-ci.yml: add, with a nocheck build profile job to exercise the
     build profile restrictions.
   * Add a manpage for the websockets interactive client.
Checksums-Sha1:
 61f73558f747ef1472d9953c4aea740ec5af33bb 2222 python-websockets_17.1-1.dsc
 c5e2e094720958e97e9712f33689a039e6f74a73 528172 
python-websockets_17.1.orig.tar.gz
 e5e281a8ad81464645e56fb1cfe022d5f6461821 6180 
python-websockets_17.1-1.debian.tar.xz
 58658eb6b6895d9c09a4af454bd719e6fac7162a 8494 
python-websockets_17.1-1_source.buildinfo
Checksums-Sha256:
 942881c62cfba770c5e7ea55f9ff3e59646dafb0e1e2fe7b6953371bbe51a348 2222 
python-websockets_17.1-1.dsc
 35ceb07d65405d36302e4f5c21dd6f2050e0c334929cc9fc40b9c5973ce84bcb 528172 
python-websockets_17.1.orig.tar.gz
 7c4aed4145f70c88a7e6a3f1cfeb8c208f476ee5b3b5087dfc71f16d6e1979b8 6180 
python-websockets_17.1-1.debian.tar.xz
 5f2fe069451aa2ccafbbec0412dda14cca9d9b4b6068737171eb62f00fb29609 8494 
python-websockets_17.1-1_source.buildinfo
Files:
 e1529342d425a94fc4dd13dec9f46ed2 2222 python - python-websockets_17.1-1.dsc
 e27e62f4cda21a9182d0004c963ce0b0 528172 python - 
python-websockets_17.1.orig.tar.gz
 07d89625fa97424a64b4d7c729d95e5c 6180 python - 
python-websockets_17.1-1.debian.tar.xz
 6c6d8a991570c88222eb4bc81dd8acd4 8494 python - 
python-websockets_17.1-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEd8lhnEnWos3N8v+qQoMEoXSNzHoFAmqqcHwACgkQQoMEoXSN
zHrXYBAAhP3EiheoZCZReBG37EIuicEydRy17sNVkEyqfF4Bdiliq5BPKMTMMwjc
TCY4r8SUFfO87lo27DbavaSzcetOb9VeU5+pltsEygPXorPTE2xddswDWTn5ygJN
Yh6V7Y284nsJFCr+IN9hFOjSHuqrZmv3h4LlDll4O9NBViQdTFGICMI8FFgs6lDC
muw3t5zuq+E5J0FsqOKPBGTlE+otfq56zHw+9QVVrx4mUJKj38zfFA89k9atpuPL
wJJI0ykufT8Gd0J1CrcDdzhpoM1YqgYB35amrnGGYsvuDDI8aQ650t1Sg0iYQaNM
VVQdSJ9klMgBvc17NMb3LrQHd6ClC2zsQwMOv8gZ7vgDclZ2fdiDhZGgidOPs53E
at+ruNWpvo+5er/VPIF7N5l/UocPr/ImxVEPlI5c5IrGQsF5Ctf0a6CIwwCWpOYN
SiphXR9XiXpRwZ6xb1ufiQ3hHyYnmj9f5e+5lYttXXnh7V7ULLRCfpdUdQmJEwD3
6VAqxnuNneRLAfc+fkZZrLUYf3oBR37lKh4AfIH37WqfcDJofnC7DjPRun9rVqRw
2g/5cyIXmIMsM7rH5nvTeIpXRDuWt8ldpvZlASZAFnxcpI1DLG5cu656sJwQWL4a
u+NYYcbNZFHmbdJ0fOcm7Csb9mLCs8oV/zB/7wkr3/IKKjQp2Wc=
=WZmU
-----END PGP SIGNATURE-----

Attachment: pgp6z59S27xt3.pgp
Description: PGP signature


--- End Message ---

Reply via email to