carolinux / gdata-python-client

Automatically exported from code.google.com/p/gdata-python-client
0 stars 1 forks source link

gdata-2.0.14 can't install in Python 2.2.3 #535

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
System:
very old RHEL 3u9
python  2.2.3

What steps will reproduce the problem?
1.downlaod  elementtree-1.2.6-20050316.tar.gz ,unpack, python setup.py 
install,ok
2. download gdata-2.0.14.tar.gz,unpack, ./setup.py build;setup.py

byte-compiling /usr/lib/python2.2/site-packages/gdata/service.py to service.pyc
<string>:319: Warning: 'yield' will become a reserved keyword in the future
  File "/usr/lib/python2.2/site-packages/gdata/service.py", line 319
    yield link_finder
                    ^
SyntaxError: invalid syntax

byte-compiling /usr/lib/python2.2/site-packages/gdata/analytics/client.py to 
client.pyc
  File "/usr/lib/python2.2/site-packages/gdata/analytics/client.py", line 209
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.2/site-packages/gdata/analytics/data.py to 
data.pyc
  File "/usr/lib/python2.2/site-packages/gdata/analytics/data.py", line 277
    @classmethod
    ^
SyntaxError: invalid syntax

byte-compiling /usr/lib/python2.2/site-packages/gdata/books/service.py to 
service.pyc
<string>:250: Warning: 'yield' will become a reserved keyword in the future
  File "/usr/lib/python2.2/site-packages/gdata/books/service.py", line 250
    yield entry
              ^
SyntaxError: invalid syntax

What is the expected output? What do you see instead?
The INSTALL.txt said that python 2.2 is enough.

What version of the product are you using?
gdata-2.0.14

Thanks

Original issue reported on code.google.com by gang.x...@gmail.com on 6 Aug 2011 at 12:57

GoogleCodeExporter commented 9 years ago
command should be:
./setup.py build;./setup.py install

./setup.py build is ok
./setup.py install report the error

Original comment by gang.x...@gmail.com on 6 Aug 2011 at 12:58

GoogleCodeExporter commented 9 years ago
BTW: curret code(changeset:   999:651133d1893a)
$ hg clone https://code.google.com/p/gdata-python-client/

$ ./setup.py install (only error message)
byte-compiling /usr/lib/python2.2/site-packages/gdata/service.py to service.pyc
<string>:319: Warning: 'yield' will become a reserved keyword in the future
  File "/usr/lib/python2.2/site-packages/gdata/service.py", line 319
    yield link_finder
                    ^
SyntaxError: invalid syntax

byte-compiling /usr/lib/python2.2/site-packages/gdata/gauth.py to gauth.pyc
  File "/usr/lib/python2.2/site-packages/gdata/gauth.py", line 1151
    @property
    ^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.2/site-packages/gdata/analytics/client.py to 
client.pyc
  File "/usr/lib/python2.2/site-packages/gdata/analytics/client.py", line 209
    @property
    ^
SyntaxError: invalid syntax

byte-compiling /usr/lib/python2.2/site-packages/gdata/analytics/data.py to 
data.pyc
  File "/usr/lib/python2.2/site-packages/gdata/analytics/data.py", line 277
    @classmethod
    ^
SyntaxError: invalid syntax

byte-compiling /usr/lib/python2.2/site-packages/gdata/apps/migration/service.py 
to service.pyc
  File "/usr/lib/python2.2/site-packages/gdata/apps/migration/service.py", line 198
    0 if num_entries % threads_per_batch == 0 else 1)
       ^
SyntaxError: invalid syntax

byte-compiling /usr/lib/python2.2/site-packages/gdata/books/service.py to 
service.pyc
<string>:250: Warning: 'yield' will become a reserved keyword in the future
  File "/usr/lib/python2.2/site-packages/gdata/books/service.py", line 250
    yield entry
              ^
SyntaxError: invalid syntax

byte-compiling 
/usr/lib/python2.2/site-packages/gdata/contentforshopping/client.py to 
client.pyc
  File "/usr/lib/python2.2/site-packages/gdata/contentforshopping/client.py", line 33
    from gdata.contentforshopping.data import (ProductEntry, ProductFeed,
                                              ^
SyntaxError: invalid syntax

byte-compiling /usr/lib/python2.2/site-packages/gdata/docs/data.py to data.pyc
  File "/usr/lib/python2.2/site-packages/gdata/docs/data.py", line 214
    @staticmethod
    ^
SyntaxError: invalid syntax

Original comment by gang.x...@gmail.com on 6 Aug 2011 at 1:26

GoogleCodeExporter commented 9 years ago
I doubt this would be fixed. Python

After some searches, yield issue can be fixed by adding [1]

  from __future__ import generators

Those classmethod/staticmethod should be able to be fixed by transforming as 
follow:

  def foo(self):
      perform method operation
  foo = classmethod(foo)

And @property, see [3].

The ternary [4] might be replace with `and` `or`, but break down is safer.

Even you get rid of these, no guarantees that there are no more other issues.

The quick way is to compile Python 2.5.

[1] http://docs.python.org/reference/simple_stmts.html#grammar-token-yield_stmt
[2] http://www.python.org/dev/peps/pep-0318/
[3] http://docs.python.org/library/functions.html#property
[4] http://docs.python.org/reference/expressions.html#conditional-expressions

Original comment by livibet...@gmail.com on 27 Aug 2011 at 9:35

GoogleCodeExporter commented 9 years ago

Original comment by afs...@google.com on 7 Oct 2011 at 12:35