From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5B3BB158089 for ; Wed, 13 Sep 2023 16:39:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8DB042BC015; Wed, 13 Sep 2023 16:39:02 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 672122BC015 for ; Wed, 13 Sep 2023 16:39:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5DD9B335C65 for ; Wed, 13 Sep 2023 16:39:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0C48011A2 for ; Wed, 13 Sep 2023 16:39:00 +0000 (UTC) From: "Patrick McLean" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrick McLean" Message-ID: <1694623120.33c8cbf635f82a0789e5baa1d89e1f95da26a4bc.chutzpah@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/yq/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-misc/yq/files/yq-3.1.1-tomli.patch X-VCS-Directories: app-misc/yq/files/ X-VCS-Committer: chutzpah X-VCS-Committer-Name: Patrick McLean X-VCS-Revision: 33c8cbf635f82a0789e5baa1d89e1f95da26a4bc X-VCS-Branch: master Date: Wed, 13 Sep 2023 16:39:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c2441014-72a4-4b04-8f0f-6ef766b37714 X-Archives-Hash: f1eba2bc1fd992a2ce128b6707f037af commit: 33c8cbf635f82a0789e5baa1d89e1f95da26a4bc Author: Michael Mair-Keimberger levelnine at> AuthorDate: Wed Sep 13 12:18:39 2023 +0000 Commit: Patrick McLean gentoo org> CommitDate: Wed Sep 13 16:38:40 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33c8cbf6 app-misc/yq: remove unused patch Signed-off-by: Michael Mair-Keimberger levelnine.at> Closes: https://github.com/gentoo/gentoo/pull/32751 Signed-off-by: Patrick McLean gentoo.org> app-misc/yq/files/yq-3.1.1-tomli.patch | 80 ---------------------------------- 1 file changed, 80 deletions(-) diff --git a/app-misc/yq/files/yq-3.1.1-tomli.patch b/app-misc/yq/files/yq-3.1.1-tomli.patch deleted file mode 100644 index b4ef5ef3dfb9..000000000000 --- a/app-misc/yq/files/yq-3.1.1-tomli.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff --git a/README.rst b/README.rst -index 69d77e1..237b89e 100644 ---- a/README.rst -+++ b/README.rst -@@ -109,7 +109,9 @@ the ``xq --xml-output``/``xq -x`` option. Multiple XML documents can be passed i - TOML support - ------------ - ``yq`` supports `TOML `_ as well. The ``yq`` package installs an executable, ``tomlq``, which uses the --`toml library `_ to transcode TOML to JSON, then pipes it to ``jq``. Roundtrip transcoding -+`tomllib module ` or `tomli library -+`_ to transcode TOML to JSON, then pipes it to ``jq``. Transcoding to TOML uses the -+`tomli-w = 5.3.1", - "xmltodict >= 0.11.0", -- "toml >= 0.10.0", -+ "tomli >= 1.2.3; python_version < '3.11'", -+ "tomli-w", - "argcomplete >= 1.8.1", - ], - extras_require={ -diff --git a/yq/__init__.py b/yq/__init__.py -index 0ccb8e8..88da1d7 100644 ---- a/yq/__init__.py -+++ b/yq/__init__.py -@@ -246,9 +246,12 @@ def yq( - json.dump(doc, json_buffer, cls=JSONDateTimeEncoder) - json_buffer.write("\n") - elif input_format == "toml": -- import toml -+ if sys.version_info >= (3, 11): -+ import tomllib -+ else: -+ import tomli as tomllib - -- doc = toml.load(input_stream) # type: ignore -+ doc = tomllib.loads(input_stream.read()) # type: ignore - json.dump(doc, json_buffer, cls=JSONDateTimeEncoder) - json_buffer.write("\n") - else: -@@ -295,13 +298,13 @@ def yq( - raise - output_stream.write(b"\n" if sys.version_info < (3, 0) else "\n") - elif output_format == "toml": -- import toml -+ import tomli_w - - for doc in decode_docs(jq_out, json_decoder): - if not isinstance(doc, dict): - msg = "{}: Error converting JSON to TOML: cannot represent non-object types at top level." - exit_func(msg.format(program_name)) -- toml.dump(doc, output_stream) -+ output_stream.write(tomli_w.dumps(doc)) - else: - if input_format == "yaml": - loader_class = get_loader( -@@ -327,10 +330,13 @@ def yq( - ) - jq.stdin.write("\n") # type: ignore - elif input_format == "toml": -- import toml -+ if sys.version_info >= (3, 11): -+ import tomllib -+ else: -+ import tomli as tomllib - - for input_stream in input_streams: -- json.dump(toml.load(input_stream), jq.stdin, cls=JSONDateTimeEncoder) # type: ignore -+ json.dump(tomllib.loads(input_stream.read()), jq.stdin, cls=JSONDateTimeEncoder) # type: ignore - jq.stdin.write("\n") # type: ignore - else: - raise Exception("Unknown input format")