summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-devtools/python/python
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-31 06:25:51 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-09-06 07:44:12 -0400
commitff075f6ee795a590b244d70a90cc312ba1f2d83d (patch)
treea617790bdbfdeef960665ba0242e1f0c93e5301a /meta-phosphor/common/recipes-devtools/python/python
parent3e4da38c127bb7e7641adc2fc41f4c33744cb918 (diff)
downloadtalos-openbmc-ff075f6ee795a590b244d70a90cc312ba1f2d83d.tar.gz
talos-openbmc-ff075f6ee795a590b244d70a90cc312ba1f2d83d.zip
meta-phosphor: Move layer content from common/
Adopt a more conventional directory hierarchy. meta-phosphor is still a _long_ way from suitable for hosting on yoctoproject.org but things like this don't help. (From meta-phosphor rev: 471cfcefa74b8c7ceb704cb670e6d915cf27c63b) Change-Id: I3f106b2f6cdc6cec734be28a6090800546f362eb Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/common/recipes-devtools/python/python')
-rw-r--r--meta-phosphor/common/recipes-devtools/python/python/0001-json-Use-int-long.__str__-to-convert-subclasses.patch128
1 files changed, 0 insertions, 128 deletions
diff --git a/meta-phosphor/common/recipes-devtools/python/python/0001-json-Use-int-long.__str__-to-convert-subclasses.patch b/meta-phosphor/common/recipes-devtools/python/python/0001-json-Use-int-long.__str__-to-convert-subclasses.patch
deleted file mode 100644
index 26669d848..000000000
--- a/meta-phosphor/common/recipes-devtools/python/python/0001-json-Use-int-long.__str__-to-convert-subclasses.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From b002fd4b884b5f8cd3f429ea2002dd19e91d1d91 Mon Sep 17 00:00:00 2001
-From: Brad Bishop <bradleyb@fuzziesquirrel.com>
-Date: Thu, 7 Jun 2018 09:18:01 -0400
-Subject: [PATCH] json: Use int/long.__str__ to convert subclasses
-
-Based on changes that went into 3.x:
-
-e0805cf10ea84b44a13ad5649267edba7cb83ee9
-a4998a70416c27730e75c0a4225ee2c3552b1618
----
- Lib/json/encoder.py | 26 ++++++++++++++++++--------
- Modules/_json.c | 21 +++++++++++++++++----
- 2 files changed, 35 insertions(+), 12 deletions(-)
-
-diff --git a/Lib/json/encoder.py b/Lib/json/encoder.py
-index 97ffe8e8a2..3156682fdd 100644
---- a/Lib/json/encoder.py
-+++ b/Lib/json/encoder.py
-@@ -283,6 +283,8 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
- long=long,
- str=str,
- tuple=tuple,
-+ _intstr=int.__str__,
-+ _longstr=long.__str__,
- ):
-
- def _iterencode_list(lst, _current_indent_level):
-@@ -317,8 +319,10 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
- yield buf + 'true'
- elif value is False:
- yield buf + 'false'
-- elif isinstance(value, (int, long)):
-- yield buf + str(value)
-+ elif isinstance(value, int):
-+ yield buf + _intstr(value)
-+ elif isinstance(value, long):
-+ yield buf + _longstr(value)
- elif isinstance(value, float):
- yield buf + _floatstr(value)
- else:
-@@ -374,8 +378,10 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
- key = 'false'
- elif key is None:
- key = 'null'
-- elif isinstance(key, (int, long)):
-- key = str(key)
-+ elif isinstance(key, int):
-+ key = _intstr(key)
-+ elif isinstance(key, long):
-+ key = _longstr(key)
- elif _skipkeys:
- continue
- else:
-@@ -394,8 +400,10 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
- yield 'true'
- elif value is False:
- yield 'false'
-- elif isinstance(value, (int, long)):
-- yield str(value)
-+ elif isinstance(value, int):
-+ yield _intstr(value)
-+ elif isinstance(value, long):
-+ yield _longstr(value)
- elif isinstance(value, float):
- yield _floatstr(value)
- else:
-@@ -423,8 +431,10 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
- yield 'true'
- elif o is False:
- yield 'false'
-- elif isinstance(o, (int, long)):
-- yield str(o)
-+ elif isinstance(o, long):
-+ yield _longstr(o)
-+ elif isinstance(o, int):
-+ yield _intstr(o)
- elif isinstance(o, float):
- yield _floatstr(o)
- elif isinstance(o, (list, tuple)):
-diff --git a/Modules/_json.c b/Modules/_json.c
-index 39ec467b09..f429738145 100644
---- a/Modules/_json.c
-+++ b/Modules/_json.c
-@@ -1981,12 +1981,19 @@ encoder_listencode_obj(PyEncoderObject *s, PyObject *rval, PyObject *obj, Py_ssi
- return -1;
- return _steal_list_append(rval, encoded);
- }
-- else if (PyInt_Check(obj) || PyLong_Check(obj)) {
-- PyObject *encoded = PyObject_Str(obj);
-+ else if (PyLong_Check(obj)) {
-+ PyObject *encoded = PyLong_Type.tp_str(obj);
- if (encoded == NULL)
- return -1;
- return _steal_list_append(rval, encoded);
- }
-+ else if (PyInt_Check(obj)) {
-+ PyObject *encoded = PyInt_Type.tp_str(obj);
-+ if (encoded == NULL)
-+ return -1;
-+ return _steal_list_append(rval, encoded);
-+ }
-+
- else if (PyFloat_Check(obj)) {
- PyObject *encoded = encoder_encode_float(s, obj);
- if (encoded == NULL)
-@@ -2131,11 +2138,17 @@ encoder_listencode_dict(PyEncoderObject *s, PyObject *rval, PyObject *dct, Py_ss
- if (kstr == NULL)
- goto bail;
- }
-- else if (PyInt_Check(key) || PyLong_Check(key)) {
-- kstr = PyObject_Str(key);
-+ else if (PyLong_Check(key)) {
-+ kstr = PyLong_Type.tp_str(key);
- if (kstr == NULL)
- goto bail;
- }
-+ else if (PyInt_Check(key)) {
-+ kstr = PyInt_Type.tp_str(key);
-+ if (kstr == NULL)
-+ goto bail;
-+ }
-+
- else if (key == Py_True || key == Py_False || key == Py_None) {
- kstr = _encoded_const(key);
- if (kstr == NULL)
---
-2.14.3
-
OpenPOWER on IntegriCloud