From nobody Fri Mar 25 13:51:02 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 5D5E01A34772; Fri, 25 Mar 2022 13:51:04 +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 4KQ3Qb5dLLz3hDt; Fri, 25 Mar 2022 13:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216264; 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=LLGHBqiqRLfwBubr5mH64h8DQJxKFZXzpx2JsiV8M3E=; b=mojrdN5S7sDrZ0+mGfR0MTydHM4u4G+MKn2Qz8/Un/wUwVK5izUeusBaKlfbBMptmsm9nC AetlxjI+tvdP8UxrsIwnEAzsgjN0y06m8ezxuTOlIXDctxN4CZZJVjh8brPbxkRImgwjw0 hWgozU35ZQ6ietUyHkS10ZMNjLiBDULA5/XeyRxaKVdS8ShoJz2ry8QVQt+SZMhag3YHtA gv9ILkgK74f6HuFd0nxFGiIZSuTnNmFJKnrNX7LAAI9oqP6NgF/p6jPqXFu7H9delyvook g1dRfWdTkJ1bY8y0FjvW/zfotz49FSWz/1sx0wptwRKg5l5k1uPuWhGmiUYjcw== 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 8507055CF; Fri, 25 Mar 2022 13:51:02 +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 22PDp2Z4037741; Fri, 25 Mar 2022 13:51:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22PDp2BH037740; Fri, 25 Mar 2022 13:51:02 GMT (envelope-from git) Date: Fri, 25 Mar 2022 13:51:02 GMT Message-Id: <202203251351.22PDp2BH037740@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: f4f3802f3e40 - main - sysutils/py-mitogen: 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: f4f3802f3e409bf54d5fbb02d6de7566f42c03ae Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216264; 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=LLGHBqiqRLfwBubr5mH64h8DQJxKFZXzpx2JsiV8M3E=; b=MkT2nh6RcjhmwtfxKriR7YjGKxiPT53n/tRoVovguS5WVxixnDb97gmlhVgp9bxjANDkVL dn45S4J9mp+f3Cxzd+CfymS3aq958p3+wg5qfvTMDX3SIKjRkc5zDA26hwy9R4TuXm8C7A 7gu16nxbKesHlS3Y1j7X3XnsO58RKVOFCONsN1MZPZLWuzn+lNLv5UAlT5Xf4Mes76UWQu zjjyYA5A3zKSllaJV5MpiO/og27cN6egtGSq1M9IT0WekLVzNl0ILjtlx8OD9CCV1rn59G yk+e50i0yxkXxrgOReD0DGNCS1h3iS5LzCuLVxkyych0PlhnSV93NtwX5kmN0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648216264; a=rsa-sha256; cv=none; b=eWOwVVEaXt83aMEhv0Ej8vSFSst0IwcduXcK/hY0PSl5YZiblbh5POHCKIVUU1iQzcjy7s Cv5OlB49fXy2kXnh0gDhlbSZaMZEEjuls1GN+gao2zQaevDQa5wbja15zGQ8jFsvcDoB/Q Aj1ElBZI0ePt7Op+wyWu6LRS5vw21pfMgDtuuEtnJamDVx9KaNx9DST6svqDuHnqrIdU92 x08LXitQB1cwXS8lD1CoQgl/pMvUsUDtFsjGohdupdtxS0eE0n9avBIcX9zZx4QQvIeuST R4n50cRQREcFuF0VHZlJUTGXMLqGgByzzLSz14PsUmNMIbdIM1IGFgaQYx32og== 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=f4f3802f3e409bf54d5fbb02d6de7566f42c03ae commit f4f3802f3e409bf54d5fbb02d6de7566f42c03ae Author: Po-Chuan Hsieh AuthorDate: 2022-03-25 13:34:33 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-03-25 13:38:22 +0000 sysutils/py-mitogen: Fix build with setuptools 58.0.0+ With hat: python --- sysutils/py-mitogen/files/patch-2to3 | 169 +++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) diff --git a/sysutils/py-mitogen/files/patch-2to3 b/sysutils/py-mitogen/files/patch-2to3 new file mode 100644 index 000000000000..5a2522d2a281 --- /dev/null +++ b/sysutils/py-mitogen/files/patch-2to3 @@ -0,0 +1,169 @@ +--- ansible_mitogen/compat/simplejson/decoder.py.orig 2019-11-02 17:59:13 UTC ++++ ansible_mitogen/compat/simplejson/decoder.py +@@ -56,8 +56,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" +@@ -85,8 +85,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 +@@ -132,11 +132,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 +@@ -145,7 +145,8 @@ 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, _w=WHITESPACE.match, _ws=WHITESPACE_STR): ++def JSONObject(xxx_todo_changeme, encoding, strict, scan_once, object_hook, _w=WHITESPACE.match, _ws=WHITESPACE_STR): ++ (s, end) = xxx_todo_changeme + pairs = {} + # Use a slice to prevent IndexError from being raised, the following + # check will raise a more specific ValueError if the string is empty +@@ -220,7 +221,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: +--- ansible_mitogen/compat/simplejson/encoder.py.orig 2019-11-02 17:59:13 UTC ++++ ansible_mitogen/compat/simplejson/encoder.py +@@ -184,7 +184,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 +@@ -261,18 +261,15 @@ class JSONEncoder(object): + + def _make_iterencode(markers, _default, _encoder, _indent, _floatstr, _key_separator, _item_separator, _sort_keys, _skipkeys, _one_shot, + ## HACK: hand-optimized bytecode; turn globals into locals +- False=False, +- True=True, + ValueError=ValueError, +- basestring=basestring, ++ str=str, + dict=dict, + float=float, + id=id, + int=int, + isinstance=isinstance, + list=list, +- long=long, +- str=str, ++ long=int, + tuple=tuple, + ): + +@@ -300,7 +297,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' +@@ -308,7 +305,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) +@@ -349,12 +346,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. +@@ -366,7 +363,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 +@@ -378,7 +375,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' +@@ -386,7 +383,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) +@@ -407,7 +404,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' +@@ -415,7 +412,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)