summaryrefslogtreecommitdiff
path: root/dev-python/ujson
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
commit9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch)
tree8ac67e26b45f34d71c5aab3621813b100a0d5f00 /dev-python/ujson
parentf516638b7fe9592837389826a6152a7e1b251c54 (diff)
gentoo resync : 13.06.2020
Diffstat (limited to 'dev-python/ujson')
-rw-r--r--dev-python/ujson/Manifest3
-rw-r--r--dev-python/ujson/files/ujson-3.0.0-pypy3-test.patch80
-rw-r--r--dev-python/ujson/ujson-3.0.0.ebuild28
3 files changed, 111 insertions, 0 deletions
diff --git a/dev-python/ujson/Manifest b/dev-python/ujson/Manifest
index 289ba3971046..c9aaabc68d1b 100644
--- a/dev-python/ujson/Manifest
+++ b/dev-python/ujson/Manifest
@@ -4,8 +4,11 @@ AUX ujson-1.35-sort_keys-segfault.patch 2360 BLAKE2B 774cd15a52a333456e0f7a4996d
AUX ujson-1.35-standard-handling-of-none.patch 2563 BLAKE2B 55a2ad075f7ed348ec4f92727e9bfab2c41a734412706102e1b0df8c04f969d4273354cdb570b3334a4bcb7ec3cdef7c1c836405345165e129ab82a0f53f8f35 SHA512 3d3b7a3dc3d055c4c3cc94acdced6d5b154bfe23ff371230924f5ac7ea982997b2d404dc643c53e606c76b41a5d8c41d506d3f5d3adcc6cd61633f7dbaf3e30e
AUX ujson-1.35-test-depricationwarning.patch 369 BLAKE2B 9fbc92d557049d8790b664ef60a908b99f6cd657c5ade674979f1b05e4c61dbb514eba09d3727c6c61eddc5b08fde5043cdd2af0477c996d9fe9bb43a4838380 SHA512 71fc8012f1701a35def3d7533d8d8d4133550dd57bd22b11e1dcd2806d25e185678f047cc1fe61a35132ed1d546d1411d452bb0e7af66aefe9b53a99b5ef3c66
AUX ujson-1.35-use-static-where-possible.patch 19904 BLAKE2B dcf5691a43dd068635f6be23b9dc5c3a7ff2d9a66c836dc75954f7625f7aef4d55e06e90f3c030f8bc2f4db80b34cb540e09183939880bbf32225bc23c58f3fa SHA512 fe96f88cde477bfdc63ad5cf360ab6c63e2cf00c192a8d70d80340b7e39820ca53554a775c8f32b7ca43259e9f299fe38ebaf4aa64ef12c035bf23085f5b5789
+AUX ujson-3.0.0-pypy3-test.patch 2694 BLAKE2B 415ba9375614c69aa4397aa0401e6093043d2f847ee68287b2f3fc497ee0bd98fb3974cae86e8bf9b0af69d088250b90871b5597bf046cb803ceeb5a64d6f60a SHA512 d59021415229142e673059bd18d313ac3886b70f39dc9e53bf592d4b796ceedd096468adb5c5aeaadf99c2cad2d2d6188ebdbe5b32aeeb83ba9cd1890327226b
DIST ujson-1.35.tar.gz 192027 BLAKE2B 320058e7142f2264bee8b02a411bedb3b32d1c2fc86157eb47272f75cb401e6c75ce7d9e3dba5092cd1db99dbded8804347d4c7be11eaedb47bc8b4b8125fbd3 SHA512 931d8f574fc4920c9ded48369774666060e951f40982606ce9f1d9de3420004042af7d797075a54d92a2b25c4f313572a5e1a30f3bc8ce387ef8f3881193eee7
DIST ujson-2.0.3.tar.gz 7127432 BLAKE2B 09fc3bdd127e5b54cfb26ffe56eced194d7c4aaab5717a396e06317de26f34815d04cce2b67ccb0157474165bdbdc62f0171b9485d7083dc1c01aa7252afeb5a SHA512 2c1879c372745966a00e064559dbf615f282ef192cbdbb29243c48169fc5f6e9344eba29988a1de3b5b0d1fe7699fcd88373d6dbb2e3fb59b1e8ef12b8a0375d
+DIST ujson-3.0.0.tar.gz 7128523 BLAKE2B b19525edf1528e3b2a43cb08ecbf7b5d070f2455fb0bbffbe4b866bbaca91df09d7f4d46509dfb92d825095d4b922fc866fa36e051fa0e27af60fe558c69c854 SHA512 058675627c1275df1dbada02fca3750e544e25c0d0842b4a4268a664456cae1869423d832b7e4af40e56168b687ec711adf124e9ab34b7c06a244b61f7e2fdfc
EBUILD ujson-1.35-r1.ebuild 916 BLAKE2B 6ab2c9fc8d238905603795685517d7e7d8885311653acb0fc3dbeb329ac91f0a465315f25437d42fdca24627d8a1584becef51d61aab1af49eb85f28933124a1 SHA512 1f0e47f81964b8d7691863477836750ef7c9c44e900f94502c0498088fc5d2ff2e7770342273f1a2ea4356900741fef872c99bdc2636f247ee495ca4af269883
EBUILD ujson-2.0.3.ebuild 583 BLAKE2B 24b7c4e57672c9700976bfe3dab1c3a99c6a5eaa81dbcdacc0ddaf46cf780b59b1ceb86097e453d35c54d9b1d605d07126a2af476c10475b95da45590a9d5cb9 SHA512 0d646f96fe82f4fd3e28ce4b0afe969a6035438f033290aad0a08905b4f800e20344df1d523a2bd86cc9fed5241d0a3b876389c8a1b09d16f8caa9ad4357a400
+EBUILD ujson-3.0.0.ebuild 635 BLAKE2B 7e8b8520525861b7518e3c5a1a53bf1f5bedfd83b2610bac87f9179f51aaea0c3f0b4196ef87a1b4933b557c386b12ce2d09defa886ec15e74fd4fb5870e412a SHA512 81cc447cf26dcda9a350c7ec09bb2cc88f6bdff8a26aee6c7442224fa16afb7cbe2008b349edace853b95595ebd6b114cd9517058ff496f4df169a2ced5e6862
MISC metadata.xml 432 BLAKE2B 9218fa7b4dcf0c44ae1d5b30869a2f8981dc03714245aa258de0552e5f27de7cc359acdcb8d22da82069bcf465a91ac7d4401f111cf52abedbe4451e08d67153 SHA512 485e866809b2704a344436f956dd242b8720ecf46daf53a7a64fcf8a5edd3b3915faf59d48da4224b361ba35f7ab8c346e16b0a037cf8846d663d175486bed8f
diff --git a/dev-python/ujson/files/ujson-3.0.0-pypy3-test.patch b/dev-python/ujson/files/ujson-3.0.0-pypy3-test.patch
new file mode 100644
index 000000000000..3bee41bc938a
--- /dev/null
+++ b/dev-python/ujson/files/ujson-3.0.0-pypy3-test.patch
@@ -0,0 +1,80 @@
+From c9a5ee46a1112d5f7e51defebeefb1e0ab43111e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 12 Jun 2020 15:04:57 +0200
+Subject: [PATCH 1/3] Do not depend on specific exception messages in tests
+
+Fix test_encode_raises_allow_nan() not to depend on specific exception
+messages. This fixes test failures on PyPy which just happens to use
+different error messages.
+---
+ tests/test_ujson.py | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/tests/test_ujson.py b/tests/test_ujson.py
+index 72018a0..1d41de5 100644
+--- a/tests/test_ujson.py
++++ b/tests/test_ujson.py
+@@ -614,18 +614,17 @@ def test_dumps_raises(test_input, expected_exception, expected_message):
+
+
+ @pytest.mark.parametrize(
+- "test_input, expected_exception, expected_message",
++ "test_input, expected_exception",
+ [
+- (float("nan"), OverflowError, "Invalid value when encoding double"),
+- (float("inf"), OverflowError, "Invalid value when encoding double"),
+- (-float("inf"), OverflowError, "Invalid value when encoding double"),
+- (12839128391289382193812939, OverflowError, "int too big to convert"),
++ (float("nan"), OverflowError),
++ (float("inf"), OverflowError),
++ (-float("inf"), OverflowError),
++ (12839128391289382193812939, OverflowError),
+ ],
+ )
+-def test_encode_raises_allow_nan(test_input, expected_exception, expected_message):
++def test_encode_raises_allow_nan(test_input, expected_exception):
+ with pytest.raises(expected_exception) as e:
+ ujson.dumps(test_input, allow_nan=False)
+- assert str(e.value) == expected_message
+
+
+ @pytest.mark.parametrize(
+--
+2.27.0
+
+From 66cc0ad8a76d1bef848e36d9bdcaf476047b5605 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 12 Jun 2020 15:08:27 +0200
+Subject: [PATCH 2/3] Skip GC tests on PyPy
+
+---
+ tests/test_ujson.py | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/tests/test_ujson.py b/tests/test_ujson.py
+index 1d41de5..fe20174 100644
+--- a/tests/test_ujson.py
++++ b/tests/test_ujson.py
+@@ -215,6 +215,9 @@ def test_encode_dict_conversion():
+ assert test_input == ujson.decode(output)
+
+
++@pytest.mark.skipif(
++ hasattr(sys, "pypy_version_info"), reason="PyPy uses incompatible GC"
++)
+ def test_encode_dict_values_ref_counting():
+ import gc
+
+@@ -226,6 +229,9 @@ def test_encode_dict_values_ref_counting():
+ assert ref_count == sys.getrefcount(value)
+
+
++@pytest.mark.skipif(
++ hasattr(sys, "pypy_version_info"), reason="PyPy uses incompatible GC"
++)
+ def test_encode_dict_key_ref_counting():
+ import gc
+
+--
+2.27.0
+
diff --git a/dev-python/ujson/ujson-3.0.0.ebuild b/dev-python/ujson/ujson-3.0.0.ebuild
new file mode 100644
index 000000000000..60a87e3a0884
--- /dev/null
+++ b/dev-python/ujson/ujson-3.0.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6..9} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="Ultra fast JSON encoder and decoder for Python"
+HOMEPAGE="https://pypi.org/project/ujson/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ dev-python/setuptools_scm[${PYTHON_USEDEP}]
+ test? ( dev-python/pytz[${PYTHON_USEDEP}] )
+"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}"/${P}-pypy3-test.patch
+)