dev-python/protobuf-python: Fix tests.

Closes: https://bugs.gentoo.org/743838
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
This commit is contained in:
Arfrever Frehtes Taifersar Arahesis
2020-09-22 04:00:00 +00:00
committed by Mike Gilbert
parent b0b2faa439
commit 0e9db0dda1
6 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
https://github.com/protocolbuffers/protobuf/issues/6205
https://github.com/protocolbuffers/protobuf/pull/7016
--- /python/google/protobuf/pyext/unknown_fields.cc
+++ /python/google/protobuf/pyext/unknown_fields.cc
@@ -277,13 +277,13 @@
PyObject* data = NULL;
switch (field->type()) {
case UnknownField::TYPE_VARINT:
- data = PyInt_FromLong(field->varint());
+ data = PyLong_FromUnsignedLongLong(field->varint());
break;
case UnknownField::TYPE_FIXED32:
- data = PyInt_FromLong(field->fixed32());
+ data = PyLong_FromUnsignedLong(field->fixed32());
break;
case UnknownField::TYPE_FIXED64:
- data = PyInt_FromLong(field->fixed64());
+ data = PyLong_FromUnsignedLongLong(field->fixed64());
break;
case UnknownField::TYPE_LENGTH_DELIMITED:
data = PyBytes_FromStringAndSize(field->length_delimited().data(),

View File

@@ -44,6 +44,7 @@ fi
python_prepare_all() {
pushd "${WORKDIR}/protobuf-${PV}" > /dev/null || die
eapply "${FILESDIR}/${PN}-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch"
eapply_user
popd > /dev/null || die

View File

@@ -44,6 +44,7 @@ fi
python_prepare_all() {
pushd "${WORKDIR}/protobuf-${PV}" > /dev/null || die
eapply "${FILESDIR}/${PN}-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch"
eapply_user
popd > /dev/null || die

View File

@@ -44,6 +44,7 @@ fi
python_prepare_all() {
pushd "${WORKDIR}/protobuf-${PV}" > /dev/null || die
eapply "${FILESDIR}/${PN}-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch"
eapply_user
popd > /dev/null || die

View File

@@ -44,6 +44,7 @@ fi
python_prepare_all() {
pushd "${WORKDIR}/protobuf-${PV}" > /dev/null || die
eapply "${FILESDIR}/${PN}-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch"
eapply_user
popd > /dev/null || die

View File

@@ -44,6 +44,7 @@ fi
python_prepare_all() {
pushd "${WORKDIR}/protobuf-${PV}" > /dev/null || die
eapply "${FILESDIR}/${PN}-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch"
eapply_user
popd > /dev/null || die