[gentoo-commits] repo/gentoo:master commit in: dev-python/ujson/, dev-python/ujson/files/

2021-02-26 Thread Michał Górny
commit: 38de7b4564f19a1a466c23ed06b962d6e3bd8d69
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Feb 26 14:02:08 2021 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Feb 26 14:26:56 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38de7b45

dev-python/ujson: Remove old

Signed-off-by: Michał Górny  gentoo.org>

 dev-python/ujson/Manifest  |   2 -
 .../ujson-1.35-fix-for-overflowing-long.patch  |  84 ---
 .../ujson-1.35-fix-ordering-of-orderdict.patch | 122 -
 .../files/ujson-1.35-sort_keys-segfault.patch  |  73 ---
 .../ujson-1.35-standard-handling-of-none.patch |  77 ---
 .../files/ujson-1.35-test-depricationwarning.patch |  11 -
 .../ujson-1.35-use-static-where-possible.patch | 591 -
 dev-python/ujson/ujson-1.35-r1.ebuild  |  37 --
 dev-python/ujson/ujson-4.0.1.ebuild|  24 -
 9 files changed, 1021 deletions(-)

diff --git a/dev-python/ujson/Manifest b/dev-python/ujson/Manifest
index 2c3d579d337..90f2344aa4a 100644
--- a/dev-python/ujson/Manifest
+++ b/dev-python/ujson/Manifest
@@ -1,3 +1 @@
-DIST ujson-1.35.tar.gz 192027 BLAKE2B 
320058e7142f2264bee8b02a411bedb3b32d1c2fc86157eb47272f75cb401e6c75ce7d9e3dba5092cd1db99dbded8804347d4c7be11eaedb47bc8b4b8125fbd3
 SHA512 
931d8f574fc4920c9ded48369774666060e951f40982606ce9f1d9de3420004042af7d797075a54d92a2b25c4f313572a5e1a30f3bc8ce387ef8f3881193eee7
-DIST ujson-4.0.1.tar.gz 7128868 BLAKE2B 
159496bfa2b7efff744c1f725c5a8c362c6baac20518d440e5827ec8af1a9a77b4e060126d9b35b39baae079f7092e64d49d0cd23a637174a4bca261203939d6
 SHA512 
11fb28166afab30e29d71070c91cfb78245eed704a769bf6fb0871c267135fac3fa1042c4ac875dcb870f8a00615e6bcc8fdcd0168edd5ccbae6437605b4df0d
 DIST ujson-4.0.2.tar.gz 7129106 BLAKE2B 
8ebf68c6bac65100baeee4f95f175ada09ba48b9efe1876b7b1ff2c3cf87d1a50d8300a981fd97eac73e4c5a70af1b7fddcd468aa6067aac8a2e44133f397057
 SHA512 
ece12d4407cb7cdb647597ff7fc32e4390fc4c790c59e764da5c5644e5dec470c48cb6a6aaa18429cb713643e5205c5d26b2d2d2195bc90f3a171615d3dbd80d

diff --git a/dev-python/ujson/files/ujson-1.35-fix-for-overflowing-long.patch 
b/dev-python/ujson/files/ujson-1.35-fix-for-overflowing-long.patch
deleted file mode 100644
index 98659ce1722..000
--- a/dev-python/ujson/files/ujson-1.35-fix-for-overflowing-long.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-commit 409c6d4006fdea27e746ea397124f98c92a41a92
-Author: Joakim Hamren 
-Date:   Sat Feb 4 04:21:05 2017 +0100
-
-Fix for overflowing long causing invalid json
-
-This was caused by checking for "__json__" using PyObject_HasAttrString
-which clears the error set by a previous long overflow. Thus this was 
dependent
-on the order of processing of dict items, which explains why it was
-seemingly random as the dict items are likely ordered by a hash of
-the key.
-
-This fixes GH224 and GH240.
-
-diff --git a/python/objToJSON.c b/python/objToJSON.c
-index 8133fb5..adea2f6 100644
 a/python/objToJSON.c
-+++ b/python/objToJSON.c
-@@ -226,6 +226,21 @@ static void *PyDateToINT64(JSOBJ _obj, JSONTypeContext 
*tc, void *outValue, size
-   return NULL;
- }
- 
-+static int PyHasAttrStringPreserveErr(PyObject *obj, const char *attr)
-+{
-+  int res;
-+  PyObject *excType = NULL, *excValue, *excTraceback;
-+
-+  if (!PyErr_Occurred())
-+return PyObject_HasAttrString(obj, "__json__");
-+
-+  PyErr_Fetch(&excType, &excValue, &excTraceback);
-+  res = PyObject_HasAttrString(obj, "__json__");
-+  PyErr_Restore(excType, excValue, excTraceback);
-+
-+  return res;
-+}
-+
- static int Tuple_iterNext(JSOBJ obj, JSONTypeContext *tc)
- {
-   PyObject *item;
-@@ -471,21 +486,21 @@ static int Dict_iterNext(JSOBJ obj, JSONTypeContext *tc)
- GET_TC(tc)->itemName = PyUnicode_AsUTF8String (GET_TC(tc)->itemName);
-   }
-   else
--if (!PyString_Check(GET_TC(tc)->itemName))
--{
--  GET_TC(tc)->itemName = PyObject_Str(GET_TC(tc)->itemName);
-+  if (!PyString_Check(GET_TC(tc)->itemName))
-+  {
-+GET_TC(tc)->itemName = PyObject_Str(GET_TC(tc)->itemName);
- #if PY_MAJOR_VERSION >= 3
--  itemNameTmp = GET_TC(tc)->itemName;
--  GET_TC(tc)->itemName = PyUnicode_AsUTF8String (GET_TC(tc)->itemName);
--  Py_DECREF(itemNameTmp);
-+itemNameTmp = GET_TC(tc)->itemName;
-+GET_TC(tc)->itemName = PyUnicode_AsUTF8String (GET_TC(tc)->itemName);
-+Py_DECREF(itemNameTmp);
- #endif
--}
--else
--{
--  Py_INCREF(GET_TC(tc)->itemName);
--}
--PRINTMARK();
--return 1;
-+  }
-+  else
-+  {
-+Py_INCREF(GET_TC(tc)->itemName);
-+  }
-+  PRINTMARK();
-+  return 1;
- }
- 
- static void Dict_iterEnd(JSOBJ obj, JSONTypeContext *tc)
-@@ -728,7 +743,7 @@ static void Object_beginTypeContext (JSOBJ _obj, 
JSONTypeContext *tc, JSONObject
- return;
-   }
-   else
--  if (PyString_Check(obj) && !PyObject_HasAttrString(obj, "__json__"))
-+  if (PyString_Check(obj) && !PyHasAttrStringPreserveErr(obj, "__json__"))
-   {
- 

[gentoo-commits] repo/gentoo:master commit in: dev-python/ujson/, dev-python/ujson/files/

2019-12-29 Thread David Seifert
commit: 4526068ac73c0fa4ae65c75063197a8824bde127
Author: David Seifert  gentoo  org>
AuthorDate: Sun Dec 29 08:52:54 2019 +
Commit: David Seifert  gentoo  org>
CommitDate: Sun Dec 29 08:52:54 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4526068a

dev-python/ujson: Remove old

Package-Manager: Portage-2.3.83, Repoman-2.3.20
Signed-off-by: David Seifert  gentoo.org>

 dev-python/ujson/Manifest|  1 -
 dev-python/ujson/files/ujson-1.33-test-py3.patch | 38 
 dev-python/ujson/ujson-1.33.ebuild   | 45 
 3 files changed, 84 deletions(-)

diff --git a/dev-python/ujson/Manifest b/dev-python/ujson/Manifest
index c10c9b79e00..6e3b3d1940d 100644
--- a/dev-python/ujson/Manifest
+++ b/dev-python/ujson/Manifest
@@ -1,2 +1 @@
-DIST ujson-1.33.zip 197034 BLAKE2B 
587e00292340d69fdda9720d66bb360ed646f8c709e279f905f7fdf2db79a2ec51856dce998fd3e2fe5b3bf067c72ad661f77154bc3d63cee4c3eea10bca29ec
 SHA512 
0f1f66212fbf94c03e048ba64c3bd817c50443d1a29b87f6a3a38f697a050f38821be4ba36a3b17a96930c69ee92973ac31bdd41851dea071af14cd4bbaf8480
 DIST ujson-1.35.tar.gz 192027 BLAKE2B 
320058e7142f2264bee8b02a411bedb3b32d1c2fc86157eb47272f75cb401e6c75ce7d9e3dba5092cd1db99dbded8804347d4c7be11eaedb47bc8b4b8125fbd3
 SHA512 
931d8f574fc4920c9ded48369774666060e951f40982606ce9f1d9de3420004042af7d797075a54d92a2b25c4f313572a5e1a30f3bc8ce387ef8f3881193eee7

diff --git a/dev-python/ujson/files/ujson-1.33-test-py3.patch 
b/dev-python/ujson/files/ujson-1.33-test-py3.patch
deleted file mode 100644
index e497f396792..000
--- a/dev-python/ujson/files/ujson-1.33-test-py3.patch
+++ /dev/null
@@ -1,38 +0,0 @@
- tests/tests.py | 8 +---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/tests/tests.py b/tests/tests.py
-index d210bc6..71f8074 100644
 a/tests/tests.py
-+++ b/tests/tests.py
-@@ -11,6 +11,7 @@ try:
- except ImportError:
- import simplejson as json
- import math
-+import nose
- import platform
- import sys
- import time
-@@ -24,9 +25,10 @@ from functools import partial
- 
- PY3 = (sys.version_info[0] >= 3)
- 
--def _python_ver(skip_major, skip_minor=None):
-+def _skip_if_python_ver(skip_major, skip_minor=None):
- major, minor = sys.version_info[:2]
--return major == skip_major and (skip_minor is None or minor == skip_minor)
-+if major == skip_major and (skip_minor is None or minor == skip_minor):
-+raise nose.SkipTest
- 
- json_unicode = (json.dumps if sys.version_info[0] >= 3
- else partial(json.dumps, encoding="utf-8"))
-@@ -579,8 +581,8 @@ class UltraJSONTests(TestCase):
- input = "-31337"
- self.assertEquals (-31337, ujson.decode(input))
- 
--#@unittest.skipIf(_python_ver(3), "No exception in Python 3")
- def test_encodeUnicode4BytesUTF8Fail(self):
-+_skip_if_python_ver(3)
- input = "\xfd\xbf\xbf\xbf\xbf\xbf"
- try:
- enc = ujson.encode(input)

diff --git a/dev-python/ujson/ujson-1.33.ebuild 
b/dev-python/ujson/ujson-1.33.ebuild
deleted file mode 100644
index 21bf458e20f..000
--- a/dev-python/ujson/ujson-1.33.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-# One test; FAIL: test_encodeToUTF8 (__main__.UltraJSONTests) under py2.5.
-# Fix and repair and re-insert if it's REALLY needed
-PYTHON_COMPAT=( python2_7 python3_5 )
-
-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}.zip"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 arm x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
-   dev-python/setuptools[${PYTHON_USEDEP}]
-   dev-python/nose[${PYTHON_USEDEP}]
-   app-arch/unzip"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
-   "${FILESDIR}"/${P}-test-py3.patch
-)
-
-python_test() {
-   # See setup.py; line 72. Again "${S}" is used for reading tests
-   # Since py3_2 is first in the queue it needs its own copy
-   # or else all py2s to follow will be reading read py3 tests
-   if [[ "${EPYTHON}" =~ 'python3' ]]; then
-   cd "${BUILD_DIR}"/lib || die
-   cp -a "${S}"/tests/ .  || die
-   2to3 -w tests/tests.py || die
-   "${PYTHON}" tests/tests.py || die
-   rm -rf tests/ || die
-   else
-   "${PYTHON}" tests/tests.py || die
-   fi
-}



[gentoo-commits] repo/gentoo:master commit in: dev-python/ujson/, dev-python/ujson/files/

2017-04-14 Thread Patrick McLean
commit: c3a74efba946c7428e8984f810fdd5d219f3c16d
Author: Patrick McLean  gentoo  org>
AuthorDate: Sat Apr 15 01:17:12 2017 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Sat Apr 15 01:17:12 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3a74efb

dev-python/ujson: Version bump to 1.35

Also pull in a few bugfixes from upstream and fix a DeprecationWarning in the
tests.

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 dev-python/ujson/Manifest  |   1 +
 .../ujson-1.35-fix-for-overflowing-long.patch  |  84 +++
 .../ujson-1.35-fix-ordering-of-orderdict.patch | 122 +
 .../files/ujson-1.35-sort_keys-segfault.patch  |  73 +++
 .../ujson-1.35-standard-handling-of-none.patch |  77 +++
 .../files/ujson-1.35-test-depricationwarning.patch |  11 +
 .../ujson-1.35-use-static-where-possible.patch | 591 +
 dev-python/ujson/ujson-1.35.ebuild |  33 ++
 8 files changed, 992 insertions(+)

diff --git a/dev-python/ujson/Manifest b/dev-python/ujson/Manifest
index aa37f161ee9..04f6da34d64 100644
--- a/dev-python/ujson/Manifest
+++ b/dev-python/ujson/Manifest
@@ -1 +1,2 @@
 DIST ujson-1.33.zip 197034 SHA256 
68cf825f227c82e1ac61e423cfcad923ff734c27b5bdd7174495d162c42c602b SHA512 
0f1f66212fbf94c03e048ba64c3bd817c50443d1a29b87f6a3a38f697a050f38821be4ba36a3b17a96930c69ee92973ac31bdd41851dea071af14cd4bbaf8480
 WHIRLPOOL 
d3080fcf3e979b43deb8fe099427a8311c55e7e54105626bf12b3b6fe9e8567f70501884bd24b7a26d53ddfcd98f535de4aa708801106aa4a1b76e543217835c
+DIST ujson-1.35.tar.gz 192027 SHA256 
f66073e5506e91d204ab0c614a148d5aa938bdbf104751be66f8ad7a222f5f86 SHA512 
931d8f574fc4920c9ded48369774666060e951f40982606ce9f1d9de3420004042af7d797075a54d92a2b25c4f313572a5e1a30f3bc8ce387ef8f3881193eee7
 WHIRLPOOL 
aff7a034304366e95ec51164de78afbee8daa496022abdae1b9928ea90928758e675027f2202ca77790788a3057c978d9ba9348684bc087843aa2e16932a1144

diff --git a/dev-python/ujson/files/ujson-1.35-fix-for-overflowing-long.patch 
b/dev-python/ujson/files/ujson-1.35-fix-for-overflowing-long.patch
new file mode 100644
index 000..98659ce1722
--- /dev/null
+++ b/dev-python/ujson/files/ujson-1.35-fix-for-overflowing-long.patch
@@ -0,0 +1,84 @@
+commit 409c6d4006fdea27e746ea397124f98c92a41a92
+Author: Joakim Hamren 
+Date:   Sat Feb 4 04:21:05 2017 +0100
+
+Fix for overflowing long causing invalid json
+
+This was caused by checking for "__json__" using PyObject_HasAttrString
+which clears the error set by a previous long overflow. Thus this was 
dependent
+on the order of processing of dict items, which explains why it was
+seemingly random as the dict items are likely ordered by a hash of
+the key.
+
+This fixes GH224 and GH240.
+
+diff --git a/python/objToJSON.c b/python/objToJSON.c
+index 8133fb5..adea2f6 100644
+--- a/python/objToJSON.c
 b/python/objToJSON.c
+@@ -226,6 +226,21 @@ static void *PyDateToINT64(JSOBJ _obj, JSONTypeContext 
*tc, void *outValue, size
+   return NULL;
+ }
+ 
++static int PyHasAttrStringPreserveErr(PyObject *obj, const char *attr)
++{
++  int res;
++  PyObject *excType = NULL, *excValue, *excTraceback;
++
++  if (!PyErr_Occurred())
++return PyObject_HasAttrString(obj, "__json__");
++
++  PyErr_Fetch(&excType, &excValue, &excTraceback);
++  res = PyObject_HasAttrString(obj, "__json__");
++  PyErr_Restore(excType, excValue, excTraceback);
++
++  return res;
++}
++
+ static int Tuple_iterNext(JSOBJ obj, JSONTypeContext *tc)
+ {
+   PyObject *item;
+@@ -471,21 +486,21 @@ static int Dict_iterNext(JSOBJ obj, JSONTypeContext *tc)
+ GET_TC(tc)->itemName = PyUnicode_AsUTF8String (GET_TC(tc)->itemName);
+   }
+   else
+-if (!PyString_Check(GET_TC(tc)->itemName))
+-{
+-  GET_TC(tc)->itemName = PyObject_Str(GET_TC(tc)->itemName);
++  if (!PyString_Check(GET_TC(tc)->itemName))
++  {
++GET_TC(tc)->itemName = PyObject_Str(GET_TC(tc)->itemName);
+ #if PY_MAJOR_VERSION >= 3
+-  itemNameTmp = GET_TC(tc)->itemName;
+-  GET_TC(tc)->itemName = PyUnicode_AsUTF8String (GET_TC(tc)->itemName);
+-  Py_DECREF(itemNameTmp);
++itemNameTmp = GET_TC(tc)->itemName;
++GET_TC(tc)->itemName = PyUnicode_AsUTF8String (GET_TC(tc)->itemName);
++Py_DECREF(itemNameTmp);
+ #endif
+-}
+-else
+-{
+-  Py_INCREF(GET_TC(tc)->itemName);
+-}
+-PRINTMARK();
+-return 1;
++  }
++  else
++  {
++Py_INCREF(GET_TC(tc)->itemName);
++  }
++  PRINTMARK();
++  return 1;
+ }
+ 
+ static void Dict_iterEnd(JSOBJ obj, JSONTypeContext *tc)
+@@ -728,7 +743,7 @@ static void Object_beginTypeContext (JSOBJ _obj, 
JSONTypeContext *tc, JSONObject
+ return;
+   }
+   else
+-  if (PyString_Check(obj) && !PyObject_HasAttrString(obj, "__json__"))
++  if (PyString_Check(obj) && !PyHasAttrStringPreserveErr(obj, "__json__"))
+   {
+ PRINTMARK();
+ pc->PyTypeToJSON = PyStringToUTF8; tc->type = JT_UTF8;

diff --git a/dev-python/ujson/files/ujson-1.