Re: Issue 229 in gdata-python-client: Support Python 3

333 views
Skip to first unread message

gdata-pyt...@googlecode.com

unread,
Mar 30, 2011, 10:15:32 AM3/30/11
to gdata-python-client-...@googlegroups.com

Comment #7 on issue 229 by edwin....@innovationgear.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Really want the gdata API and all the service specific API to support
python 3.x!

gdata-pyt...@googlecode.com

unread,
May 21, 2011, 2:23:17 AM5/21/11
to gdata-python-client-...@googlegroups.com

Comment #8 on issue 229 by kanglin....@gmail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

I need the gdata for python 3.0 too. Not to my surprise, 2to3 does not work
well. It is possible to change the code mannually, but an official package
is preferred.

gdata-pyt...@googlecode.com

unread,
May 21, 2011, 11:18:52 AM5/21/11
to gdata-python-client-...@googlegroups.com

Comment #9 on issue 229 by a...@trajano.net: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

I gave up on this for the time being, what I did was cheat and installed
Python 2 and then have system calls to invoke the GData components in
Python 2 I just had a wrapper that accepts files to contain the commands
and data that I have to pass in. So push comes to shove there is a way,
not elegant but still a way.

gdata-pyt...@googlecode.com

unread,
Jul 15, 2011, 3:33:14 AM7/15/11
to gdata-python-client-...@googlegroups.com

Comment #10 on issue 229 by terrible...@gmail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Is there any news about python 3 support?
It would be very useful for a lot of people.

gdata-pyt...@googlecode.com

unread,
Oct 7, 2011, 8:26:18 AM10/7/11
to gdata-python-client-...@googlegroups.com
Updates:
Labels: Component-Core

Comment #11 on issue 229 by afs...@google.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

(No comment was entered for this change.)

gdata-pyt...@googlecode.com

unread,
Oct 7, 2011, 9:21:43 AM10/7/11
to gdata-python-client-...@googlegroups.com

Comment #12 on issue 229 by afs...@google.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Issue 370 has been merged into this issue.

gdata-pyt...@googlecode.com

unread,
Jan 12, 2012, 7:26:06 AM1/12/12
to gdata-python-client-...@googlegroups.com

Comment #13 on issue 229 by Mitya57: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Are there any plans to fix it?

What I can suggest:

- make some changes that will not break compatibility with 2.x:
- "print something" -> "print(something)"
- "except ExceptionName, something" -> "except ExceptionName as something"
- ensure that 2to3 does its job right
- use distutils' built-in tool for running 2to3 while building (from
distutils.command.build_py import build_py_2to3); many modules use that,
check python-markdown as an example

We at ReText (retext.sf.net) are very interested in python3 version of
gdata.
If you want our help, please feel free to email me.

See http://wiki.python.org/moin/PortingPythonToPy3k for more details on
porting.

gdata-pyt...@googlecode.com

unread,
Jan 12, 2012, 5:14:36 PM1/12/12
to gdata-python-client-...@googlegroups.com

Comment #14 on issue 229 by afs...@google.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Thanks for the input, realistically this is not something we are going to
take on at this stage. I am happy to review any patches to make this work.

gdata-pyt...@googlecode.com

unread,
Jan 18, 2012, 7:57:55 AM1/18/12
to gdata-python-client-...@googlegroups.com

Comment #15 on issue 229 by Mitya57: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

I've almost finsished the patch to use 2to3 during build, just one question:

Where is DocsClient.Upload fuction? (It was there in 2.0.14, and the
documentation still mentions it. All other functions seem to be still
there). And what's the replacement?

Python 2.7:
>>> import gdata.docs.client
>>> gdClient = gdata.docs.client.DocsClient()
>>> 'Upload' in dir(gdClient)
False

gdata-pyt...@googlecode.com

unread,
Jan 18, 2012, 8:25:13 AM1/18/12
to gdata-python-client-...@googlegroups.com

Comment #16 on issue 229 by afs...@google.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Hi, it is not there, upload is handled transparently now if there is media
to upload in create_resource etc.

gdata-pyt...@googlecode.com

unread,
Jan 28, 2012, 6:25:46 AM1/28/12
to gdata-python-client-...@googlegroups.com

Comment #17 on issue 229 by Mitya57: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Can somebody please reply my support request at
https://groups.google.com/forum/#!forum/google-help-dataapi (it's awaiting
moderator approve)? I still can't test my patch because of that thing. :(

gdata-pyt...@googlecode.com

unread,
Feb 26, 2012, 9:42:26 AM2/26/12
to gdata-python-client-...@googlegroups.com

Comment #18 on issue 229 by Mitya57: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Attached current version of my patch — I hope it doesn't break
compatibility with old Python versions. Note that I only tested it with
Documents API.

Also, I commented out two lines in jython_compat.py — those
overriding "True" and "False", because they caused SyntaxErrors during
module installation. Uncomment them back if they are still needed :)

(Sorry for the delay, I didn't have enough time for finish that.)

Attachments:
support_python3.diff 3.7 KB

gdata-pyt...@googlecode.com

unread,
Mar 31, 2012, 10:53:33 PM3/31/12
to gdata-python-client-...@googlegroups.com

Comment #19 on issue 229 by v...@g.nevcal.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

This patch is really short, and the previous comment mentions not being
able to test it... but that was a month earlier.

If it is tested, I'd like to try it out, and since it is so short, I'm
wondering why it isn't applied and released.

I suppose I need to get a newer gdata to start from, though, is there a
known minimum released version for this patch, or does the patch only work
with unreleased versions?

gdata-pyt...@googlecode.com

unread,
Apr 5, 2012, 1:30:10 AM4/5/12
to gdata-python-client-...@googlegroups.com

Comment #20 on issue 229 by Mitya57: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

> Is there a known minimum released version for this patch, or does the

> patch only work with unreleased versions?

It works with 2.0.15/16/trunk, and should work with some older versions,
too.

> The previous comment mentions not being able to test it.

This patch should make most services support Python 3, if there are some
service-specific issues, please let me know. (I'm not sure if I'll be able
to fix those because Documents is the only service I worked with).

gdata-pyt...@googlecode.com

unread,
Jul 1, 2012, 2:03:02 AM7/1/12
to gdata-python-client-...@googlegroups.com

Comment #21 on issue 229 by v...@g.nevcal.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

So I got interrupted from this, and just now getting back to it. I applied
this patch to 2.0.17, and get the following stack trace:

During both build and install runs of setup.py, I got the following message:
C:\Python33\lib\distutils\dist.py:257: UserWarning: Unknown distribution
option: 'install_requires'

So likely the following stack trace is due to an uninstalled dependency?
But I would think that installing into Python3.3 Beta 1 should already have
ElementTree, and as far as I understand the setup.py script, that is the
only dependency.

Or is the TypeError about not supporting the buffer interface symptomatic
of something else, like another place where a .decode() is needed?


Traceback (most recent call last):
File "C:\Python33\lib\http\client.py", line 859, in send
self.sock.sendall(data)
File "C:\Python33\lib\ssl.py", line 425, in sendall
v = self.send(data[count:])
File "C:\Python33\lib\ssl.py", line 386, in send
v = self._sslobj.write(data)
TypeError: 'str' does not support the buffer interface

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\my\py\getGoogleDocs.py", line 267, in <module>
main()
File "D:\my\py\getGoogleDocs.py", line 245, in main
main_download()
File "D:\my\py\getGoogleDocs.py", line 208, in main_download
docs = googdocs()
File "D:\my\py\getGoogleDocs.py", line 64, in __init__
self.gdc.ClientLogin( email, password )
File "C:\Python33\lib\site-packages\gdata\service.py", line 834, in
ClientLogin
self.ProgrammaticLogin(captcha_token, captcha_response)
File "C:\Python33\lib\site-packages\gdata\service.py", line 771, in
ProgrammaticLogin
headers={'Content-Type':'application/x-www-form-urlencoded'})
File "C:\Python33\lib\site-packages\atom\http.py", line 171, in request
_send_data_part(data, connection)
File "C:\Python33\lib\site-packages\atom\http.py", line 347, in
_send_data_part
connection.send(data)
File "C:\Python33\lib\http\client.py", line 863, in send
self.sock.sendall(d)
File "C:\Python33\lib\ssl.py", line 425, in sendall
v = self.send(data[count:])
File "C:\Python33\lib\ssl.py", line 386, in send
v = self._sslobj.write(data)
TypeError: 'str' does not support the buffer interface


gdata-pyt...@googlecode.com

unread,
Jul 1, 2012, 2:38:25 AM7/1/12
to gdata-python-client-...@googlegroups.com

Comment #22 on issue 229 by v...@g.nevcal.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

OK, so I tried to hack _send_data_part similarly to one of the other diffs,
and got further, but now it seems that while I seem to login correctly,
when I do anything I get a "Token invalid" 401 error.

I converted the docs_example.py sample program using 2to3 (which
demonstrates that the patch doesn't do the conversion, and also the
docs_example.py contained statements like

input = raw_input()

which 2to3 wasn't smart enough to convert correctly, but I just changed the
local variable name in all the places such was done... and then the
docs_example.py also gets a Token Invalid. So it is either this new
machine, or some handling of the token should be changed for Python 3? Or?

gdata-pyt...@googlecode.com

unread,
Jul 2, 2012, 3:21:22 PM7/2/12
to gdata-python-client-...@googlegroups.com

Comment #23 on issue 229 by v...@g.nevcal.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

OK, I verified that with the unmodified library, and Python 2, my token
still works. So something is going wrong with token handling with this
patch.

gdata-pyt...@googlecode.com

unread,
Jul 2, 2012, 5:02:57 PM7/2/12
to gdata-python-client-...@googlegroups.com

Comment #24 on issue 229 by v...@g.nevcal.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

And now that I've installed Python 2.7.3 on this machine, along with an
unpatched gdata, my program still works. So it is not something different
about the new machine versus the old one, or the older version of gdata I'd
been using versus the gdata 2.0.17.

gdata-pyt...@googlecode.com

unread,
Nov 11, 2012, 8:40:17 PM11/11/12
to gdata-python-client-...@googlegroups.com

Comment #25 on issue 229 by bourget....@gmail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

No more news about support ?

gdata-pyt...@googlecode.com

unread,
Apr 23, 2013, 12:12:25 AM4/23/13
to gdata-python-client-...@googlegroups.com

Comment #26 on issue 229 by carlos.b...@gmail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

hey get with the program pyhon 3

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

gdata-pyt...@googlecode.com

unread,
Apr 23, 2013, 12:13:26 AM4/23/13
to gdata-python-client-...@googlegroups.com

Comment #27 on issue 229 by carlos.b...@gmail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Hey get with the program - python 3

gdata-pyt...@googlecode.com

unread,
Jul 15, 2013, 8:48:10 PM7/15/13
to gdata-python-client-...@googlegroups.com

Comment #28 on issue 229 by ycw...@gmail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Hey, I am looking forward to python 3.3 support too. I finally does all my
coding in python 3.3, but without gdata :(

gdata-pyt...@googlecode.com

unread,
Jul 31, 2013, 8:54:29 PM7/31/13
to gdata-python-client-...@googlegroups.com

Comment #29 on issue 229 by andyf...@gmail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Any progress? Python 3.x is long overdue.

gdata-pyt...@googlecode.com

unread,
Jul 31, 2013, 8:55:29 PM7/31/13
to gdata-python-client-...@googlegroups.com

Comment #30 on issue 229 by andyf...@gmail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Any progress? Python 3.x support is long overdue.

gdata-pyt...@googlecode.com

unread,
Aug 1, 2013, 5:08:21 PM8/1/13
to gdata-python-client-...@googlegroups.com

Comment #31 on issue 229 by afs...@google.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

There will never be official Python 3 support for this library - sorry. I
strongly recommend those interested parties fork.

gdata-pyt...@googlecode.com

unread,
Aug 1, 2013, 5:10:23 PM8/1/13
to gdata-python-client-...@googlegroups.com

Comment #32 on issue 229 by lodatom: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

FYI, for people using the Spreadsheets API, a much better library is
available at https://github.com/burnash/gspread/. If anyone is planning to
fork, gspread would be a good base from which to work.

gdata-pyt...@googlecode.com

unread,
Aug 1, 2013, 5:13:06 PM8/1/13
to gdata-python-client-...@googlegroups.com

Comment #33 on issue 229 by afs...@google.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

It is a better library, agreed. But it lacks some options for auth and
persists the deprecated ClientLogin which is not great.

gdata-pyt...@googlecode.com

unread,
Aug 1, 2013, 5:18:10 PM8/1/13
to gdata-python-client-...@googlegroups.com

Comment #34 on issue 229 by lodatom: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

If anyone is interested in that library, there is an open bug for OAuth2:
https://github.com/burnash/gspread/issues/21

gdata-pyt...@googlecode.com

unread,
Aug 1, 2013, 8:04:11 PM8/1/13
to gdata-python-client-...@googlegroups.com

Comment #35 on issue 229 by andyf...@gmail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Thanks for the update. I will explore different avenues.

gdata-pyt...@googlecode.com

unread,
Nov 19, 2013, 11:19:26 PM11/19/13
to gdata-python-client-...@googlegroups.com

Comment #36 on issue 229 by rishav...@gmail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

'''
I am trying to import the gdata from the python GUI .But I am getting this
error again and again on the console of the python
tell me how to fix this bug'''

import gdata
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import gdata
File "C:\Python33\Lib\site-packages\gdata\__init__.py", line 27, in
<module>
import atom
File "C:\Python33\Lib\site-packages\atom\__init__.py", line 133, in
<module>
CreateClassFromXMLString)
File "C:\Python33\Lib\site-packages\atom\__init__.py", line 97, in
mark_deprecated
optional_warn_function.func_name = f.func_name
AttributeError: 'function' object has no attribute 'func_name'

gdata-pyt...@googlecode.com

unread,
Nov 27, 2013, 11:44:02 AM11/27/13
to gdata-python-client-...@googlegroups.com

Comment #37 on issue 229 by harvey.f...@gmail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

It is baffling and *tremendously* disappointing that this library will
never get official Python 3 support. Python 2 is a dead language.

gdata-pyt...@googlecode.com

unread,
Nov 27, 2013, 1:59:37 PM11/27/13
to gdata-python-client-...@googlegroups.com

Comment #38 on issue 229 by afs...@google.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Which API are you using it with?

gdata-pyt...@googlecode.com

unread,
Nov 27, 2013, 2:28:46 PM11/27/13
to gdata-python-client-...@googlegroups.com

Comment #39 on issue 229 by harvey.f...@gmail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Primarily the YouTube API. There seems to be an experimental port of the
Google API to Python 3 at https://github.com/enorvelle/GoogleApiPython3x,
but all of my YouTube code is working fine and I'd rather port this gdata
code with 2to3 than use a new API library.

I meant no disrespect, either -- it's understandable to say that "we don't
yet use Python 3 inside Google so there is no internal impetus for us to
update this code". I do *not* understand, though, why you would not ever
consider integrating other people's work to make this code compatible with
Python 3 (if the changes pass all relevant testing, of course).

Python 2 is dying and by some respects is already dead. Things seem to be
on track for Ubuntu 14.04 to include only Python 3 in even the server
install images (Python 2 will of course be installable through apt but will
not be present by default). The Fedora project has plans to make Python 3
the default in Fedora 22 I think, and this will eventually make its way
into RHEL. If this library will only ever support a dead language, then it
is a dead project and should be clearly marked with a big red "do not use
this library for new projects" warning on the main project page.

gdata-pyt...@googlecode.com

unread,
Nov 29, 2013, 6:55:33 PM11/29/13
to gdata-python-client-...@googlegroups.com
Updates:
Owner: afs...@google.com

Comment #40 on issue 229 by afs...@google.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

Sure, no disrespect implied, but this is not a "we don't use Python 3
inside Google" issue. Unfortunately the nature of Python makes it so that
we can't guarantee stuff won't break with a large change. There are just
not enough tests, and the library is used in too many bizarre ways (think
private methods and other crazies) both internally to Google and
externally. Because of that I am not happy to integrate the large 2to3
change.

I would be very happy if someone forked and maintained a separate Python 3
branch. That would be far safer. I would be happy to help and make sure
patches were applied to both and to give it somewhat "official" blessing.

gdata-pyt...@googlecode.com

unread,
Nov 29, 2013, 6:57:33 PM11/29/13
to gdata-python-client-...@googlegroups.com

Comment #41 on issue 229 by afs...@google.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

P.s. If you did provide a 2to3 fork, I would only take the APIs that need
supporting, starting with YouTube, and perhaps Spreadsheets and some Admin
APIs. Less maintenance burden all-around.

gdata-pyt...@googlecode.com

unread,
Jan 7, 2014, 10:44:34 AM1/7/14
to gdata-python-client-...@googlegroups.com

Comment #42 on issue 229 by adrienbe...@gmail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

It doesn't matter how it is done (separate version or not) but Google need
to release and support a Python 3 version ASAP !

It is not an option since in the future Python 2 will disappear in favor of
Python 3.

gdata-pyt...@googlecode.com

unread,
Feb 14, 2014, 7:59:09 AM2/14/14
to gdata-python-client-...@googlegroups.com

Comment #43 on issue 229 by johntha...@gmail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

With Python 3.4 releasing next month, any news on a forked version of gdata
to support 3.X?

gdata-pyt...@googlecode.com

unread,
Feb 26, 2014, 2:41:10 PM2/26/14
to gdata-python-client-...@googlegroups.com

Comment #44 on issue 229 by kons...@gmail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

I just ran 2to3 on the atom package, which made gdata work on python 3.3.
It still works in python2 (tested with 2.7.4). Looking at the diff
superficially, it doesn't look like there will be any problems (which
doesn't mean so much, of course). Maybe very few changes are actually
necessary?

gdata-pyt...@googlecode.com

unread,
Jul 4, 2014, 2:44:44 AM7/4/14
to gdata-python-client-...@googlegroups.com

Comment #45 on issue 229 by salvajgb...@googlemail.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

How goes this project?
Could we have any day a gdata version for Python 3?

gdata-pyt...@googlecode.com

unread,
Jul 4, 2014, 2:13:04 PM7/4/14
to gdata-python-client-...@googlegroups.com

Comment #46 on issue 229 by afs...@google.com: Support Python 3
http://code.google.com/p/gdata-python-client/issues/detail?id=229

As mentioned in the rest of the bug, but likely there will never be an
official Python3 version.

Sorry about that, but you can see many people running 2to3 successfully.
One of those people, can you put a fork on GitHub? That would be great,
thanks!

gdata-pyt...@googlecode.com

unread,
Sep 24, 2014, 5:00:44 PM9/24/14
to gdata-python-client-...@googlegroups.com

Comment #47 on issue 229 by harvey.f...@gmail.com: Support Python 3
https://code.google.com/p/gdata-python-client/issues/detail?id=229

I've posted a fork at https://github.com/hfalcic/google-gdata . It relies
on the `future` package, and I've successfully used it with the YouTube
API. I have no idea whether the other modules work.

gdata-pyt...@googlecode.com

unread,
Apr 26, 2015, 12:39:40 AM4/26/15
to gdata-python-client-...@googlegroups.com

Comment #48 on issue 229 by cybervig...@gmail.com: Support Python 3
https://code.google.com/p/gdata-python-client/issues/detail?id=229

I seems odd to me that Google was the major player in getting rid of IE6
but won't let Python move forward by having a Py3 api. They wanted it
easier for them but to heck with those of us who have moved forward on
Python.
Reply all
Reply to author
Forward
0 new messages