Protocol Buffers 2.6.1

10,053 views
Skip to first unread message

Feng Xiao

unread,
Oct 21, 2014, 7:31:04 PM10/21/14
to prot...@googlegroups.com
Hi all,

I just published Protocol Buffers v2.6.1:

2014-10-20 version 2.6.1:

  C++
  * Added atomicops support for Solaris.
  * Released memory allocated by InitializeDefaultRepeatedFields() and
    GetEmptyString(). Some memory sanitizers reported them as memory leaks.

  Java
  * Updated DynamicMessage.setField() to handle repeated enum values
    correctly.
  * Fixed a bug that caused NullPointerException to be thrown when
    converting manually constructed FileDescriptorProto to
    FileDescriptor.

  Python
  * Fixed WhichOneof() to work with de-serialized protobuf messages.
  * Fixed a missing file problem of Python C++ implementation.

I'll soon upload it to Maven and pypi for Java and Python respectively.

Cheers,
Feng

Tres Seaver

unread,
Oct 22, 2014, 1:35:40 PM10/22/14
to prot...@googlegroups.com, Tres Seaver, Silvano Luciani, Danny Hermes


On Tuesday, October 21, 2014 7:31:04 PM UTC-4, Feng Xiao wrote:
Hi all,

I just published Protocol Buffers v2.6.1:
 
I'll soon upload it to Maven and pypi for Java and Python respectively.

2.6.1 won't install on Python 2.6 (can't import ez_setup):

$ /opt/Python-2.6.9/bin/virtualenv /tmp/pb26
New python executable in /tmp/pb26/bin/python
Installing Setuptools..............................................................................................................................................................................................................................done.
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.
$ /tmp/pb26/bin/pip install protobuf
Downloading/unpacking protobuf
  Downloading protobuf-2.6.1.tar.gz (80kB): 80kB downloaded
  Running setup.py egg_info for package protobuf
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pb26/build/protobuf/setup.py", line 203, in <module>
        "Protocol Buffers are Google's data interchange format.",
      File "/opt/Python-2.6.9/lib/python2.6/distutils/core.py", line 113, in setup
        _setup_distribution = dist = klass(attrs)
      File "/tmp/pb26/lib/python2.6/site-packages/setuptools/dist.py", line 265, in __init__
        self.fetch_build_eggs(attrs.pop('setup_requires'))
      File "/tmp/pb26/lib/python2.6/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs
        parse_requirements(requires), installer=self.fetch_build_egg
      File "/tmp/pb26/lib/python2.6/site-packages/pkg_resources.py", line 618, in resolve
        dist = best[req.key] = env.best_match(req, self, installer)
      File "/tmp/pb26/lib/python2.6/site-packages/pkg_resources.py", line 862, in best_match
        return self.obtain(req, installer) # try and download/install
      File "/tmp/pb26/lib/python2.6/site-packages/pkg_resources.py", line 874, in obtain
        return installer(requirement)
      File "/tmp/pb26/lib/python2.6/site-packages/setuptools/dist.py", line 339, in fetch_build_egg
        return cmd.easy_install(req)
      File "/tmp/pb26/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 623, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/tmp/pb26/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 653, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/tmp/pb26/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 849, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/tmp/pb26/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 1130, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/tmp/pb26/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 1115, in run_setup
        run_setup(setup_script, args)
      File "/tmp/pb26/lib/python2.6/site-packages/setuptools/sandbox.py", line 69, in run_setup
        lambda: execfile(
      File "/tmp/pb26/lib/python2.6/site-packages/setuptools/sandbox.py", line 120, in run
        return func()
      File "/tmp/pb26/lib/python2.6/site-packages/setuptools/sandbox.py", line 71, in <lambda>
        {'__file__':setup_script, '__name__':'__main__'}
      File "setup.py", line 18, in <module>
        sys.stderr.write(
    ImportError: No module named ez_setup

Two issues:

- 'ez_setup.py' is present in the source tree, but not in the release tarball:  it needs a 'MANIFEST.in'.

- 'setup.py' should try importing 'setuptools' directly first, and only falling back to 'ez_setup' on ImportError.


Tres.

Feng Xiao

unread,
Oct 22, 2014, 2:51:48 PM10/22/14
to Tres Seaver, Protocol Buffers, Silvano Luciani, Danny Hermes
Does 2.6.0 work on python 2.6? I don't think there is any change to setup.py in 2.6.1.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Tres Seaver

unread,
Oct 22, 2014, 3:11:06 PM10/22/14
to Feng Xiao, Protocol Buffers, Silvano Luciani, Danny Hermes
On 10/22/2014 02:51 PM, Feng Xiao wrote:
> Does 2.6.0 work on python 2.6? I don't think there is any change to
> setup.py in 2.6.1.

Yes:

-------------------------- %< -------------------------------------
Downloading/unpacking protobuf==2.6.0
Downloading protobuf-2.6.0.tar.gz (187kB): 187kB downloaded
Running setup.py egg_info for package protobuf

---------------------------------------------------------------------------
This script requires setuptools version 0.6c11 to run (even to display
help). I will attempt to download it for you (from
http://pypi.python.org/packages/2.6/s/setuptools/), but
you may need to enable firewall access for this script first.
I will start the download in 15 seconds.

(Note: if this machine does not have network access, please obtain the file


http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg

and place it in this directory before rerunning this script.)
---------------------------------------------------------------------------
Downloading
http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg
zip_safe flag not set; analyzing archive contents...
google.__init__: module references __path__
google.apputils.__init__: module references __path__
google.apputils.run_script_module: module references __file__
google.apputils.setup_command: module references __file__

Installed /tmp/pb-py26/build/protobuf/google_apputils-0.4.1-py2.6.egg
Searching for pytz>=2010
Reading https://pypi.python.org/simple/pytz/
Best match: pytz 2014.7
Downloading
https://pypi.python.org/packages/2.6/p/pytz/pytz-2014.7-py2.6.egg#md5=ae8899e9a18c3528a46aefdfe6620046
Processing pytz-2014.7-py2.6.egg
Moving pytz-2014.7-py2.6.egg to /tmp/pb-py26/build/protobuf

Installed /tmp/pb-py26/build/protobuf/pytz-2014.7-py2.6.egg
Searching for python-gflags>=1.4
Reading https://pypi.python.org/simple/python-gflags/
Reading http://code.google.com/p/python-gflags
Best match: python-gflags 2.0
Downloading
https://pypi.python.org/packages/2.6/p/python-gflags/python_gflags-2.0-py2.6.egg#md5=604dd7b90e7f718cbc4790c6c1d6efa8
Processing python_gflags-2.0-py2.6.egg
Moving python_gflags-2.0-py2.6.egg to /tmp/pb-py26/build/protobuf

Installed /tmp/pb-py26/build/protobuf/python_gflags-2.0-py2.6.egg
Searching for python-dateutil>=1.4
Reading https://pypi.python.org/simple/python-dateutil/
Reading http://labix.org/python-dateutil
Best match: python-dateutil 2.2
Downloading
https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.2.tar.gz#md5=c1f654d0ff7e33999380a8ba9783fd5c
Processing python-dateutil-2.2.tar.gz
Writing /tmp/easy_install-WUDTlw/python-dateutil-2.2/setup.cfg
Running python-dateutil-2.2/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-WUDTlw/python-dateutil-2.2/egg-dist-tmp-nOEhO2

Installed /tmp/pb-py26/build/protobuf/python_dateutil-2.2-py2.6.egg
Searching for six
Reading https://pypi.python.org/simple/six/
Best match: six 1.8.0
Downloading
https://pypi.python.org/packages/source/s/six/six-1.8.0.tar.gz#md5=1626eb24cc889110c38f7e786ec69885
Processing six-1.8.0.tar.gz
Writing /tmp/easy_install-uwi5t5/six-1.8.0/setup.cfg
Running six-1.8.0/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-uwi5t5/six-1.8.0/egg-dist-tmp-wXcMOk
no previously-included directories found matching 'documentation/_build'
zip_safe flag not set; analyzing archive contents...
six: module references __path__

Installed /tmp/pb-py26/build/protobuf/six-1.8.0-py2.6.egg
Requirement already satisfied (use --upgrade to upgrade): setuptools in
/tmp/pb-py26/lib/python2.6/site-packages (from protobuf==2.6.0)
Installing collected packages: protobuf
Running setup.py install for protobuf
Skipping installation of
/tmp/pb-py26/lib/python2.6/site-packages/google/__init__.py (namespace package)
Installing
/tmp/pb-py26/lib/python2.6/site-packages/protobuf-2.6.0-py2.6-nspkg.pth
Successfully installed protobuf
Cleaning up...
-------------------------- %< -------------------------------------

Perhaps the 2.6.0 distribution tarball was created from a checkout which
had 'setuptools_git' installed (so that 'ez_setup.py' was included), but
not the 2.6.1 tarball?


Tres.
--
===================================================================
Tres Seaver +1 540-429-0999 tse...@palladion.com
Palladion Software "Excellence by Design" http://palladion.com

Feng Xiao

unread,
Oct 22, 2014, 4:01:01 PM10/22/14
to Tres Seaver, Protocol Buffers, Silvano Luciani, Danny Hermes
Thanks. I just removed 2.6.1 from PyPI and will upload it again when I resolved this issue.

Feng Xiao

unread,
Oct 22, 2014, 5:58:00 PM10/22/14
to prot...@googlegroups.com, xiao...@google.com, sil...@google.com, daniel....@gmail.com
Hi Tres,

I just uploaded a new 2.6.1 package to pypi. Can you check whether it works for you? Thanks.

Danny Hermes

unread,
Oct 22, 2014, 6:11:58 PM10/22/14
to Feng Xiao, Tres Seaver, Protocol Buffers, Silvano Luciani
Thanks Feng!
--
Danny Hermes
(815) 440-7093

Tres Seaver

unread,
Oct 22, 2014, 6:43:07 PM10/22/14
to Feng Xiao, prot...@googlegroups.com, sil...@google.com, daniel....@gmail.com
It does install, although it hangs up in 'ez_install' for some seconds
(which it shouldn't need to do).

Huang Jin

unread,
Mar 9, 2015, 4:26:11 PM3/9/15
to prot...@googlegroups.com
Does it support bit field? Sorry for flooding the message...

Feng Xiao

unread,
Mar 10, 2015, 4:41:44 PM3/10/15
to Huang Jin, Protocol Buffers
On Tue, Feb 24, 2015 at 12:20 PM, Huang Jin <jin....@gmail.com> wrote:
Does it support bit field? Sorry for flooding the message...
No. You'll need to pack/unpack bit fields yourself into a uint32 or uint64 proto field.

Ashish Singla

unread,
Jun 23, 2015, 9:35:06 PM6/23/15
to prot...@googlegroups.com
Hi Feng,
    Quick question, Is there support for python 3.x in any upcoming release? and if yes, when is this release expected?

Best 
Ashish

Feng Xiao

unread,
Jun 23, 2015, 9:37:37 PM6/23/15
to Ashish Singla, Josh Haberman, Protocol Buffers
On Tue, Jun 23, 2015 at 6:08 PM, Ashish Singla <ashish....@gmail.com> wrote:
Hi Feng,
    Quick question, Is there support for python 3.x in any upcoming release? and if yes, when is this release expected?
+Josh has been working on python recently and is probably the best person to answer this.
 

Best 
Ashish


On Tuesday, October 21, 2014 at 7:31:04 PM UTC-4, Feng Xiao wrote:
Hi all,

I just published Protocol Buffers v2.6.1:

2014-10-20 version 2.6.1:

  C++
  * Added atomicops support for Solaris.
  * Released memory allocated by InitializeDefaultRepeatedFields() and
    GetEmptyString(). Some memory sanitizers reported them as memory leaks.

  Java
  * Updated DynamicMessage.setField() to handle repeated enum values
    correctly.
  * Fixed a bug that caused NullPointerException to be thrown when
    converting manually constructed FileDescriptorProto to
    FileDescriptor.

  Python
  * Fixed WhichOneof() to work with de-serialized protobuf messages.
  * Fixed a missing file problem of Python C++ implementation.

I'll soon upload it to Maven and pypi for Java and Python respectively.

Cheers,
Feng

--

fkk...@gmail.com

unread,
Dec 12, 2015, 3:02:45 AM12/12/15
to Protocol Buffers
Hi Feng,

I am also using protocol buffer for both Java and C#. Is there a C# API for 2.6.1? It looks like the latest version for the csharp-port project is 2.4.1 and its in the process of migrating back to the protocol buffer V3 main project.

The reason I am asking is because my Java application is using 2.6.1 and my C# application cannot communicate with the Java application with 2.4.1.

Thanks,
Francis

fkk...@gmail.com

unread,
Dec 12, 2015, 3:02:47 AM12/12/15
to Protocol Buffers
Hi Feng,

I am using protocol buffer for Java and C# applications. Is there a 2.6.1 version for C#? I checked the latest version for the protobuf-csharp-port project is 2.4.1 and it is in the process of merging to the main protocol buffer v3 project. 

My Java application is using 2.6.1, my C# application which uses 2.4.1 is not able to communicate with the Java application. 

Thanks,
Francis

On Wednesday, October 22, 2014 at 7:31:04 AM UTC+8, Feng Xiao wrote:

Feng Xiao

unread,
Dec 12, 2015, 3:05:24 AM12/12/15
to fkk...@gmail.com, Protocol Buffers
On Thu, Dec 10, 2015 at 7:41 PM, <fkk...@gmail.com> wrote:
Hi Feng,

I am also using protocol buffer for both Java and C#. Is there a C# API for 2.6.1?
We will focus on v3.0.0 release and will not have a C# release for 2.6.1.
 
It looks like the latest version for the csharp-port project is 2.4.1 and its in the process of migrating back to the protocol buffer V3 main project.

The reason I am asking is because my Java application is using 2.6.1 and my C# application cannot communicate with the Java application with 2.4.1.
Protobuf wire format is compatible across all versions. Can you explain more about why 2.6.1 doesn't communicate with 2.4.1?
 

Thanks,
Francis


On Wednesday, October 22, 2014 at 7:31:04 AM UTC+8, Feng Xiao wrote:
Hi all,

I just published Protocol Buffers v2.6.1:

2014-10-20 version 2.6.1:

  C++
  * Added atomicops support for Solaris.
  * Released memory allocated by InitializeDefaultRepeatedFields() and
    GetEmptyString(). Some memory sanitizers reported them as memory leaks.

  Java
  * Updated DynamicMessage.setField() to handle repeated enum values
    correctly.
  * Fixed a bug that caused NullPointerException to be thrown when
    converting manually constructed FileDescriptorProto to
    FileDescriptor.

  Python
  * Fixed WhichOneof() to work with de-serialized protobuf messages.
  * Fixed a missing file problem of Python C++ implementation.

I'll soon upload it to Maven and pypi for Java and Python respectively.

Cheers,
Feng

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.

fkk...@gmail.com

unread,
Dec 14, 2015, 4:58:05 AM12/14/15
to Protocol Buffers, fkk...@gmail.com
Hi Feng,

Thanks for your confirmation.

For our issue of not able to send messages after upgrading to protobuf 2.6.1, our application depends on an API which was compiled with protobuf 2.4.1, when we try to use that particular API in our application with protobuf 2.6.1, we get the following exception:

java.lang.UnsupportedOperationException: This is supposed to be overridden by subclasses.
        at com.google.protobuf.GeneratedMessage.getUnknownFields(GeneratedMessage.java:192)

Some other sources on the net saying messages compiled with a particular version of protobuf would not work when run with a different version of protobuf.

Is there a solution to this issue, provided that I won't be able to change the API that depends on protobuf 2.4.1?

Thanks,
Francis

Feng Xiao

unread,
Dec 14, 2015, 4:51:17 PM12/14/15
to fkk...@gmail.com, Protocol Buffers
On Mon, Dec 14, 2015 at 1:58 AM <fkk...@gmail.com> wrote:
Hi Feng,

Thanks for your confirmation.

For our issue of not able to send messages after upgrading to protobuf 2.6.1, our application depends on an API which was compiled with protobuf 2.4.1, when we try to use that particular API in our application with protobuf 2.6.1, we get the following exception:

java.lang.UnsupportedOperationException: This is supposed to be overridden by subclasses.
        at com.google.protobuf.GeneratedMessage.getUnknownFields(GeneratedMessage.java:192)

Some other sources on the net saying messages compiled with a particular version of protobuf would not work when run with a different version of protobuf.

Is there a solution to this issue, provided that I won't be able to change the API that depends on protobuf 2.4.1?
This is a known issue and we don't any good solution for it. Basically your project and your dependencies need to use the same version of protobuf. If not, there will be incompatible problems like this. From v3.0.0, we will provide backward binary compatibilities of the proto Java runtime. I.e., if you have a dependency that uses protobuf v3.0.0, after upgrading protobuf to v3.0.5 it will continue to work. For old versions though, repackaging is probably the only viable solution.
Reply all
Reply to author
Forward
0 new messages