From 2becf90cbeed1e8431dfd896e8a1b0e52085a807 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 27 Aug 2026 03:04:46 -0500 Subject: Adding metadata --- .../websockets/files/websockets-16.0-py315.patch | 29 ---------------------- 1 file changed, 29 deletions(-) delete mode 100644 dev-python/websockets/files/websockets-16.0-py315.patch (limited to 'dev-python/websockets/files') diff --git a/dev-python/websockets/files/websockets-16.0-py315.patch b/dev-python/websockets/files/websockets-16.0-py315.patch deleted file mode 100644 index 6ce426da962c..000000000000 --- a/dev-python/websockets/files/websockets-16.0-py315.patch +++ /dev/null @@ -1,29 +0,0 @@ -From f3bf8033276aa4fc272940e650c319c517bb3479 Mon Sep 17 00:00:00 2001 -From: Lumir Balhar -Date: Tue, 7 Apr 2026 09:16:08 +0200 -Subject: [PATCH] Python 3.15+ requires C-contiguous buffers for - int.from_bytes() - ---- - src/websockets/utils.py | 8 ++++++++ - 1 file changed, 8 insertions(+) - -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) -- cgit v1.3