xxxrac / git-repo

Automatically exported from code.google.com/p/git-repo
Apache License 2.0
0 stars 0 forks source link

SyntaxError in subcmds/upload.py with Python 2.4 #104

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Affected Version: Anything since 605a9a487bba
Environment: Python 2.4

What steps will reproduce the problem?
1. Run any repo command with Python 2.4

What is the expected output? What do you see instead?
$ repo sync
Traceback (most recent call last):
  File ".repo/repo/main.py", line 39, in ?
    from subcmds.version import Version
  File ".repo/repo/subcmds/__init__.py", line 36, in ?
    ['%s' % name])
  File ".repo/repo/subcmds/upload.py", line 220
    if issubclass(type(x), unicode)
     ^
SyntaxError: invalid syntax

Please provide any additional information below.
605a9a487bba added a conditional expression to convert unicode scripts to utf8, 
but conditional expressions require Python >=2.5 to run.  The Android repo page 
[0] indicates that Python 2.4.  I'm attaching a version of upload.py that works 
with Python 2.4.

[0] https://sites.google.com/a/android.com/opensource/download

Original issue reported on code.google.com by queue...@gmail.com on 12 Jan 2012 at 11:36

Attachments:

GoogleCodeExporter commented 9 years ago
i am also getting same problem when initializing repo
please suggest me the we to overcome.

Thanks.

Original comment by adhoteg...@gmail.com on 5 Mar 2012 at 6:50

GoogleCodeExporter commented 9 years ago
I meet this issue too.
Thanks

Original comment by nirvana...@gmail.com on 5 Mar 2012 at 9:32

GoogleCodeExporter commented 9 years ago
http://source.android.com/source/initializing.html says python 2.5 - 2.7 should 
be used. Post from Jan. 12 says it uses python 2.4
Anyway I meet the same issue with Python 2.6.5 (r265:79063, Feb 28 2011, 
21:55:45), RedHat distro.

Cheers.

.Y

Original comment by yvescan...@gmail.com on 13 Mar 2012 at 10:26

GoogleCodeExporter commented 9 years ago
Ok. Thinking a bit more: I used an alias and it's not sufficient.
Use python version superior to 2.5 and it works.

.Y 

Original comment by yvescan...@gmail.com on 13 Mar 2012 at 8:30

GoogleCodeExporter commented 9 years ago
Attached a diff for this file.. Seems to work in python2.4

Original comment by karthikk...@gmail.com on 10 Jul 2012 at 9:29

Attachments:

GoogleCodeExporter commented 9 years ago
Python >= 2.6 is required as of [1]

[1] https://gerrit-review.googlesource.com/#/c/37761/

Original comment by david.pu...@sonymobile.com on 14 Feb 2013 at 8:41