GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Port python bindings to Python 3 by Kentzo · Pull Request #66 · protocolbuffers/protobuf

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:

  • Did you loose the requirements for minimum Python 2 version?
  • Most tests are missing here: https://github.com/GreatFruitOmsk/protobuf/blob/master/python/setup.py#L100-L102. Why?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Kentzo
Kentzo force-pushed the master branch from 53db375 to b9ab66f Compare October 27, 2014 02:32
@Kentzo Kentzo changed the title Port Protobuf to work under Python 3 Port python bindings to Python 3 Oct 27, 2014
@Kentzo
Make setup.py/ez_setup.py runnable under Python 3.
1c0d421
@Kentzo
Kentzo force-pushed the master branch from b9ab66f to 1c0d421 Compare October 27, 2014 02:35
@xfxyjwf xfxyjwf assigned mrovner Oct 27, 2014
@xfxyjwf

xfxyjwf commented Oct 27, 2014

Copy link
Copy Markdown
Contributor

+ @mrovner to help take a look.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Kentzo added 7 commits October 28, 2014 23:27
@Kentzo
Re-structure utils.py to simplify reading.
543ffb9
@Kentzo
Make cpp_message and decoder python 3 compatible.
cbbbf08
@Kentzo
Make python_generator python 3 compatible.
d91115a
@Kentzo
Make encoder python 3 compatible.
3a32639
@Kentzo
Make enum_type_wrapper python 3 compatible.
3552389
@Kentzo
Make python message python 3 compatible.
0b69b26
@Kentzo
Make reflection test python 3 compatible.
ae5c3d0
@Kentzo Kentzo mentioned this pull request Nov 8, 2014
setup.py fixes for Python 3 #50
Merged
@tseaver tseaver mentioned this pull request Nov 18, 2014
Protobuf 2.6.0 incompatibility issues with Python 3.x #7
Closed
tseaver
tseaver reviewed Nov 18, 2014
View reviewed changes
Comment thread python/ez_setup.py

@tseaver tseaver Nov 18, 2014

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
tseaver
tseaver reviewed Nov 18, 2014
View reviewed changes
Comment thread python/google/protobuf/internal/reflection_test.py

@tseaver tseaver Nov 18, 2014

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@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+ ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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 [email protected]
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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Kentzo

Kentzo commented Nov 18, 2014

Copy link
Copy Markdown
Author

@tseaver Please edit your reviews given that answer :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

virtuald
virtuald reviewed Nov 21, 2014
View reviewed changes
Comment thread python/google/protobuf/internal/cpp_message.py

@virtuald virtuald Nov 21, 2014

Copy link
Copy Markdown

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tseaver tseaver mentioned this pull request Nov 24, 2014
Ensure Python 3 support googleapis/google-cloud-python#91
Closed
@sebastianludwig

sebastianludwig commented Dec 15, 2014

Copy link
Copy Markdown

Is there any way to support this pull request?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tseaver
tseaver reviewed Dec 15, 2014
View reviewed changes
Comment thread python/setup.py

@tseaver tseaver Dec 15, 2014

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@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)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Kentzo

Kentzo commented Jan 6, 2015

Copy link
Copy Markdown
Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@googlebot googlebot added the cla: yes label Jan 6, 2015
@tseaver tseaver mentioned this pull request Jan 13, 2015
Prepare for Python2-Python3 straddle. #164
Merged
@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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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 :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@haberman haberman mentioned this pull request Jul 28, 2015
Status of Python 3 (3.4+) support? #646
Closed
@tamird

tamird commented Aug 22, 2015

Copy link
Copy Markdown
Contributor

@haberman probably time to close this guy :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@haberman

haberman commented Feb 16, 2016

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@haberman haberman closed this Feb 16, 2016
@google-admin google-admin unassigned mrovner Aug 21, 2018
TeBoring pushed a commit to TeBoring/protobuf that referenced this pull request Jan 19, 2019
@haberman
Merge pull request protocolbuffers#66 from mortonfox/patch-1
dfc4096
Fix email links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

11 participants

@Kentzo @xfxyjwf @mrovner @tseaver @sebastianludwig @davidB @tamird @haberman @virtuald @trofimander @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.