Closed rozling closed 9 years ago
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.
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:
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.
@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.
@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?
2.6 is fine for a minimum version.
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
There seems to be a python3 compatible unofficial clone: https://github.com/enorvelle/GoogleApiPython3x
+1
wait.. google doesn't support python3?
Yeah, it's ridiculous On Aug 14, 2014 11:10 PM, "Dustin Farris" notifications@github.com wrote:
wait.. google doesn't support python3?
— Reply to this email directly or view it on GitHub https://github.com/google/google-api-python-client/issues/3#issuecomment-52245125 .
its unbelievable. and theres not even concrete plans it seems like...
dammit, google :-1:
Hah! From the Python example in their docs:
This document assumes that you have the latest version of Python installed
Not!
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.
+1 here as well. I'm trying to extract data from google docs.
+1
@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?
oauth2client is now updated for python3. i've done no work on this repo.
I'm waiting python3 support too. Pull #25 offers the way to migrate python3.
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.
+1 for Python 3 support.
+1 for Python 3 support.
:+1: for python support. I want to start a new project and this is the only dependency that requires Python 2
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?
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
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
+1 for Python 3 support.
Same here, will be happy to have python3 support and not deal with youtube by hand
please also update samples for Python3, as I've already got some issues using library under Python3
Since https://github.com/google/oauth2client/pull/43 has been merged. I don't issue any issue to port gapc to py2/3 compatibility.
+1
It would be good if the supported Python versions (i.e. non-support for Python 3) were properly documented (e.g. in the Trove classifiers in setup.py):
https://github.com/google/google-api-python-client/blob/master/setup.py#L87
This message is also misleading:
print('google-api-python-client requires python version >= 2.6.'
(from https://github.com/google/google-api-python-client/blob/master/setup.py#L25 )
+1 for python 3
I've updated the codebase in my fork to work with both Python 2 and 3. It still can be optimized more, but it is passing all of the tests in 2.6, 2.7, 3.3, and 3.4.
Hopefully my pull request will be reviewed and merged soon, there are a lot of changes.
+1 for Python 3 support.
+1 for Python 3 support.
yep, really need python3 support now folks!
This thread makes me cry. I am deeply saddened that the google-api-python-client is only available for Python2. This really throws a wrench in the works of my new project.
It's really sad that there are so many requests, but no response from @google about roadmap.
Maybe twitter is a better way to reach them?
Is there any reason we can't consolidate around the most promising fork? Is there one?
Anyone tried with the lib2to3? I am sure supported errors like these one are common:
File "C:\Python33\lib\site-packages\googleapiclient\discovery.py", line 208
except ValueError, e:
^
SyntaxError: invalid syntax
This line should be except ValueError as e:
as lib2to3 automatically changes.
:+1:
Bit dumbfounded to find out I can't use Google APIs with Python 3 already, so adding my +1.
adding my +1 to this! Google does support py3.3+ in oauth2client, so why not here too?
:+1:
+1. I'll experiment with @pferate's fork for now.
I've been using that one quite successfully. However, I only use the calendar functionality. Be sure to use the version of oauthclient mentioned in that thread.
+1
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.