backports/py3-cbor2: upgrade to 5.6.1

This commit is contained in:
Antoine Martin 2024-04-14 18:22:24 -04:00
parent ab18390138
commit 7b533ea001
2 changed files with 36 additions and 7 deletions

View file

@ -1,15 +1,12 @@
# Contributor: Marian Buschsieweke <marian.buschsieweke@ovgu.de> # Contributor: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de> # Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=py3-cbor2 pkgname=py3-cbor2
pkgver=5.5.0 pkgver=5.6.1
pkgrel=0 pkgrel=0
pkgdesc="encoding and decoding for CBOR (RFC 8949)" pkgdesc="encoding and decoding for CBOR (RFC 8949)"
url="https://github.com/agronholm/cbor2" url="https://github.com/agronholm/cbor2"
arch="all" arch="all"
license="MIT" license="MIT"
depends="
python3
"
makedepends=" makedepends="
py3-gpep517 py3-gpep517
py3-setuptools py3-setuptools
@ -24,8 +21,10 @@ checkdepends="
py3-tomli py3-tomli
" "
subpackages="$pkgname-pyc" subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/c/cbor2/cbor2-$pkgver.tar.gz" source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/c/cbor2/cbor2-$pkgver.tar.gz
builddir="$srcdir/"cbor2-$pkgver fix-32bit-tests.patch
"
builddir="$srcdir/cbor2-$pkgver"
build() { build() {
gpep517 build-wheel \ gpep517 build-wheel \
@ -45,5 +44,6 @@ package() {
} }
sha512sums=" sha512sums="
64b9ef0e358ac02113f85a2e633ed52900c4d5d6c89f889d9322f181e29fbdf9462663b5eaec7a255d5e6d47c82c4902cb7ff56999251c5ec070c7b610e615b3 py3-cbor2-5.5.0.tar.gz 9ddf2c3690780816ff50ff4ed371435ca45b597b706254c37c9f01d1f1a699892e2c945a72e69b5506a803c41692f399b58b4e32d9409a0197c677e537e656b2 py3-cbor2-5.6.1.tar.gz
ba8a19a73fe2dc747846b77fde6cd621ccb500a514ba61192dfa28c875720003666165ad12c767260b31148b0dd25454e36e4f43dd8bb1d11928944c6a5b61dd fix-32bit-tests.patch
" "

View file

@ -0,0 +1,29 @@
Patch-Source: https://github.com/agronholm/cbor2/commit/75279162a019d20db3bff8d64d41c7e97b555b53
From 75279162a019d20db3bff8d64d41c7e97b555b53 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= <alex.gronholm@nextday.fi>
Date: Tue, 6 Feb 2024 15:43:23 +0200
Subject: [PATCH] Fixed test_oversized_read failing on 32-bit platforms
Fixes #215.
---
tests/test_decoder.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_decoder.py b/tests/test_decoder.py
index cd0b45a..d11be6e 100644
--- a/tests/test_decoder.py
+++ b/tests/test_decoder.py
@@ -939,11 +939,11 @@ def test_decimal_payload_unpacking(impl, data, expected):
"payload",
[
pytest.param(
- unhexlify("5b7fffffffffffff00"),
+ unhexlify("41"),
id="bytestring",
),
pytest.param(
- unhexlify("7b7fffffffffffff00"),
+ unhexlify("61"),
id="unicode",
),
],