Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python 3.7 compatibility #4862

Merged
merged 1 commit into from Jul 12, 2018

Conversation

benmwebb
Copy link
Contributor

@benmwebb benmwebb commented Jul 3, 2018

Compilation of Python wrappers fails with Python 3.7 because
the Python folks changed their C API such that
PyUnicode_AsUTF8AndSize() now returns a const char* rather
than a char*. Add a patch to work around. Relates #4086.

Compilation of Python wrappers fails with Python 3.7 because
the Python folks changed their C API such that
PyUnicode_AsUTF8AndSize() now returns a const char* rather
than a char*. Add a patch to work around. Relates protocolbuffers#4086.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@benmwebb
Copy link
Contributor Author

benmwebb commented Jul 3, 2018

I signed it!

@anandolee
Copy link
Contributor

anandolee commented Jul 6, 2018

Thanks for your PR

Is it the only thing that we need to fix for python3.7? Can you also help add python3.7 in tests.sh as well:
https://github.com/google/protobuf/blob/00d32539c6aa0c4efe9577561a00f443edd9a417/tests.sh

@benmwebb
Copy link
Contributor Author

benmwebb commented Jul 7, 2018

Is it the only thing that we need to fix for python3.7?

To the best of my knowledge, yes.

Can you also help add python3.7 in tests.sh as well

I don't know enough about your build system to confidently do that, but it looks like you run this on Travis, and I do know that making Python 3.7 work on Travis is a little involved because they require a newer OpenSSL than is present in Ubuntu Trusty - see travis-ci/travis-ci#9069.

@anandolee
Copy link
Contributor

Thanks, we can add the 3.7 tests in other RPs.

@anandolee
Copy link
Contributor

CLA is still complain. Can you double check?

@benmwebb
Copy link
Contributor Author

benmwebb commented Jul 9, 2018

CLA is still complain. Can you double check?

Just checked at https://cla.developers.google.com/clas and it shows I have a Google Individual CLA signed Jul 03, 2018 09:57 PDT.

@anandolee
Copy link
Contributor

anandolee commented Jul 10, 2018

Are you using a different email address on your commit? It shows you are using ben@salilab.org for the commit, are you using this email to sign CLA and this email is set on your github account?

@benmwebb
Copy link
Contributor Author

Right, ben@salilab.org is the commit email and is tied to my GitHub account. It is also an alternate email for my Google account, so all should be good there too. I just updated the CLA to add my GitHub username - maybe that will fix things at your end.

@googlebot
Copy link

CLAs look good, thanks!

@handlerbot
Copy link

Hi protobufferians --

TY @benmwebb for getting this fix in! 🌟

Is there anywhere I see the roughly planned schedule for the next release (3.7.0 or 3.6.2?), so we can figure out if we should wait for it, or patch this into protobuf 3.6.1 after we download it, if we are trying to build against Python 3.7.

Thanks!

@acozzette
Copy link
Member

@handlerbot We don't have a set timeline for when our next release will be, but we will most likely do a 3.7.0 release before the end of the year (we probably won't be doing any more 3.6 patch releases).

fo40225 pushed a commit to fo40225/protobuf that referenced this pull request Nov 9, 2018
Compilation of Python wrappers fails with Python 3.7 because
the Python folks changed their C API such that
PyUnicode_AsUTF8AndSize() now returns a const char* rather
than a char*. Add a patch to work around. Relates protocolbuffers#4086.
@kkdd
Copy link

kkdd commented Nov 26, 2018

I look forward to python-3.7-compatible protobuf 3.6.x release, beause protobuf 3.6.1.1 or earlier is incompatible with it.

acozzette pushed a commit to acozzette/protobuf that referenced this pull request Dec 4, 2018
Compilation of Python wrappers fails with Python 3.7 because
the Python folks changed their C API such that
PyUnicode_AsUTF8AndSize() now returns a const char* rather
than a char*. Add a patch to work around. Relates protocolbuffers#4086.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants