helpers is not compatible with python 3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charm Helpers |
Fix Released
|
High
|
Stuart Bishop |
Bug Description
Since Ubuntu raring, python2 is not installed by default. Trusty will be the first LTS to not ship with py2. Charms that use charm-helpers must install python2 to work. It may be possible to rewrite charm-helpers by py2 and py3 compatible so that charms can be deployed on precise and trusty.
$ python3 /usr/bin/pocketlint -q `find . -name '*.py'`
./charmhelpers/
130: undefined name 'unicode'
./charmhelpers/
428: Could not compile; invalid syntax: except OSError, e:
./charmhelpers/
274: undefined name 'basestring'
./charmhelpers/
67: undefined name 'basestring'
67: undefined name 'basestring'
./charmhelpers/
40: Could not compile; invalid token: mkdir(dest_dir, perms=0755)
./charmhelpers/
110: Could not compile; invalid token: def mkdir(path, owner='root', group='root', perms=0555, force=False):
./tools/
163: Could not compile; invalid syntax: except Exception, e:
./tests/
15: undefined name 'file'
./tests/
7: 'dumps' imported but unused
./tests/
295: undefined name 'file'
330: undefined name 'file'
382: undefined name 'file'
./tests/
18: undefined name 'file'
./tests/
20: undefined name 'file'
./tests/
310: Could not compile; invalid token: perms = 0644
./tests/
156: undefined name 'basestring'
Related branches
- Jorge Niedbalski (community): Needs Fixing
- charmers: Pending requested
-
Diff: 213 lines (+68/-18)7 files modifiedcharmhelpers/contrib/peerstorage/__init__.py (+2/-0)
charmhelpers/core/hookenv.py (+6/-0)
charmhelpers/core/host.py (+1/-1)
charmhelpers/fetch/__init__.py (+1/-1)
tests/contrib/peerstorage/test_peerstorage.py (+8/-0)
tests/core/test_hookenv.py (+37/-1)
tests/core/test_templating.py (+13/-15)
Changed in charm-helpers: | |
assignee: | nobody → Stuart Bishop (stub) |
status: | Triaged → Fix Released |