From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 finch.gentoo.org (Postfix) with ESMTPS id 0429D1580EB for ; Tue, 27 May 2025 08:28:19 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (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) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id D1ACA34315E for ; Tue, 27 May 2025 08:28:18 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id EAD3711047D; Tue, 27 May 2025 08:28:15 +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 bobolink.gentoo.org (Postfix) with ESMTPS id E272911047D for ; Tue, 27 May 2025 08:28:15 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 93626343090 for ; Tue, 27 May 2025 08:28:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 08B8528D2 for ; Tue, 27 May 2025 08:28:14 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1748334455.963796d3f6c44eebd695119f6fd80f93e99b6d3b.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/protobuf/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/protobuf/files/protobuf-3.20.3-python311.patch dev-python/protobuf/files/protobuf-4.22.5-c++-17.patch dev-python/protobuf/files/protobuf-4.22.5-python.patch X-VCS-Directories: dev-python/protobuf/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 963796d3f6c44eebd695119f6fd80f93e99b6d3b X-VCS-Branch: master Date: Tue, 27 May 2025 08:28:14 +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: a70bf59e-a1f1-4bf1-bb6f-63d1d7242a41 X-Archives-Hash: 8dbc1d3fe9d19244dd11e5c3b9a45cff commit: 963796d3f6c44eebd695119f6fd80f93e99b6d3b Author: Michael Mair-Keimberger levelnine at> AuthorDate: Mon May 26 16:26:30 2025 +0000 Commit: Sam James gentoo org> CommitDate: Tue May 27 08:27:35 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=963796d3 dev-python/protobuf: remove unused patch(es) Signed-off-by: Michael Mair-Keimberger levelnine.at> Part-of: https://github.com/gentoo/gentoo/pull/42268 Closes: https://github.com/gentoo/gentoo/pull/42268 Signed-off-by: Sam James gentoo.org> .../protobuf/files/protobuf-3.20.3-python311.patch | 132 --------------------- .../protobuf/files/protobuf-4.22.5-c++-17.patch | 13 -- .../protobuf/files/protobuf-4.22.5-python.patch | 21 ---- 3 files changed, 166 deletions(-) diff --git a/dev-python/protobuf/files/protobuf-3.20.3-python311.patch b/dev-python/protobuf/files/protobuf-3.20.3-python311.patch deleted file mode 100644 index b9aca40776c5..000000000000 --- a/dev-python/protobuf/files/protobuf-3.20.3-python311.patch +++ /dev/null @@ -1,132 +0,0 @@ -https://github.com/protocolbuffers/protobuf/commit/2206b63c4649cf2e8a06b66c9191c8ef862ca519 -https://github.com/protocolbuffers/protobuf/pull/10403 -https://github.com/protocolbuffers/protobuf/issues/10305 -https://bugs.gentoo.org/844184 - -From da973aff2adab60a9e516d3202c111dbdde1a50f Mon Sep 17 00:00:00 2001 -From: Alexander Shadchin -Date: Sun, 14 Aug 2022 21:13:49 +0300 -Subject: [PATCH] Fix build with Python 3.11 - -The PyFrameObject structure members have been removed from the public C API. ---- a/google/protobuf/pyext/descriptor.cc -+++ b/google/protobuf/pyext/descriptor.cc -@@ -58,6 +58,37 @@ - : 0) \ - : PyBytes_AsStringAndSize(ob, (charpp), (sizep))) - -+#if PY_VERSION_HEX < 0x030900B1 && !defined(PYPY_VERSION) -+static PyCodeObject* PyFrame_GetCode(PyFrameObject *frame) -+{ -+ Py_INCREF(frame->f_code); -+ return frame->f_code; -+} -+ -+static PyFrameObject* PyFrame_GetBack(PyFrameObject *frame) -+{ -+ Py_XINCREF(frame->f_back); -+ return frame->f_back; -+} -+#endif -+ -+#if PY_VERSION_HEX < 0x030B00A7 && !defined(PYPY_VERSION) -+static PyObject* PyFrame_GetLocals(PyFrameObject *frame) -+{ -+ if (PyFrame_FastToLocalsWithError(frame) < 0) { -+ return NULL; -+ } -+ Py_INCREF(frame->f_locals); -+ return frame->f_locals; -+} -+ -+static PyObject* PyFrame_GetGlobals(PyFrameObject *frame) -+{ -+ Py_INCREF(frame->f_globals); -+ return frame->f_globals; -+} -+#endif -+ - namespace google { - namespace protobuf { - namespace python { -@@ -96,48 +127,66 @@ bool _CalledFromGeneratedFile(int stacklevel) { - // This check is not critical and is somewhat difficult to implement correctly - // in PyPy. - PyFrameObject* frame = PyEval_GetFrame(); -+ PyCodeObject* frame_code = nullptr; -+ PyObject* frame_globals = nullptr; -+ PyObject* frame_locals = nullptr; -+ bool result = false; -+ - if (frame == nullptr) { -- return false; -+ goto exit; - } -+ Py_INCREF(frame); - while (stacklevel-- > 0) { -- frame = frame->f_back; -+ PyFrameObject* next_frame = PyFrame_GetBack(frame); -+ Py_DECREF(frame); -+ frame = next_frame; - if (frame == nullptr) { -- return false; -+ goto exit; - } - } - -- if (frame->f_code->co_filename == nullptr) { -- return false; -+ frame_code = PyFrame_GetCode(frame); -+ if (frame_code->co_filename == nullptr) { -+ goto exit; - } - char* filename; - Py_ssize_t filename_size; -- if (PyString_AsStringAndSize(frame->f_code->co_filename, -+ if (PyString_AsStringAndSize(frame_code->co_filename, - &filename, &filename_size) < 0) { - // filename is not a string. - PyErr_Clear(); -- return false; -+ goto exit; - } - if ((filename_size < 3) || - (strcmp(&filename[filename_size - 3], ".py") != 0)) { - // Cython's stack does not have .py file name and is not at global module - // scope. -- return true; -+ result = true; -+ goto exit; - } - if (filename_size < 7) { - // filename is too short. -- return false; -+ goto exit; - } - if (strcmp(&filename[filename_size - 7], "_pb2.py") != 0) { - // Filename is not ending with _pb2. -- return false; -+ goto exit; - } - -- if (frame->f_globals != frame->f_locals) { -+ frame_globals = PyFrame_GetGlobals(frame); -+ frame_locals = PyFrame_GetLocals(frame); -+ if (frame_globals != frame_locals) { - // Not at global module scope -- return false; -+ goto exit; - } - #endif -- return true; -+ result = true; -+exit: -+ Py_XDECREF(frame_globals); -+ Py_XDECREF(frame_locals); -+ Py_XDECREF(frame_code); -+ Py_XDECREF(frame); -+ return result; - } - - // If the calling code is not a _pb2.py file, raise AttributeError. - diff --git a/dev-python/protobuf/files/protobuf-4.22.5-c++-17.patch b/dev-python/protobuf/files/protobuf-4.22.5-c++-17.patch deleted file mode 100644 index 3ca6a5776d04..000000000000 --- a/dev-python/protobuf/files/protobuf-4.22.5-c++-17.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/python/setup.py b/python/setup.py -index e65631013..8a6cbe59a 100755 ---- a/python/setup.py -+++ b/python/setup.py -@@ -370,7 +370,7 @@ if __name__ == '__main__': - extra_compile_args.append('-Wno-invalid-offsetof') - extra_compile_args.append('-Wno-sign-compare') - extra_compile_args.append('-Wno-unused-variable') -- extra_compile_args.append('-std=c++14') -+ extra_compile_args.append('-std=c++17') - - if sys.platform == 'darwin': - extra_compile_args.append('-Wno-shorten-64-to-32') diff --git a/dev-python/protobuf/files/protobuf-4.22.5-python.patch b/dev-python/protobuf/files/protobuf-4.22.5-python.patch deleted file mode 100644 index 65cb22d5f653..000000000000 --- a/dev-python/protobuf/files/protobuf-4.22.5-python.patch +++ /dev/null @@ -1,21 +0,0 @@ -See also https://github.com/protocolbuffers/protobuf/pull/9098 ---- a/google/protobuf/internal/json_format_test.py -+++ b/google/protobuf/internal/json_format_test.py -@@ -1060,7 +1060,7 @@ class JsonFormatTest(JsonFormatBase): - def testInvalidTimestamp(self): - message = json_format_proto3_pb2.TestTimestamp() - text = '{"value": "10000-01-01T00:00:00.00Z"}' -- self.assertRaisesRegexp( -+ self.assertRaisesRegex( - json_format.ParseError, 'Failed to parse value field: ' - 'time data \'10000-01-01T00:00:00\' does not match' - ' format \'%Y-%m-%dT%H:%M:%S\' at TestTimestamp.value.', -@@ -1097,7 +1097,7 @@ class JsonFormatTest(JsonFormatBase): - def testInvalidOneof(self): - message = json_format_proto3_pb2.TestOneof() - text = '{"oneofInt32Value": 1, "oneofStringValue": "2"}' -- self.assertRaisesRegexp( -+ self.assertRaisesRegex( - json_format.ParseError, 'Message type "proto3.TestOneof"' - ' should not have multiple "oneof_value" oneof fields at "TestOneof".', - json_format.Parse, text, message)