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

Python 3 #3

Closed
rozling opened this issue May 6, 2014 · 87 comments
Closed

Python 3 #3

rozling opened this issue May 6, 2014 · 87 comments
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@rozling
Copy link

rozling commented May 6, 2014

Request for Python 3 support (continuing on from https://code.google.com/p/google-api-python-client/issues/detail?id=57). My use case is for using the popular editor Sublime Text 3 to interact with the Google API.

@craigcitro
Copy link
Contributor

This is on our radar, but we don't have any concrete plans right now. I'm going to tag this "enhancement" for now, so people don't keep reopening.

@ianjosephwilson
Copy link

I also need python3 support since I started a project with python3 and now I want google+ sigin and access to google contacts. Here is the google document which lists the google api python client as needed for the g+ signin implementation, see step 8: https://developers.google.com/+/web/signin/server-side-flow

It seems that there are two strategies:

  1. separate code bases for python2 and python3
  2. combined code base that supports both python2 and python3

It seems that no actual python dependency is listed for either google-api-python-client or oauth2client. The python documentation states that limiting support to Python 2.6+ will make strategy 2, a combined code base, easier:
https://docs.python.org/3/howto/pyporting.html#try-to-support-python-2-6-and-newer-only

Seeing python3 support as inevitable if a high level path is chosen now then others can start contributing.

@craigcitro
Copy link
Contributor

@ianjosephwilson i'm with you that we ultimately want a plan for moving to python 3 -- it also has to include oauth2client, and any other moving parts underneath. i'm happy to kick around ideas, but we don't have any sort of timeframe in mind just yet.

@ianjosephwilson
Copy link

@craigcitro I think same trick used in httplib2 could be used to choose the correct oauth2client lib if oauth2client used separate folders for python2 and python3. For example:

src_dir = 'python%s' % sys.version_info[0]
package_dir={
    'oauth2client':'oauth2client/' + src_dir + '/oauth2client',
    'uritemplate':'oauth2client/' + src_dir + /uritemplate',
}

So I don't think the embedding requirement will be limiting in choosing between strategies 1 and 2 I mentioned earlier.

What is the minimum python version that must be supported?

@craigcitro
Copy link
Contributor

2.6 is fine for a minimum version.

@ianjosephwilson
Copy link

Maybe updating each repo in place to work with both python 2.6+ and python 3.2+ would be the best option then, strategy 2.

Can a depedency on six be added? It is discussed in the python docs here: https://docs.python.org/3/howto/pyporting.html#projects-to-consider

@JelteF
Copy link

JelteF commented Jun 8, 2014

There seems to be a python3 compatible unofficial clone: https://github.com/enorvelle/GoogleApiPython3x

@esistgut
Copy link

+1

@dustinfarris
Copy link

wait.. google doesn't support python3?

@JelteF
Copy link

JelteF commented Aug 14, 2014

Yeah, it's ridiculous
On Aug 14, 2014 11:10 PM, "Dustin Farris" [email protected] wrote:

wait.. google doesn't support python3?


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

@slessans
Copy link

its unbelievable. and theres not even concrete plans it seems like...

@dustinfarris
Copy link

dammit, google 👎

@dustinfarris
Copy link

Hah! From the Python example in their docs:

This document assumes that you have the latest version of Python installed

Not!

@craigcitro
Copy link
Contributor

to anyone complaining we didn't already implement this: happy to look at pull requests. ;)

@ianjosephwilson we're making good progress on getting oauth2client updated for py3, and it looks like we're going to be able to do it with a single codebase (and no import magic). that's definitely the way i'd like to do it here, too, unless there's a reason i'm not seeing that it won't work.

@fake-name
Copy link

+1 here as well. I'm trying to extract data from google docs.

@hyunwooj
Copy link

hyunwooj commented Oct 9, 2014

+1

@troygrosfield
Copy link

@craigcitro, you mentioned making good progress 3 months ago. Where does py3 support currently stand? No need to duplicate efforts. Is there a py3 branch being worked on?

@craigcitro
Copy link
Contributor

oauth2client is now updated for python3. i've done no work on this repo.

@icoxfog417
Copy link

I'm waiting python3 support too. Pull #25 offers the way to migrate python3.

@Alex3917
Copy link

Just wanted to add that this is the only dependency in my application that doesn't support Python3, so any work done porting this would be much appreciated.

@chhantyal
Copy link

+1 for Python 3 support.

1 similar comment
@01001010x
Copy link

+1 for Python 3 support.

@leto
Copy link

leto commented Dec 4, 2014

👍 for python support. I want to start a new project and this is the only dependency that requires Python 2

@victorhooi
Copy link

For our particular use case, we're using the Gmail API and also interacting with JIRA behind SSL - this requires SNI, which Python 2.x doesn't support:

http://docs.python-requests.org/en/latest/community/faq/#what-are-hostname-doesn-t-match-errors

So yes, Python 3.x support would be fantastic for this issue (among all the other good reasons, of course).

Is there any update on this yet?

@FirefighterBlu3
Copy link

given that python2 doesn't support SNI and google is planning on dropping all ssl3 support "real soon now", and forcing most (all) connections to be https, it's very important that we (when i say WE, i really mean GOOGLE because the other we -- aka devs, are desperately in need of py3 support for not just SNI, but many other things py2 doesn't support) start supporting python3 as soon as possible across the board.

python2 ssl support is rather horrible and shoehorning things like pyopenssl in doesn't really solve problems and creates a lot of code refactoring and dependencies.

i'll be very happy to test google facing modules for py3 support. google not supporting python3 pretty much across the board in all their tools, is pretty much the biggest reason i avoid using google tools.

any informed people that can explain why google strongly ignores py3? i'm not looking for rumor mongoring or hate bashing, i'm looking for avenues to address the problems.

p.s. i use sublimetext3 as well and i would dearly love to hook this up

@wldcordeiro
Copy link

I really want to see this happen, is there a branch with Python 3 support in the works? I'm willing to help port the library. @craigcitro

@JelteF
Copy link

JelteF commented Mar 10, 2015

You can use the trick from this comment: #45 (comment)
Now that it's merged you can use this in your requirements.txt

git+git://github.com/google/google-api-python-client@master#egg=google-api-python-client

And remember to use oauth2client 1.4.2 instead of the newest one.

@cnelson
Copy link

cnelson commented Mar 10, 2015

FWIW, this looks solid to me across python 2 and python 3. My test suite runs clean.

Any idea when we can expect to see this hit PyPI?

Tox output

py26: commands succeeded
py27: commands succeeded
py33: commands succeeded
py34: commands succeeded
flake8: commands succeeded
congratulations :)

@tommyjcarpenter
Copy link

Ahh, sorry, my fault! I pip3ed (which worked) without realizing this probably wasn't pushed into PyPi yet.

@pferate
Copy link
Contributor

pferate commented Mar 10, 2015

Not sure when it will be pushed. I created another PR (#67) to update some setup.py for PyPi, but it will be up to the Googlers to push it out.

@nathanielmanistaatgoogle
Copy link
Contributor

Python 3 support has now been pushed to PyPI as version 1.4.0 (https://pypi.python.org/pypi/google-api-python-client/1.4.0). Please everyone test away and report defects and mistakes back to us here?

@methane
Copy link
Contributor

methane commented Mar 11, 2015

@tommyjcarpenter
Copy link

@methane It looks like that was not yet pushed to PyPI. Latest install 0.9 still broken. Installing from source worked!

@kylegoetz
Copy link

"No Python 3 Support" probably should be up front and center. I spent quite a while trying to figure out why installing with pip3 worked but the Google samples all failed on authorization. It's because clean_headers() that the docs says converts bytes to strings actually converts strings to bytes with Python 3!

@wldcordeiro
Copy link

@kylegoetz Read this thread, Python 3 is supported but the package on PyPI isn't updated yet.

@kylegoetz
Copy link

@wldcordeiro Sorry, the issue is still marked as open, so I thought that meant the issue was not resolved.

In any case, this repo instructs you to install with pip, and installing with pip downloads a version for Python 2 even if you're using pip for Python 3. So the install instructions are not correct. That's all I was trying to say: should be corrected install instructions.

@tommyjcarpenter
Copy link

Pip3 install from Google works now, if you install httplib2 from master from source first. That library is the one that hasn't yet been pushed to PyPi. I pip3ed the Google API without problems after installing that library.

(On my phone, sorry for any typos)

On Mar 21, 2015, at 19:21, kylegoetz [email protected] wrote:

@wldcordeiro Sorry, the issue is still marked as open, so I thought that meant the issue was not resolved.

In any case, this repo instructs you to install with pip, and installing with pip downloads a version for Python 2 even if you're using pip for Python 3. So the install instructions are not correct. That's all I was trying to say: should be corrected install instructions.


Reply to this email directly or view it on GitHub.

@tmatsuo
Copy link
Contributor

tmatsuo commented Apr 13, 2015

Good news!
httplib2 0.9.1 is released and now it's working even if you get everything from PyPi.

@tommyjcarpenter
Copy link

🎉😀👍

@wldcordeiro
Copy link

This issue can be closed at this point.

@cjerdonek
Copy link

Please everyone test away and report defects and mistakes back to us here?

FYI, I'm having trouble sending e-mails with binary (PDF) attachments when using Python 3.4 (google-api-python-client version 1.4.0 and httplib2 version 0.9.1). Issue filed here.

@nathanielmanistaatgoogle
Copy link
Contributor

This seems to be an overall success; closing this issue.

@xenomachina
Copy link

This page still says only 2.6 and 2.7 are supported: https://developers.google.com/api-client-library/python/start/installation

@tmatsuo
Copy link
Contributor

tmatsuo commented May 9, 2015

@xenomachina Thanks! Filed an internal bug.

@wescpy
Copy link

wescpy commented Aug 6, 2015

Bug fixed... the official docs now state 2.6, 2.7, 3.3, and 3.4 are supported. Python 3 users will probably use "pip3" instead of "pip".

@darth30joker
Copy link

Excellent!

---- 
Best Regards,
David Xie
Founder of ScriptFan technology community - http://scriptfan.com
Manager of Xi'an GDG (Google Developer Group) - http://gdgxian.org
http://about.me/davidx


Everything happens for a reason. Attitude determines everything!

On 7 August, 2015 at 3:11:54 am, wesley chun ([email protected]) wrote:

Bug fixed... the official docs now state 2.6, 2.7, 3.3, and 3.4 are supported. Python 3 users will probably use "pip3" instead of "pip".


Reply to this email directly or view it on GitHub.

akrherz pushed a commit to akrherz/google-api-python-client that referenced this issue Apr 1, 2019
akrherz pushed a commit to akrherz/google-api-python-client that referenced this issue Apr 1, 2019
Backward compatibility update (Google/oauth2client)
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests