public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/protobuf-python/, dev-python/protobuf-python/files/
@ 2018-04-26 15:14 Mike Gilbert
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Gilbert @ 2018-04-26 15:14 UTC (permalink / raw
  To: gentoo-commits

commit:     9a5682c3a38b987fe3ff3116cf3e5aa26e9a56b7
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Wed Apr 25 17:57:54 2018 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Apr 26 15:12:15 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a5682c3

dev-python/protobuf-python: Fix google.protobuf.pyext._message.MessageMeta.

Closes: https://bugs.gentoo.org/651780

 ...oogle.protobuf.pyext._message.MessageMeta.patch | 26 ++++++++++++++++++++++
 ....5.2.ebuild => protobuf-python-3.5.2-r1.ebuild} |  5 +++++
 2 files changed, 31 insertions(+)

diff --git a/dev-python/protobuf-python/files/protobuf-python-3.5.2-google.protobuf.pyext._message.MessageMeta.patch b/dev-python/protobuf-python/files/protobuf-python-3.5.2-google.protobuf.pyext._message.MessageMeta.patch
new file mode 100644
index 00000000000..d1e1d745ab7
--- /dev/null
+++ b/dev-python/protobuf-python/files/protobuf-python-3.5.2-google.protobuf.pyext._message.MessageMeta.patch
@@ -0,0 +1,26 @@
+https://github.com/google/protobuf/pull/4365
+
+--- /python/google/protobuf/pyext/message.cc
++++ /python/google/protobuf/pyext/message.cc
+@@ -402,12 +402,6 @@
+   return result.release();
+ }
+ 
+-static PyGetSetDef Getters[] = {
+-  {"_extensions_by_name", (getter)GetExtensionsByName, NULL},
+-  {"_extensions_by_number", (getter)GetExtensionsByNumber, NULL},
+-  {NULL}
+-};
+-
+ }  // namespace message_meta
+ 
+ PyTypeObject CMessageClass_Type = {
+@@ -440,7 +434,7 @@
+   0,                                   // tp_iternext
+   0,                                   // tp_methods
+   0,                                   // tp_members
+-  message_meta::Getters,               // tp_getset
++  0,                                   // tp_getset
+   0,                                   // tp_base
+   0,                                   // tp_dict
+   0,                                   // tp_descr_get

diff --git a/dev-python/protobuf-python/protobuf-python-3.5.2.ebuild b/dev-python/protobuf-python/protobuf-python-3.5.2-r1.ebuild
similarity index 89%
rename from dev-python/protobuf-python/protobuf-python-3.5.2.ebuild
rename to dev-python/protobuf-python/protobuf-python-3.5.2-r1.ebuild
index aaf563b424f..db40a5b37f8 100644
--- a/dev-python/protobuf-python/protobuf-python-3.5.2.ebuild
+++ b/dev-python/protobuf-python/protobuf-python-3.5.2-r1.ebuild
@@ -25,6 +25,11 @@ RDEPEND="${DEPEND}
 
 S="${WORKDIR}/protobuf-${PV}/python"
 
+python_prepare_all() {
+	eapply -p2 "${FILESDIR}/${P}-google.protobuf.pyext._message.MessageMeta.patch"
+	distutils-r1_python_prepare_all
+}
+
 python_configure_all() {
 	mydistutilsargs=(--cpp_implementation)
 }


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/protobuf-python/, dev-python/protobuf-python/files/
@ 2018-10-02 20:08 Mike Gilbert
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Gilbert @ 2018-10-02 20:08 UTC (permalink / raw
  To: gentoo-commits

commit:     5db8c4e80d83e54c8038edb19686980f523ff711
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Tue Oct  2 19:42:01 2018 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Oct  2 20:07:26 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5db8c4e8

dev-python/protobuf-python: Update homepage.

Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 ...uf-python-3.5.2-google.protobuf.pyext._message.MessageMeta.patch | 2 +-
 dev-python/protobuf-python/metadata.xml                             | 2 +-
 dev-python/protobuf-python/protobuf-python-3.5.1.1.ebuild           | 6 +++---
 dev-python/protobuf-python/protobuf-python-3.5.2-r1.ebuild          | 6 +++---
 dev-python/protobuf-python/protobuf-python-3.6.0.1.ebuild           | 6 +++---
 dev-python/protobuf-python/protobuf-python-3.6.1.ebuild             | 6 +++---
 6 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/dev-python/protobuf-python/files/protobuf-python-3.5.2-google.protobuf.pyext._message.MessageMeta.patch b/dev-python/protobuf-python/files/protobuf-python-3.5.2-google.protobuf.pyext._message.MessageMeta.patch
index d1e1d745ab7..c29da40ca26 100644
--- a/dev-python/protobuf-python/files/protobuf-python-3.5.2-google.protobuf.pyext._message.MessageMeta.patch
+++ b/dev-python/protobuf-python/files/protobuf-python-3.5.2-google.protobuf.pyext._message.MessageMeta.patch
@@ -1,4 +1,4 @@
-https://github.com/google/protobuf/pull/4365
+https://github.com/protocolbuffers/protobuf/pull/4365
 
 --- /python/google/protobuf/pyext/message.cc
 +++ /python/google/protobuf/pyext/message.cc

diff --git a/dev-python/protobuf-python/metadata.xml b/dev-python/protobuf-python/metadata.xml
index 51258826e2f..0b20fcb3732 100644
--- a/dev-python/protobuf-python/metadata.xml
+++ b/dev-python/protobuf-python/metadata.xml
@@ -17,6 +17,6 @@
 		<subslots>Soname version number of Protobuf</subslots>
 	</slots>
 	<upstream>
-		<remote-id type="github">google/protobuf</remote-id>
+		<remote-id type="github">protocolbuffers/protobuf</remote-id>
 	</upstream>
 </pkgmetadata>

diff --git a/dev-python/protobuf-python/protobuf-python-3.5.1.1.ebuild b/dev-python/protobuf-python/protobuf-python-3.5.1.1.ebuild
index 7a43298fb9c..4dfa6381d43 100644
--- a/dev-python/protobuf-python/protobuf-python-3.5.1.1.ebuild
+++ b/dev-python/protobuf-python/protobuf-python-3.5.1.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -8,8 +8,8 @@ PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
 inherit distutils-r1
 
 DESCRIPTION="Google's Protocol Buffers - Python bindings"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/google/protobuf"
-SRC_URI="https://github.com/google/protobuf/archive/v${PV}.tar.gz -> protobuf-${PV}.tar.gz"
+HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
+SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> protobuf-${PV}.tar.gz"
 
 LICENSE="BSD"
 SLOT="0/15"

diff --git a/dev-python/protobuf-python/protobuf-python-3.5.2-r1.ebuild b/dev-python/protobuf-python/protobuf-python-3.5.2-r1.ebuild
index 76198330da1..7a1fc1c5c3c 100644
--- a/dev-python/protobuf-python/protobuf-python-3.5.2-r1.ebuild
+++ b/dev-python/protobuf-python/protobuf-python-3.5.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -7,8 +7,8 @@ PYTHON_COMPAT=(python2_7 python3_{4,5,6})
 inherit distutils-r1
 
 DESCRIPTION="Google's Protocol Buffers - Python bindings"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/google/protobuf"
-SRC_URI="https://github.com/google/protobuf/archive/v${PV}.tar.gz -> protobuf-${PV}.tar.gz"
+HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
+SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> protobuf-${PV}.tar.gz"
 
 LICENSE="BSD"
 SLOT="0/15"

diff --git a/dev-python/protobuf-python/protobuf-python-3.6.0.1.ebuild b/dev-python/protobuf-python/protobuf-python-3.6.0.1.ebuild
index 9b40e02cbb3..d625650122c 100644
--- a/dev-python/protobuf-python/protobuf-python-3.6.0.1.ebuild
+++ b/dev-python/protobuf-python/protobuf-python-3.6.0.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -7,8 +7,8 @@ PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6})
 inherit distutils-r1
 
 DESCRIPTION="Google's Protocol Buffers - Python bindings"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/google/protobuf"
-SRC_URI="https://github.com/google/protobuf/archive/v${PV}.tar.gz -> protobuf-${PV}.tar.gz"
+HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
+SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> protobuf-${PV}.tar.gz"
 
 LICENSE="BSD"
 SLOT="0/16"

diff --git a/dev-python/protobuf-python/protobuf-python-3.6.1.ebuild b/dev-python/protobuf-python/protobuf-python-3.6.1.ebuild
index 7129c197b7e..d2f29ce98df 100644
--- a/dev-python/protobuf-python/protobuf-python-3.6.1.ebuild
+++ b/dev-python/protobuf-python/protobuf-python-3.6.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -7,8 +7,8 @@ PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6})
 inherit distutils-r1
 
 DESCRIPTION="Google's Protocol Buffers - Python bindings"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/google/protobuf"
-SRC_URI="https://github.com/google/protobuf/archive/v${PV}.tar.gz -> protobuf-${PV}.tar.gz"
+HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
+SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> protobuf-${PV}.tar.gz"
 
 LICENSE="BSD"
 SLOT="0/17"


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/protobuf-python/, dev-python/protobuf-python/files/
@ 2021-11-09 11:51 Arthur Zamarin
  0 siblings, 0 replies; 7+ messages in thread
From: Arthur Zamarin @ 2021-11-09 11:51 UTC (permalink / raw
  To: gentoo-commits

commit:     4772b88723f4162442835efabe7f886d58e10f39
Author:     Miezhiko <Miezhiko <AT> gmail <DOT> com>
AuthorDate: Tue Nov  9 09:13:10 2021 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Tue Nov  9 11:51:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4772b887

dev-python/protobuf-python: add 3.19.1

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Contributed-by: Miezhiko <Miezhiko <AT> gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-python/protobuf-python/Manifest                |  1 +
 ...protobuf.pyext._message.PyUnknownFieldRef.patch | 22 +++++++++
 .../protobuf-python/protobuf-python-3.19.1.ebuild  | 52 ++++++++++++++++++++++
 3 files changed, 75 insertions(+)

diff --git a/dev-python/protobuf-python/Manifest b/dev-python/protobuf-python/Manifest
index 87ea4747892..e4219af26c3 100644
--- a/dev-python/protobuf-python/Manifest
+++ b/dev-python/protobuf-python/Manifest
@@ -4,3 +4,4 @@ DIST protobuf-3.17.0.tar.gz 5185780 BLAKE2B a168619df72cdf097c7ddfd50aca96a2101b
 DIST protobuf-3.17.1.tar.gz 5192666 BLAKE2B 7f912db7e0835aaa42628fcf564a5666e2cbfa021bb35638a5eec53c3c457f1e747225dea54f732b7239a1520febca9bc20c824b1938f100796caa3ac2133bc1 SHA512 5a18aa3c1dab040dc6d22310a8503241081106acf7ca89079d7b416533d7c2cdd47719dc9023e6bc26969f0f1c796550260a04034a403c69752f6a3a7a651bb8
 DIST protobuf-3.17.2.tar.gz 5192779 BLAKE2B 97f9561848e70b8d26ebcc7fc4fa8da51c4b8267efbe1d2d386c2785308e7ba7edc05f1b3863c274dc8838866d58b58509606d72c51a22b956d1d528584c4c95 SHA512 b3e7ad50ed772668df70a3a20ad1af13a5e82f23b109e4fecd34e6a74947bed300963c9f084907fbfafe28fc18365cde7df1975e2ff9538d2f5a3d2b458bca98
 DIST protobuf-3.17.3.tar.gz 5235236 BLAKE2B 2495e678c8f9436d4e5a30ccee8b6226125d418ac7ecf7df20b078a1a16c221cbccab7d846dcd56a90220c106617fa75c410a21b62612fedec378cd7e8571350 SHA512 b4030b4474cc5fb5a62501200725dd488e6e66e3ced4ed12ab4ee029fcfed305e92ec966adafbdd343afffd186908163849422b95eaa500e7e741ac325d01d12
+DIST protobuf-3.19.1.tar.gz 5291573 BLAKE2B a34f1a7cf99ecb6cb8a26bc858de6273bfd26aa9be1e89e48c16cb5df0f1e9576479344c8250017238dbac0d0c4ac33001125b5fc622cb64ed6b91023198b03a SHA512 f1271f5159a7be363a5f60ce4921dfea68a8468d66808330bacaeaa1cb7f652d045ab080b5d82816a6fd4e6d7d7fe79aaa6c8d66d81692721d36ce3bbf619f31

diff --git a/dev-python/protobuf-python/files/protobuf-python-3.19.1-google.protobuf.pyext._message.PyUnknownFieldRef.patch b/dev-python/protobuf-python/files/protobuf-python-3.19.1-google.protobuf.pyext._message.PyUnknownFieldRef.patch
new file mode 100644
index 00000000000..a03ad98b455
--- /dev/null
+++ b/dev-python/protobuf-python/files/protobuf-python-3.19.1-google.protobuf.pyext._message.PyUnknownFieldRef.patch
@@ -0,0 +1,22 @@
+https://github.com/protocolbuffers/protobuf/issues/6205
+https://github.com/protocolbuffers/protobuf/pull/7016
+
+--- a/google/protobuf/pyext/unknown_fields.cc
++++ b/google/protobuf/pyext/unknown_fields.cc
+@@ -274,13 +274,13 @@
+   PyObject* data = NULL;
+   switch (field->type()) {
+     case UnknownField::TYPE_VARINT:
+-      data = PyLong_FromLong(field->varint());
++      data = PyLong_FromUnsignedLongLong(field->varint());
+       break;
+     case UnknownField::TYPE_FIXED32:
+-      data = PyLong_FromLong(field->fixed32());
++      data = PyLong_FromUnsignedLongLong(field->fixed32());
+       break;
+     case UnknownField::TYPE_FIXED64:
+-      data = PyLong_FromLong(field->fixed64());
++      data = PyLong_FromUnsignedLongLong(field->fixed64());
+       break;
+     case UnknownField::TYPE_LENGTH_DELIMITED:
+       data = PyBytes_FromStringAndSize(field->length_delimited().data(),

diff --git a/dev-python/protobuf-python/protobuf-python-3.19.1.ebuild b/dev-python/protobuf-python/protobuf-python-3.19.1.ebuild
new file mode 100644
index 00000000000..17947082fe8
--- /dev/null
+++ b/dev-python/protobuf-python/protobuf-python-3.19.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2008-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit distutils-r1
+
+if [[ "${PV}" == "9999" ]]; then
+	inherit git-r3
+
+	EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/protobuf-${PV}"
+	EGIT_SUBMODULES=()
+else
+	SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> protobuf-${PV}.tar.gz"
+fi
+S="${WORKDIR}/protobuf-${PV}/python"
+
+DESCRIPTION="Google's Protocol Buffers - Python bindings"
+HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
+
+LICENSE="BSD"
+SLOT="0/30"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+
+BDEPEND="${PYTHON_DEPS}
+	~dev-libs/protobuf-${PV}
+	dev-python/namespace-google[${PYTHON_USEDEP}]
+	dev-python/six[${PYTHON_USEDEP}]"
+DEPEND="${PYTHON_DEPS}
+	~dev-libs/protobuf-${PV}"
+RDEPEND="${BDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-3.19.1-google.protobuf.pyext._message.PyUnknownFieldRef.patch"
+)
+
+distutils_enable_tests setup.py
+
+python_configure_all() {
+	mydistutilsargs=(
+		--cpp_implementation
+	)
+}
+
+python_install_all() {
+	distutils-r1_python_install_all
+
+	find "${ED}" -name "*.pth" -type f -delete || die
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/protobuf-python/, dev-python/protobuf-python/files/
@ 2022-10-25 23:02 Sam James
  0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2022-10-25 23:02 UTC (permalink / raw
  To: gentoo-commits

commit:     35c5ad765e20f14e514f79b77d633a4c2e220d4d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 25 23:02:41 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 25 23:02:47 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35c5ad76

dev-python/protobuf-python: fix Python 3.11 build

Bug: https://bugs.gentoo.org/844184
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/protobuf-python-4.21.8-python311.patch   | 132 +++++++++++++++++++++
 .../protobuf-python/protobuf-python-4.21.8.ebuild  |   1 +
 2 files changed, 133 insertions(+)

diff --git a/dev-python/protobuf-python/files/protobuf-python-4.21.8-python311.patch b/dev-python/protobuf-python/files/protobuf-python-4.21.8-python311.patch
new file mode 100644
index 000000000000..b9aca40776c5
--- /dev/null
+++ b/dev-python/protobuf-python/files/protobuf-python-4.21.8-python311.patch
@@ -0,0 +1,132 @@
+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 <alexandr.shadchin@gmail.com>
+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-python/protobuf-python-4.21.8.ebuild b/dev-python/protobuf-python/protobuf-python-4.21.8.ebuild
index 7d5ab4946eb9..572a571542c6 100644
--- a/dev-python/protobuf-python/protobuf-python-4.21.8.ebuild
+++ b/dev-python/protobuf-python/protobuf-python-4.21.8.ebuild
@@ -57,6 +57,7 @@ PARENT_PATCHES=(
 
 # Here for patches within "python/" subdirectory.
 PATCHES=(
+	"${FILESDIR}"/${P}-python311.patch
 )
 
 python_prepare_all() {


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/protobuf-python/, dev-python/protobuf-python/files/
@ 2022-10-26 22:35 Sam James
  0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2022-10-26 22:35 UTC (permalink / raw
  To: gentoo-commits

commit:     8e06df67ca46cffed156e1786fafd31777e7c11d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 26 22:35:25 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 26 22:35:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e06df67

dev-python/protobuf-python: backport Python 3.11 patch to 3.20.3 too

Closes: https://bugs.gentoo.org/878329
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...on-4.21.8-python311.patch => protobuf-python-3.20.3-python311.patch} | 0
 dev-python/protobuf-python/protobuf-python-3.20.3.ebuild                | 1 +
 dev-python/protobuf-python/protobuf-python-4.21.8.ebuild                | 2 +-
 3 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/dev-python/protobuf-python/files/protobuf-python-4.21.8-python311.patch b/dev-python/protobuf-python/files/protobuf-python-3.20.3-python311.patch
similarity index 100%
rename from dev-python/protobuf-python/files/protobuf-python-4.21.8-python311.patch
rename to dev-python/protobuf-python/files/protobuf-python-3.20.3-python311.patch

diff --git a/dev-python/protobuf-python/protobuf-python-3.20.3.ebuild b/dev-python/protobuf-python/protobuf-python-3.20.3.ebuild
index 80c782e2fbdc..3b2a8fa16265 100644
--- a/dev-python/protobuf-python/protobuf-python-3.20.3.ebuild
+++ b/dev-python/protobuf-python/protobuf-python-3.20.3.ebuild
@@ -57,6 +57,7 @@ PARENT_PATCHES=(
 
 # Here for patches within "python/" subdirectory.
 PATCHES=(
+	"${FILESDIR}"/${PN}-3.20.3-python311.patch
 )
 
 python_prepare_all() {

diff --git a/dev-python/protobuf-python/protobuf-python-4.21.8.ebuild b/dev-python/protobuf-python/protobuf-python-4.21.8.ebuild
index 572a571542c6..884546edf04c 100644
--- a/dev-python/protobuf-python/protobuf-python-4.21.8.ebuild
+++ b/dev-python/protobuf-python/protobuf-python-4.21.8.ebuild
@@ -57,7 +57,7 @@ PARENT_PATCHES=(
 
 # Here for patches within "python/" subdirectory.
 PATCHES=(
-	"${FILESDIR}"/${P}-python311.patch
+	"${FILESDIR}"/${PN}-3.20.3-python311.patch
 )
 
 python_prepare_all() {


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/protobuf-python/, dev-python/protobuf-python/files/
@ 2023-01-05 11:12 Michał Górny
  0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2023-01-05 11:12 UTC (permalink / raw
  To: gentoo-commits

commit:     d72194230e2ee03d5c1e6ee0be41ac12e6966e42
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  5 11:08:42 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jan  5 11:08:42 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7219423

dev-python/protobuf-python: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/protobuf-python/Manifest                |  3 -
 ...protobuf.pyext._message.PyUnknownFieldRef.patch | 42 ------------
 .../protobuf-python-3.19.3-r2.ebuild               | 70 -------------------
 .../protobuf-python-3.19.3-r3.ebuild               | 72 --------------------
 .../protobuf-python/protobuf-python-3.19.6.ebuild  | 79 ----------------------
 .../protobuf-python/protobuf-python-4.21.8.ebuild  | 79 ----------------------
 6 files changed, 345 deletions(-)

diff --git a/dev-python/protobuf-python/Manifest b/dev-python/protobuf-python/Manifest
index 5dd5ef74895c..a24cffb5f6fd 100644
--- a/dev-python/protobuf-python/Manifest
+++ b/dev-python/protobuf-python/Manifest
@@ -1,6 +1,3 @@
-DIST protobuf-21.8.tar.gz 5110670 BLAKE2B 3c1b0c857a86e9586481d63896341d0cb11290dbd710d87a6f7889d34f5f262abe2986a29ed19a730f8fa5df0b5c62d77a4db6aa415a72b239f7483ae8d6380c SHA512 cb17be759311e91172801add1f88fe7a0291b547170c40d2e3303f5c248570dddeade96bd48740edd628215f55269c97475e2f4c4a41c50f1018d525f52036cb
 DIST protobuf-21.9.tar.gz 5110670 BLAKE2B a4f5b7f58e1c5904ca990b100a72992f6f56177b28773f8de8c99e4158391d33cfb8aa8575915887fc9ae4294faf81d4ff6b470bc07b394bfd5885a09ba0fafe SHA512 6954b42d21921e630173b7848c056ab95635627d8eddec960f3db2ddda13eedde00520a9b350722e76e2998649eb8ebe10758e1db938b6a91e38ff3295b1b7c1
-DIST protobuf-3.19.3.tar.gz 5293258 BLAKE2B c05b70ffca97f7166ea6a511a36907eed125edf1ebf17f908718221d9b851be84dfb2b1b39973f2faf35f6ade630e6ba4f9e8b91b8fbc922c5db97079323ee6e SHA512 1c003e7cbc8eae6a038f46e688b401ee202ba47f502561e909df79770f6e8b7daf3dc1ccc727e31bfb5b52cd04cb4fef7d2d2a28d650c13f396872ad4aa076c6
-DIST protobuf-3.19.6.tar.gz 5299501 BLAKE2B 3121f76b95f83c5309ce49ce296b738eff7be9d3a5093c564fbe2339fb5f3729e406f1b44bfcc05feb0d31ab63838bb4f54685017977c73a33b91215a6776072 SHA512 8f92242f2be8e1bbfba41341c87709ad91ad83b8b3e3df88bb430411541d3399295f49291fd52b50e3487b0fce33181cb4d175685fd25aac72adfaee26a612d4
 DIST protobuf-3.20.1.tar.gz 5368262 BLAKE2B 1ce1aef2e4c4f3ea4863629cc75d89fe17d0c7ac0c342ac641c787456fd4a12756c2892a27ddadedc94a7201494ec84566638ce33a03cb0c867b04e9eee0edb3 SHA512 fde3eb9f13946887ddfd87df428c5615ad09aaf191e4478b24e98e5e13231feeff4e70b4ca6a2ff7d9b9b2e2c60bc1d5479526edeafa78f9a8ed3bef2e0bacb0
 DIST protobuf-3.20.3.tar.gz 5374320 BLAKE2B fb51f2a0ecf5b83235f5252051f8192ae377bb7a5e030c3f3e9435ccde25919c059830cf476e840fa6c970928a32c0075e213c9d5d4d9e3d3b24732c39a9fbfa SHA512 01d6703bdbe769a1200ee6e4ebcdcb99688ec21f576988c60d82ec36e0822820fb245fcb4ca53293143d53e666d748b5a0c6937bc659fb3cdc4cd9b05ed12a1c

diff --git a/dev-python/protobuf-python/files/protobuf-python-3.19.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch b/dev-python/protobuf-python/files/protobuf-python-3.19.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch
deleted file mode 100644
index a9e23feea148..000000000000
--- a/dev-python/protobuf-python/files/protobuf-python-3.19.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 387c9e58987c54b72e66c14b34c98297086cd812 Mon Sep 17 00:00:00 2001
-From: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
-Date: Fri, 28 Jan 2022 15:32:43 +0800
-Subject: [PATCH] protobuf-python-3.19.0:
- google.protobuf.pyext._message.PyUnknownFieldRef
-
-Prevent integer overflow for unknown fields.
-
-https://github.com/protocolbuffers/protobuf/issues/6205
-https://github.com/protocolbuffers/protobuf/pull/7016
-https://github.com/protocolbuffers/protobuf/commit/5100be2b7746391c2724e2793e1428c36b63c98b
-
-Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
-Signed-off-by: Yixun Lan <dlan@gentoo.org>
----
- python/google/protobuf/pyext/unknown_fields.cc | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/python/google/protobuf/pyext/unknown_fields.cc b/python/google/protobuf/pyext/unknown_fields.cc
-index 6d919b3..37e6eae 100644
---- a/python/google/protobuf/pyext/unknown_fields.cc
-+++ b/python/google/protobuf/pyext/unknown_fields.cc
-@@ -275,13 +275,13 @@ static PyObject* GetData(PyUnknownFieldRef* self, void *closure) {
-   PyObject* data = NULL;
-   switch (field->type()) {
-     case UnknownField::TYPE_VARINT:
--      data = PyLong_FromLong(field->varint());
-+      data = PyLong_FromUnsignedLongLong(field->varint());
-       break;
-     case UnknownField::TYPE_FIXED32:
--      data = PyLong_FromLong(field->fixed32());
-+      data = PyLong_FromUnsignedLong(field->fixed32());
-       break;
-     case UnknownField::TYPE_FIXED64:
--      data = PyLong_FromLong(field->fixed64());
-+      data = PyLong_FromUnsignedLongLong(field->fixed64());
-       break;
-     case UnknownField::TYPE_LENGTH_DELIMITED:
-       data = PyBytes_FromStringAndSize(field->length_delimited().data(),
--- 
-2.34.1
-

diff --git a/dev-python/protobuf-python/protobuf-python-3.19.3-r2.ebuild b/dev-python/protobuf-python/protobuf-python-3.19.3-r2.ebuild
deleted file mode 100644
index 4fb279abd7d0..000000000000
--- a/dev-python/protobuf-python/protobuf-python-3.19.3-r2.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 2008-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-
-inherit distutils-r1
-
-if [[ "${PV}" == "9999" ]]; then
-	inherit git-r3
-
-	EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf"
-	EGIT_SUBMODULES=()
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Python bindings"
-HOMEPAGE="
-	https://developers.google.com/protocol-buffers/
-	https://github.com/protocolbuffers/protobuf/
-"
-if [[ "${PV}" != "9999" ]]; then
-	SRC_URI="
-		https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz
-			-> protobuf-${PV}.tar.gz
-	"
-fi
-S="${WORKDIR}/protobuf-${PV}/python"
-
-LICENSE="BSD"
-SLOT="0/30"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
-
-BDEPEND="
-	${PYTHON_DEPS}
-	~dev-libs/protobuf-${PV}
-	dev-python/six[${PYTHON_USEDEP}]
-"
-DEPEND="
-	${PYTHON_DEPS}
-	~dev-libs/protobuf-${PV}
-"
-RDEPEND="
-	${BDEPEND}
-	!dev-python/namespace-google
-"
-
-if [[ "${PV}" == "9999" ]]; then
-	EGIT_CHECKOUT_DIR="${WORKDIR}/protobuf-${PV}"
-fi
-
-distutils_enable_tests setup.py
-
-python_prepare_all() {
-	pushd "${WORKDIR}/protobuf-${PV}" > /dev/null || die
-	eapply "${FILESDIR}/${PN}-3.19.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch"
-	eapply_user
-	popd > /dev/null || die
-
-	distutils-r1_python_prepare_all
-}
-
-src_configure() {
-	DISTUTILS_ARGS=(--cpp_implementation)
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-	find "${ED}" -name "*.pth" -type f -delete || die
-}

diff --git a/dev-python/protobuf-python/protobuf-python-3.19.3-r3.ebuild b/dev-python/protobuf-python/protobuf-python-3.19.3-r3.ebuild
deleted file mode 100644
index 3976006190c8..000000000000
--- a/dev-python/protobuf-python/protobuf-python-3.19.3-r3.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 2008-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} )
-
-inherit distutils-r1
-
-if [[ "${PV}" == "9999" ]]; then
-	inherit git-r3
-
-	EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf"
-	EGIT_SUBMODULES=()
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Python bindings"
-HOMEPAGE="
-	https://developers.google.com/protocol-buffers/
-	https://github.com/protocolbuffers/protobuf/
-	https://pypi.org/project/protobuf/
-"
-if [[ "${PV}" != "9999" ]]; then
-	SRC_URI="
-		https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz
-			-> protobuf-${PV}.tar.gz
-	"
-fi
-S="${WORKDIR}/protobuf-${PV}/python"
-
-LICENSE="BSD"
-SLOT="0/30"
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
-
-BDEPEND="
-	${PYTHON_DEPS}
-	~dev-libs/protobuf-${PV}
-	dev-python/six[${PYTHON_USEDEP}]
-"
-DEPEND="
-	${PYTHON_DEPS}
-	~dev-libs/protobuf-${PV}
-"
-RDEPEND="
-	${BDEPEND}
-	!dev-python/namespace-google
-"
-
-if [[ "${PV}" == "9999" ]]; then
-	EGIT_CHECKOUT_DIR="${WORKDIR}/protobuf-${PV}"
-fi
-
-distutils_enable_tests setup.py
-
-python_prepare_all() {
-	pushd "${WORKDIR}/protobuf-${PV}" > /dev/null || die
-	eapply "${FILESDIR}/${PN}-3.19.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch"
-	eapply_user
-	popd > /dev/null || die
-
-	distutils-r1_python_prepare_all
-}
-
-src_configure() {
-	DISTUTILS_ARGS=(--cpp_implementation)
-}
-
-python_compile() {
-	distutils-r1_python_compile
-	find "${BUILD_DIR}/install" -name "*.pth" -type f -delete || die
-}

diff --git a/dev-python/protobuf-python/protobuf-python-3.19.6.ebuild b/dev-python/protobuf-python/protobuf-python-3.19.6.ebuild
deleted file mode 100644
index dc9a76ba6458..000000000000
--- a/dev-python/protobuf-python/protobuf-python-3.19.6.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 2008-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} )
-
-inherit distutils-r1
-
-PARENT_PN="${PN/-python/}"
-PARENT_PV="${PV}"
-PARENT_P="${PARENT_PN}-${PARENT_PV}"
-
-if [[ "${PV}" == *9999 ]]; then
-	inherit git-r3
-
-	EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git"
-	EGIT_SUBMODULES=()
-	EGIT_CHECKOUT_DIR="${WORKDIR}/${PARENT_P}"
-else
-	SRC_URI="
-		https://github.com/protocolbuffers/protobuf/archive/v${PARENT_PV}.tar.gz
-			-> ${PARENT_P}.tar.gz
-	"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Python bindings"
-HOMEPAGE="
-	https://developers.google.com/protocol-buffers/
-	https://pypi.org/project/protobuf/
-"
-
-LICENSE="BSD"
-SLOT="0/30"
-
-S="${WORKDIR}/${PARENT_P}/python"
-
-BDEPEND="
-"
-DEPEND="
-	${PYTHON_DEPS}
-"
-RDEPEND="
-	${BDEPEND}
-	dev-libs/protobuf:${SLOT}
-"
-
-distutils_enable_tests setup.py
-
-# Same than PATCHES but from repository's root directory,
-# please see function `python_prepare_all` below.
-# Simplier for users IMHO.
-PARENT_PATCHES=(
-	"${FILESDIR}/${PN}-3.19.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch"
-)
-
-# Here for patches within "python/" subdirectory.
-PATCHES=(
-)
-
-python_prepare_all() {
-	pushd "${WORKDIR}/${PARENT_P}" > /dev/null || die
-	[[ -n "${PARENT_PATCHES[@]}" ]] && eapply "${PARENT_PATCHES[@]}"
-	eapply_user
-	popd > /dev/null || die
-
-	distutils-r1_python_prepare_all
-}
-
-src_configure() {
-	DISTUTILS_ARGS=( --cpp_implementation )
-}
-
-python_compile() {
-	distutils-r1_python_compile
-	find "${BUILD_DIR}/install" -name "*.pth" -type f -delete || die
-}

diff --git a/dev-python/protobuf-python/protobuf-python-4.21.8.ebuild b/dev-python/protobuf-python/protobuf-python-4.21.8.ebuild
deleted file mode 100644
index 884546edf04c..000000000000
--- a/dev-python/protobuf-python/protobuf-python-4.21.8.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 2008-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..11} )
-
-inherit distutils-r1
-
-PARENT_PN="${PN/-python/}"
-PARENT_PV="$(ver_cut 2-)"
-PARENT_P="${PARENT_PN}-${PARENT_PV}"
-
-if [[ "${PV}" == *9999 ]]; then
-	inherit git-r3
-
-	EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git"
-	EGIT_SUBMODULES=()
-	EGIT_CHECKOUT_DIR="${WORKDIR}/${PARENT_P}"
-else
-	SRC_URI="
-		https://github.com/protocolbuffers/protobuf/archive/v${PARENT_PV}.tar.gz
-			-> ${PARENT_P}.tar.gz
-	"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Python bindings"
-HOMEPAGE="
-	https://developers.google.com/protocol-buffers/
-	https://pypi.org/project/protobuf/
-"
-
-LICENSE="BSD"
-SLOT="0/32"
-
-S="${WORKDIR}/${PARENT_P}/python"
-
-BDEPEND="
-"
-DEPEND="
-	${PYTHON_DEPS}
-"
-RDEPEND="
-	${BDEPEND}
-	dev-libs/protobuf:${SLOT}
-"
-
-distutils_enable_tests setup.py
-
-# Same than PATCHES but from repository's root directory,
-# please see function `python_prepare_all` below.
-# Simplier for users IMHO.
-PARENT_PATCHES=(
-)
-
-# Here for patches within "python/" subdirectory.
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.20.3-python311.patch
-)
-
-python_prepare_all() {
-	pushd "${WORKDIR}/${PARENT_P}" > /dev/null || die
-	[[ -n "${PARENT_PATCHES[@]}" ]] && eapply "${PARENT_PATCHES[@]}"
-	eapply_user
-	popd > /dev/null || die
-
-	distutils-r1_python_prepare_all
-}
-
-src_configure() {
-	DISTUTILS_ARGS=( --cpp_implementation )
-}
-
-python_compile() {
-	distutils-r1_python_compile
-	find "${BUILD_DIR}/install" -name "*.pth" -type f -delete || die
-}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/protobuf-python/, dev-python/protobuf-python/files/
@ 2024-06-13  4:53 Sam James
  0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2024-06-13  4:53 UTC (permalink / raw
  To: gentoo-commits

commit:     de15b02f0b35c97ba57195624a582d191b038812
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 13 04:52:49 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 13 04:53:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de15b02f

dev-python/protobuf-python: fix tests

Bug: https://bugs.gentoo.org/934062
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/protobuf-python-4.22.5-python.patch       | 21 +++++++++++++++++++++
 .../protobuf-python/protobuf-python-4.22.5.ebuild   |  1 +
 2 files changed, 22 insertions(+)

diff --git a/dev-python/protobuf-python/files/protobuf-python-4.22.5-python.patch b/dev-python/protobuf-python/files/protobuf-python-4.22.5-python.patch
new file mode 100644
index 000000000000..65cb22d5f653
--- /dev/null
+++ b/dev-python/protobuf-python/files/protobuf-python-4.22.5-python.patch
@@ -0,0 +1,21 @@
+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)

diff --git a/dev-python/protobuf-python/protobuf-python-4.22.5.ebuild b/dev-python/protobuf-python/protobuf-python-4.22.5.ebuild
index 9cf2f3d4c74a..59b4f648ed71 100644
--- a/dev-python/protobuf-python/protobuf-python-4.22.5.ebuild
+++ b/dev-python/protobuf-python/protobuf-python-4.22.5.ebuild
@@ -56,6 +56,7 @@ PARENT_PATCHES=(
 
 # Here for patches within "python/" subdirectory.
 PATCHES=(
+	"${FILESDIR}/${PN}-4.22.5-python.patch"
 )
 
 python_prepare_all() {


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-13  4:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-05 11:12 [gentoo-commits] repo/gentoo:master commit in: dev-python/protobuf-python/, dev-python/protobuf-python/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2024-06-13  4:53 Sam James
2022-10-26 22:35 Sam James
2022-10-25 23:02 Sam James
2021-11-09 11:51 Arthur Zamarin
2018-10-02 20:08 Mike Gilbert
2018-04-26 15:14 Mike Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox