Created attachment 544866 [details, diff] patch for Python3.7 Python3.7 has changed the return type of PyUnicode_AsUTF8AndSize from char* to const char* This requires several changes. The attached patch makes protobuf-python-3.6.1 compile with Python3.6 as well as with Python3.7. I haven't tested if it compiles with Python2.7
I see that there's already a commit upstream at https://github.com/protocolbuffers/protobuf/pull/4862 which has less changes. Is the PR upstream incomplete? Couldn't we just use upstream's patch?
(In reply to Virgil Dupras from comment #1) > I see that there's already a commit upstream at > https://github.com/protocolbuffers/protobuf/pull/4862 which has less > changes. Is the PR upstream incomplete? Couldn't we just use upstream's > patch? Yes, the upstream patch works as well. I personally prefer my patch which uses less const_cast s.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75e0f119f85b8115b69e74a24b27b50df527f9cd commit 75e0f119f85b8115b69e74a24b27b50df527f9cd Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> AuthorDate: 2018-10-02 19:50:26 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2018-10-02 20:07:26 +0000 dev-python/protobuf-python: Support Python 3.7. Closes: https://bugs.gentoo.org/664508 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Mike Gilbert <floppym@gentoo.org> .../files/protobuf-python-3.6.1-python-3.7.patch | 67 ++++++++++++++++++++++ .../protobuf-python/protobuf-python-3.6.1.ebuild | 3 +- 2 files changed, 69 insertions(+), 1 deletion(-)