Skip to content

Port python bindings to Python 3 - #66

Closed
Kentzo wants to merge 8 commits into
protocolbuffers:masterfrom
GreatFruitOmsk:master
Closed

Kentzo wants to merge 8 commits into
protocolbuffers:masterfrom
GreatFruitOmsk:master

Conversation

@Kentzo

@Kentzo Kentzo commented Oct 27, 2014

Copy link
Copy Markdown

Here I'm going to address remaining issues by merging changes from my diverged fork that made Protobuf 2.5.1 compatible with Python 3 by retaining compatibility with all other supported versions.

I kindly ask authorized developers to review and leave comments and I'll try to address them as soon as I can.

A few questions:

@Kentzo Kentzo changed the title Port Protobuf to work under Python 3 Port python bindings to Python 3 Oct 27, 2014
@xfxyjwf

xfxyjwf commented Oct 27, 2014

Copy link
Copy Markdown
Contributor

+ @mrovner to help take a look.

Comment thread python/ez_setup.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Replacing the old, Python2-only 'ez_setup.py' with one from the setuptools bitbucket repo is definitely the Right Thing. FTR, the permalink for "latest and greatest" ez_setup.py is: https://bootstrap.pypa.io/ez_setup.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change related to the Python3 port, or is it just ensuring better coverage of what the testcase name says it is about?

@Kentzo

Kentzo commented Nov 18, 2014

Copy link
Copy Markdown
Author

@xfxyjwf @mrovner Do we still need to support Python 2.5 in protobuf 2.6+ ?

@mrovner

mrovner commented Nov 18, 2014

Copy link
Copy Markdown

Yes, we still have 2.5 clients.

On Tue, Nov 18, 2014 at 8:53 AM, Ilya Kulakov notifications@github.com
wrote:

@xfxyjwf https://github.com/xfxyjwf @mrovner
https://github.com/mrovner Do we still need to support Python 2.6 in
protobuf 2.6+ ?

—
Reply to this email directly or view it on GitHub
#66 (comment).

Thanks,
--Mike

@Kentzo

Kentzo commented Nov 18, 2014

Copy link
Copy Markdown
Author

@tseaver Please edit your reviews given that answer :)

@tseaver

tseaver commented Nov 18, 2014

Copy link
Copy Markdown
Contributor

@mrovner I thought the question was about keeping 2.6 support: are you saying that we need to ship a protobuf that spans 2.5 through 3.4?

Would bumping a major version to signal dropping 2.5 support while adding 3.x support be reasonable? Users stuck on Python 2.5 would then stay with protobuf 2.6.x, while those who needed Py3k could move to protobuf 2.7.x.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might make more sense to move this block up to line 44, instead of having the if statement down here.

@sebastianludwig

Copy link
Copy Markdown

Is there any way to support this pull request?

@tseaver

tseaver commented Dec 15, 2014

Copy link
Copy Markdown
Contributor

I note that the master is no aiming at a 3.0.0 release: that would seem like an ideal time to drop support for Python < 2.6.

Comment thread python/setup.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that we rely on setuptools (boostrapping from ez_setup.py if it isn't present), we should be able to use its find_packages() rather than enumerating modules by hand.

@davidB

davidB commented Dec 20, 2014

Copy link
Copy Markdown

Hi,

Until support of python, I share my workaround, a script to convert to python3:

# more info at http://python3porting.com/bookindex.html
# download protobuf-2.6.1.tar.gz for python
cd modules
rm -Rf google
tar -xzvf ~/Téléchargements/protobuf-2.6.1.tar.gz protobuf-2.6.1/google
2to3-3.4 protobuf-2.6.1/google -o google -W --no-diffs -p -n
rm -Rf protobuf-2.6.1

2to3 is a tool provide by python3.
I used it be able to use protobuf with bendler (blender 2.72 include python 3.4.2)

@Kentzo

Kentzo commented Jan 6, 2015

Copy link
Copy Markdown
Author

@mrovner I believe this PR can be closed without merging. Please confirm.

@tamird

tamird commented May 15, 2015

Copy link
Copy Markdown
Contributor

@Kentzo protobuf now officially doesn't need to support python 2.5 and 2.6. Would you like to rebase this such that only 2.7+ is supported?

@Kentzo

Kentzo commented May 21, 2015

Copy link
Copy Markdown
Author

@tamird I don't have time to review that right now. We don't plan to migrate to 2.6 anytime soon.

Any help is welcome :)

@tamird

tamird commented Aug 22, 2015

Copy link
Copy Markdown
Contributor

@haberman probably time to close this guy :)

@haberman

Copy link
Copy Markdown
Member

Ah yes, this has been addressed in other changes. Closing now.

@haberman haberman closed this Feb 16, 2016
TeBoring pushed a commit to TeBoring/protobuf that referenced this pull request Jan 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.