Thanks for doing this. Unfortunately, I guess this requires forking the code? There is a lot of work that needs to be done on the Python version and having to do them all twice will be pretty annoying. In fact there is a rather large change coming which improves performance quite a bit which presumably we'll also want in the Python 3 version, but it would probably be easier to re-do the port than to try to integrate the change into what you have. So I'm not sure what we should do with this...
On Mon, Sep 14, 2009 at 10:46 PM, Monty Taylor <mord...@inaugust.com> wrote: > Monty Taylor wrote: > > Kenton Varda wrote: > >> Does Python 3.x implement metaclasses the same way? It looks to me like > >> the metaclass may not be getting applied. > > > > AIUI, setuptools (and therefore pkg_resources) have not yet been ported > > to python3 yet. I believe there are discussions about including > > pkg_resources directly in python3 (perhaps via distutils), but the PEP > > seems withdrawn. > > > I've also got a diff (attaching) to the python dir that works with > > python3. I have not patched protoc, nor have I done significant testing, > > but this works: > > I obviously have _way_ too much time on my hands... > > Here is a _large_ patch which adds python3 support in addition to > python2 support. It adds what I've found so far are the changes needed > in protoc output. (the b"".decode("utf-8") vs. unicode("","utf-8") and > metaclass = "foo" in the class specifier). It also enables the test > suite and gets it running. > > The test suite does _not_ pass. Much of the test suite (and protobuf > itself) is dependent on transferring bytes, and with the switch from > string()=="" and unicode() in python2 to unicode()=="" and bytes() in > python3, there are serveral bugs in the straight-forward porting. I have > not dug fully in to these bugs, but the test suite does now at least > run. (albeit via python3 test.py not via python3 setup.py test) > > Monty > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~----------~----~----~----~------~----~------~--~---