From nobody Fri Mar 25 13:50:03 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 93C591A33D5B; Fri, 25 Mar 2022 13:50:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KQ3PT0sX1z3Qrp; Fri, 25 Mar 2022 13:50:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1LsbvHJCSjZODNv6MO8SeP4dA9iG6k9ADu0jsJD/MsA=; b=VM5CwH1eo73dLUShPR32i4le4qzus5bWMiNjbBiM2zLwz4r+/tONAZ9Xav65cEDZIg2VOm ORIwv3gjo9UESygEe8pltLzYZgT6/gypZiqyXa6ON1xKlbIMMnJsLmGr2aunm5SGXqu+YV Zkrujmx3cxPwz8Md062AhM+6gPhZ4gj9D30sVExjmcUF37rRL4qNkk1nIA1PKFvdy1kHqe 3Ay8+twFMDJu5TqMCj+QZGm9AE+oUssOY0r0RoYopf+3EpZLpKCDQeoq9MLfnbg3s2KONm mVmoBsw1f/rIdhqC9mu4oyudKdw73t/2pV/51Uar04OCuTGi0XSdc+r1Deec/Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E60755C2; Fri, 25 Mar 2022 13:50:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22PDo3vS030273; Fri, 25 Mar 2022 13:50:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22PDo3wV030270; Fri, 25 Mar 2022 13:50:03 GMT (envelope-from git) Date: Fri, 25 Mar 2022 13:50:03 GMT Message-Id: <202203251350.22PDo3wV030270@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: b088cd6d6d2d - main - devel/py-omnijson: Fix build with setuptools 58.0.0+ List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b088cd6d6d2d9319482cad7a43ceac5428546e0f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1LsbvHJCSjZODNv6MO8SeP4dA9iG6k9ADu0jsJD/MsA=; b=icfL+QH3s63x1//UnHMThG9Nc+KwEwdFaySp6Lg4a15m9Y5oSSBMNxi24FvJdnFYESoghO Z0spbOkDESOyw0jtcXbu5y2c/W2YPZRLxJAlYCSRx+1DgnZ65eQB5CGZz1jywrEQr42rZv Qli1M+jHDVwsagRWacpMZbkpKisYyvFJk/9xssv8I6VrsliDAUXcI9ZeWY86f9kCLxNhEg VBqQEFoRudk8+pr5sRhlconRRbL5IEygsBg2pyty6UON8ic2Qc8TYuryhKUsgvi4QVpVAw I8fsaUd1j9OoLLzwjrcbGBSgp0ZkCdQSL8cermTxVJWNpM6Fp4gnU8GfDSePAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648216205; a=rsa-sha256; cv=none; b=davKdb+9+Iwc3A5naWCoegJREPvy3SLr8Tjc74FPItZL59E2S8m1aPCm9eKztU1SyF3xyz gHiZP6kIfe2xrhsWR1CAV8iAeqqMEhSe7mjg16HYBPIqyhFaXTwV6jvTy1v9ITLLVBLHoc 36U6FrKO1noyY9P8XVo0rGyGGgLMigQBeBt3wC+6hWKFgcv1/AtnciyZhb0AaLI7MV7QBH QeJoxvExfVvuVrQotroQXEGPLfKbH7VwacGAtkTOgXppm0YvvcaDjwitNfabCeh5yJVthT +9jDOMM/9pUAL0nDvybR7uVAf6Ovljeif7hhyLpEJj5K87l2FNCJ73byGamGXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=b088cd6d6d2d9319482cad7a43ceac5428546e0f commit b088cd6d6d2d9319482cad7a43ceac5428546e0f Author: Po-Chuan Hsieh AuthorDate: 2022-03-25 13:32:18 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-03-25 13:38:10 +0000 devel/py-omnijson: Fix build with setuptools 58.0.0+ With hat: python --- devel/py-omnijson/files/patch-2to3 | 209 +++++++++++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) diff --git a/devel/py-omnijson/files/patch-2to3 b/devel/py-omnijson/files/patch-2to3 new file mode 100644 index 000000000000..72fcd402ce7a --- /dev/null +++ b/devel/py-omnijson/files/patch-2to3 @@ -0,0 +1,209 @@ +--- omnijson/packages/simplejson/decoder.py.orig 2011-06-19 16:43:47 UTC ++++ omnijson/packages/simplejson/decoder.py +@@ -87,8 +87,8 @@ _CONSTANTS = { + + STRINGCHUNK = re.compile(r'(.*?)(["\\\x00-\x1f])', FLAGS) + BACKSLASH = { +- '"': u'"', '\\': u'\\', '/': u'/', +- 'b': u'\b', 'f': u'\f', 'n': u'\n', 'r': u'\r', 't': u'\t', ++ '"': '"', '\\': '\\', '/': '/', ++ 'b': '\b', 'f': '\f', 'n': '\n', 'r': '\r', 't': '\t', + } + + DEFAULT_ENCODING = "utf-8" +@@ -117,8 +117,8 @@ def py_scanstring(s, end, encoding=None, strict=True, + content, terminator = chunk.groups() + # Content is contains zero or more unescaped string characters + if content: +- if not isinstance(content, unicode): +- content = unicode(content, encoding) ++ if not isinstance(content, str): ++ content = str(content, encoding) + _append(content) + # Terminator is the end of string, a literal control character, + # or a backslash denoting that an escape sequence follows +@@ -164,11 +164,11 @@ def py_scanstring(s, end, encoding=None, strict=True, + uni2 = int(esc2, 16) + uni = 0x10000 + (((uni - 0xd800) << 10) | (uni2 - 0xdc00)) + next_end += 6 +- char = unichr(uni) ++ char = chr(uni) + end = next_end + # Append the unescaped character + _append(char) +- return u''.join(chunks), end ++ return ''.join(chunks), end + + + # Use speedup if available +@@ -177,10 +177,11 @@ scanstring = c_scanstring or py_scanstring + WHITESPACE = re.compile(r'[ \t\n\r]*', FLAGS) + WHITESPACE_STR = ' \t\n\r' + +-def JSONObject((s, end), encoding, strict, scan_once, object_hook, ++def JSONObject(xxx_todo_changeme, encoding, strict, scan_once, object_hook, + object_pairs_hook, memo=None, + _w=WHITESPACE.match, _ws=WHITESPACE_STR): + # Backwards compatibility ++ (s, end) = xxx_todo_changeme + if memo is None: + memo = {} + memo_get = memo.setdefault +@@ -269,7 +270,8 @@ def JSONObject((s, end), encoding, strict, scan_once, + pairs = object_hook(pairs) + return pairs, end + +-def JSONArray((s, end), scan_once, _w=WHITESPACE.match, _ws=WHITESPACE_STR): ++def JSONArray(xxx_todo_changeme1, scan_once, _w=WHITESPACE.match, _ws=WHITESPACE_STR): ++ (s, end) = xxx_todo_changeme1 + values = [] + nextchar = s[end:end + 1] + if nextchar in _ws: +--- omnijson/packages/simplejson/encoder.py.orig 2011-06-19 16:43:47 UTC ++++ omnijson/packages/simplejson/encoder.py +@@ -39,7 +39,7 @@ def encode_basestring(s): + s = s.decode('utf-8') + def replace(match): + return ESCAPE_DCT[match.group(0)] +- return u'"' + ESCAPE.sub(replace, s) + u'"' ++ return '"' + ESCAPE.sub(replace, s) + '"' + + + def py_encode_basestring_ascii(s): +@@ -160,7 +160,7 @@ class JSONEncoder(object): + self.allow_nan = allow_nan + self.sort_keys = sort_keys + self.use_decimal = use_decimal +- if isinstance(indent, (int, long)): ++ if isinstance(indent, int): + indent = ' ' * indent + self.indent = indent + if separators is not None: +@@ -200,7 +200,7 @@ class JSONEncoder(object): + + """ + # This is for extremely simple cases and benchmarks. +- if isinstance(o, basestring): ++ if isinstance(o, str): + if isinstance(o, str): + _encoding = self.encoding + if (_encoding is not None +@@ -219,7 +219,7 @@ class JSONEncoder(object): + if self.ensure_ascii: + return ''.join(chunks) + else: +- return u''.join(chunks) ++ return ''.join(chunks) + + def iterencode(self, o, _one_shot=False): + """Encode the given object and yield each string +@@ -302,7 +302,7 @@ class JSONEncoderForHTML(JSONEncoder): + if self.ensure_ascii: + return ''.join(chunks) + else: +- return u''.join(chunks) ++ return ''.join(chunks) + + def iterencode(self, o, _one_shot=False): + chunks = super(JSONEncoderForHTML, self).iterencode(o, _one_shot) +@@ -317,10 +317,8 @@ def _make_iterencode(markers, _default, _encoder, _ind + _key_separator, _item_separator, _sort_keys, _skipkeys, _one_shot, + _use_decimal, + ## HACK: hand-optimized bytecode; turn globals into locals +- False=False, +- True=True, + ValueError=ValueError, +- basestring=basestring, ++ str=str, + Decimal=Decimal, + dict=dict, + float=float, +@@ -328,8 +326,7 @@ def _make_iterencode(markers, _default, _encoder, _ind + int=int, + isinstance=isinstance, + list=list, +- long=long, +- str=str, ++ long=int, + tuple=tuple, + ): + +@@ -357,7 +354,7 @@ def _make_iterencode(markers, _default, _encoder, _ind + first = False + else: + buf = separator +- if isinstance(value, basestring): ++ if isinstance(value, str): + yield buf + _encoder(value) + elif value is None: + yield buf + 'null' +@@ -365,7 +362,7 @@ def _make_iterencode(markers, _default, _encoder, _ind + yield buf + 'true' + elif value is False: + yield buf + 'false' +- elif isinstance(value, (int, long)): ++ elif isinstance(value, int): + yield buf + str(value) + elif isinstance(value, float): + yield buf + _floatstr(value) +@@ -408,12 +405,12 @@ def _make_iterencode(markers, _default, _encoder, _ind + item_separator = _item_separator + first = True + if _sort_keys: +- items = dct.items() ++ items = list(dct.items()) + items.sort(key=lambda kv: kv[0]) + else: +- items = dct.iteritems() ++ items = iter(dct.items()) + for key, value in items: +- if isinstance(key, basestring): ++ if isinstance(key, str): + pass + # JavaScript is weakly typed for these, so it makes sense to + # also allow them. Many encoders seem to do something like this. +@@ -425,7 +422,7 @@ def _make_iterencode(markers, _default, _encoder, _ind + key = 'false' + elif key is None: + key = 'null' +- elif isinstance(key, (int, long)): ++ elif isinstance(key, int): + key = str(key) + elif _skipkeys: + continue +@@ -437,7 +434,7 @@ def _make_iterencode(markers, _default, _encoder, _ind + yield item_separator + yield _encoder(key) + yield _key_separator +- if isinstance(value, basestring): ++ if isinstance(value, str): + yield _encoder(value) + elif value is None: + yield 'null' +@@ -445,7 +442,7 @@ def _make_iterencode(markers, _default, _encoder, _ind + yield 'true' + elif value is False: + yield 'false' +- elif isinstance(value, (int, long)): ++ elif isinstance(value, int): + yield str(value) + elif isinstance(value, float): + yield _floatstr(value) +@@ -468,7 +465,7 @@ def _make_iterencode(markers, _default, _encoder, _ind + del markers[markerid] + + def _iterencode(o, _current_indent_level): +- if isinstance(o, basestring): ++ if isinstance(o, str): + yield _encoder(o) + elif o is None: + yield 'null' +@@ -476,7 +473,7 @@ def _make_iterencode(markers, _default, _encoder, _ind + yield 'true' + elif o is False: + yield 'false' +- elif isinstance(o, (int, long)): ++ elif isinstance(o, int): + yield str(o) + elif isinstance(o, float): + yield _floatstr(o)