有没有办法使用 python 3.x 访问协议缓冲区? [英] Is there any way to access Protocol Buffers with python 3.x?

查看:43
本文介绍了有没有办法使用 python 3.x 访问协议缓冲区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在项目中使用 Python 3.x.但是Protocol Buffers的官方客户端只支持python 2.x.

We use Python 3.x in our projects. But the official client of Protocol Buffers only supports python 2.x.

我不想降级到 python 2.x.

I don't want to downgrade to python 2.x.

推荐答案

UPDATE 2:Python 3.x 从 3.0.0 版本开始得到本地支持.

UPDATE 2: Python 3.x is natively supported as of version 3.0.0.

您可以在此处查看 GitHub 上发布的版本:https://github.com/protocolbuffers/protobuf/releases

You can see versions released on GitHub here: https://github.com/protocolbuffers/protobuf/releases

更新:protobuf 的稳定版本 2.6.1 不支持 Python 3.x.但是,较新的 3.0.0 版本(仍处于测试阶段)支持 Python 3.x.您可以在此处查看 PyPi 上发布的版本:https://pypi.python.org/pypi/protobuf

UPDATE: The stable version of protobuf, 2.6.1, does not support Python 3.x. However, the newer 3.0.0 release (still in beta) supports Python 3.x. You can see versions released on PyPi here: https://pypi.python.org/pypi/protobuf

不,没有.有一个关于protobuf google group的讨论Python 3.X 支持.这表明谷歌希望保持对 Python 2.4 的支持,因此移植到 Python 3.X 并不容易.如果项目分支或可以放弃对 Python 2.4 和 2.5 的支持,则移植会容易得多.

No, there isn't. There is a discussion on the protobuf google group about Python 3.X support. It indicates that Google wants to keep support for Python 2.4, so porting to Python 3.X is not easy. If the project branches or can drop support for Python 2.4 and 2.5, it would be a lot easier to port.

这篇关于有没有办法使用 python 3.x 访问协议缓冲区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆