diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2020-09-22 04:00:00 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2020-09-24 10:26:42 -0400 |
commit | 0e9db0dda1d173a473598238861bfdf5846821cb (patch) | |
tree | be944475d2e909e5fa15c0ac0fc111794f6b829b /dev-python/protobuf-python | |
parent | dev-python/protobuf-python: Apply patches in top-level source directory. (diff) | |
download | gentoo-0e9db0dda1d173a473598238861bfdf5846821cb.tar.gz gentoo-0e9db0dda1d173a473598238861bfdf5846821cb.tar.bz2 gentoo-0e9db0dda1d173a473598238861bfdf5846821cb.zip |
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>
Diffstat (limited to 'dev-python/protobuf-python')
6 files changed, 27 insertions, 0 deletions
diff --git a/dev-python/protobuf-python/files/protobuf-python-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch b/dev-python/protobuf-python/files/protobuf-python-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch new file mode 100644 index 000000000000..68318320b909 --- /dev/null +++ b/dev-python/protobuf-python/files/protobuf-python-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch @@ -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(), diff --git a/dev-python/protobuf-python/protobuf-python-3.11.4.ebuild b/dev-python/protobuf-python/protobuf-python-3.11.4.ebuild index 0d5203efdc86..832edea23443 100644 --- a/dev-python/protobuf-python/protobuf-python-3.11.4.ebuild +++ b/dev-python/protobuf-python/protobuf-python-3.11.4.ebuild @@ -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 diff --git a/dev-python/protobuf-python/protobuf-python-3.12.2.ebuild b/dev-python/protobuf-python/protobuf-python-3.12.2.ebuild index 2cd68f6c7fda..ccd1e09b3679 100644 --- a/dev-python/protobuf-python/protobuf-python-3.12.2.ebuild +++ b/dev-python/protobuf-python/protobuf-python-3.12.2.ebuild @@ -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 diff --git a/dev-python/protobuf-python/protobuf-python-3.12.4.ebuild b/dev-python/protobuf-python/protobuf-python-3.12.4.ebuild index 9e7ca9ff7d58..a9f7d2854cac 100644 --- a/dev-python/protobuf-python/protobuf-python-3.12.4.ebuild +++ b/dev-python/protobuf-python/protobuf-python-3.12.4.ebuild @@ -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 diff --git a/dev-python/protobuf-python/protobuf-python-3.13.0.ebuild b/dev-python/protobuf-python/protobuf-python-3.13.0.ebuild index eb481ccd564a..d7e474dcdb9f 100644 --- a/dev-python/protobuf-python/protobuf-python-3.13.0.ebuild +++ b/dev-python/protobuf-python/protobuf-python-3.13.0.ebuild @@ -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 diff --git a/dev-python/protobuf-python/protobuf-python-9999.ebuild b/dev-python/protobuf-python/protobuf-python-9999.ebuild index 0007bff057a7..77f252e252b3 100644 --- a/dev-python/protobuf-python/protobuf-python-9999.ebuild +++ b/dev-python/protobuf-python/protobuf-python-9999.ebuild @@ -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 |