Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pysimdjson/files/, dev-python/pysimdjson/
Date: Sat, 24 Jul 2021 17:33:50
Message-Id: 1627148022.eaf5eeeb1a75fb4d3b51e17edc9d039310da82e6.mgorny@gentoo
1 commit: eaf5eeeb1a75fb4d3b51e17edc9d039310da82e6
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 24 17:33:07 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 24 17:33:42 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eaf5eeeb
7
8 dev-python/pysimdjson: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pysimdjson/Manifest | 1 -
13 .../files/pysimdjson-4.0.0-error-types.patch | 53 ----------------------
14 dev-python/pysimdjson/pysimdjson-4.0.0-r1.ebuild | 43 ------------------
15 3 files changed, 97 deletions(-)
16
17 diff --git a/dev-python/pysimdjson/Manifest b/dev-python/pysimdjson/Manifest
18 index 7e2fb4ca82d..3e21a4a19a6 100644
19 --- a/dev-python/pysimdjson/Manifest
20 +++ b/dev-python/pysimdjson/Manifest
21 @@ -1,2 +1 @@
22 -DIST pysimdjson-4.0.0.tar.gz 3738787 BLAKE2B 744d6bc53511e03e8e716d6c65771432c7bf8f7876bbf8c78d09459a8b170d3d396f9cc8996894f67110f4b7389526d454dffd687b1fda22df7f76f027af44db SHA512 8b3040ce44bb5042b70a14d9f67c312a375d1a12ba7a66466935a48ad0f8def9c21e200c8c93aa755110a674e95920fa7d0567c4f584be5392b70719994a2213
23 DIST pysimdjson-4.0.2.tar.gz 3740054 BLAKE2B 379c8637096074615f2045171e0950af0190e8485db6a1734f4fcd19d9eeeebd91cb79c18abd2fe6256287f15aa6a3c12c1283e4affa131db14f9948ab2f0d63 SHA512 537b7958dd3429831ee201b6a4fc5fa8fca50ad14def016b472d3f234f81175441152c1823eed0bcad06f59e274e2b6b036f26a3af8f6977ceea5807471de4a5
24
25 diff --git a/dev-python/pysimdjson/files/pysimdjson-4.0.0-error-types.patch b/dev-python/pysimdjson/files/pysimdjson-4.0.0-error-types.patch
26 deleted file mode 100644
27 index 34b8f4aa9e2..00000000000
28 --- a/dev-python/pysimdjson/files/pysimdjson-4.0.0-error-types.patch
29 +++ /dev/null
30 @@ -1,53 +0,0 @@
31 -commit 1145be6cac70ed065f2053977d470f3f771ac6a0
32 -Author: Tyler Kennedy <tk@××××.ch>
33 -Date: Sun May 23 15:55:28 2021 -0400
34 -
35 - Empty buffers now raise identical error to empty bytes. Closes #81.
36 -
37 -diff --git a/simdjson/csimdjson.pyx b/simdjson/csimdjson.pyx
38 -index 095a183..c278e08 100644
39 ---- a/simdjson/csimdjson.pyx
40 -+++ b/simdjson/csimdjson.pyx
41 -@@ -478,6 +478,13 @@ cdef class Parser:
42 - # type-specific APIs, but gives much greater compatibility.
43 - data = src
44 -
45 -+ if data.size == 0:
46 -+ # If we were given a completely empty buffer, trying to access
47 -+ # a stride in the next step will cause a (potentially
48 -+ # confusing) IndexError. This isn't a very good error message,
49 -+ # but it's identical to the one simdjson would have raised.
50 -+ raise ValueError('Empty: no JSON found')
51 -+
52 - return element_to_primitive(
53 - self,
54 - dereference(self.c_parser).parse(
55 -diff --git a/tests/test_parser.py b/tests/test_parser.py
56 -index 88e7207..d3a28c7 100644
57 ---- a/tests/test_parser.py
58 -+++ b/tests/test_parser.py
59 -@@ -1,3 +1,4 @@
60 -+import io
61 - import pathlib
62 -
63 - import pytest
64 -@@ -32,6 +33,19 @@ def test_parse_str(parser):
65 - assert doc.as_dict() == {'hello': 'world'}
66 -
67 -
68 -+def test_parse_empty_buffer(parser):
69 -+ """Ensure trying to parse an empty buffer returns an error consistent
70 -+ with attempting to parse an empty bytestring."""
71 -+ # Issue #81
72 -+ with pytest.raises(ValueError) as bytes_exc:
73 -+ parser.parse(b'')
74 -+
75 -+ with pytest.raises(ValueError) as buffer_exc:
76 -+ parser.parse(io.BytesIO(b'').getbuffer())
77 -+
78 -+ assert str(bytes_exc.value) == str(buffer_exc.value)
79 -+
80 -+
81 - def test_unicode_decode_error(parser):
82 - """Ensure the parser raises encoding issues."""
83 - with pytest.raises(UnicodeDecodeError):
84
85 diff --git a/dev-python/pysimdjson/pysimdjson-4.0.0-r1.ebuild b/dev-python/pysimdjson/pysimdjson-4.0.0-r1.ebuild
86 deleted file mode 100644
87 index e2b6c28fb20..00000000000
88 --- a/dev-python/pysimdjson/pysimdjson-4.0.0-r1.ebuild
89 +++ /dev/null
90 @@ -1,43 +0,0 @@
91 -# Copyright 2020-2021 Gentoo Authors
92 -# Distributed under the terms of the GNU General Public License v2
93 -
94 -EAPI=7
95 -
96 -PYTHON_COMPAT=( python3_{7..10} )
97 -inherit distutils-r1
98 -
99 -DESCRIPTION="Python bindings for simdjson"
100 -HOMEPAGE="https://github.com/TkTech/pysimdjson"
101 -SRC_URI="https://github.com/TkTech/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
102 -
103 -LICENSE="MIT Apache-2.0"
104 -SLOT="0"
105 -KEYWORDS="amd64 ~x86"
106 -
107 -RDEPEND="
108 - dev-libs/simdjson:=
109 -"
110 -DEPEND=${RDEPEND}
111 -BDEPEND="
112 - dev-python/cython[${PYTHON_USEDEP}]
113 -"
114 -distutils_enable_tests pytest
115 -
116 -PATCHES=(
117 - "${FILESDIR}"/pysimdjson-4.0.0-unbundle.patch
118 - "${FILESDIR}"/pysimdjson-4.0.0-error-types.patch
119 -)
120 -
121 -src_prepare() {
122 - # benchmarks aren't run
123 - sed -i -e 's:pytest-benchmark::' setup.cfg || die
124 - # force regen
125 - rm simdjson/csimdjson.cpp || die
126 - # bundled lib :-(
127 - rm simdjson/simdjson.{cpp,h} || die
128 -
129 - distutils-r1_src_prepare
130 -
131 - export BUILD_WITH_CYTHON=1
132 - export BUILD_WITH_SYSTEM_LIB=1
133 -}