diff options
| author | root <root@alpha.trunkmasters.com> | 2026-08-27 03:04:46 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-08-27 03:04:46 -0500 |
| commit | 2becf90cbeed1e8431dfd896e8a1b0e52085a807 (patch) | |
| tree | a2c63582302d79d3b93dee005f71c667e192ae02 /dev-python/websockets/files | |
| parent | a5b204c853f6ce1d5c74fb57a0c5c64567baeab6 (diff) | |
| download | baldeagleos-repo-2becf90cbeed1e8431dfd896e8a1b0e52085a807.tar.gz baldeagleos-repo-2becf90cbeed1e8431dfd896e8a1b0e52085a807.tar.xz baldeagleos-repo-2becf90cbeed1e8431dfd896e8a1b0e52085a807.zip | |
Adding metadata
Diffstat (limited to 'dev-python/websockets/files')
| -rw-r--r-- | dev-python/websockets/files/websockets-16.0-py315.patch | 29 |
1 files changed, 0 insertions, 29 deletions
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 <lbalhar@redhat.com> -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) |
