Merge lp://staging/~chris.macnaughton/mojo/py3002 into lp://staging/~ost-maintainers/mojo/py3

Proposed by Chris MacNaughton
Status: Merged
Approved by: Ryan Beisner
Approved revision: 474
Merged at revision: 465
Proposed branch: lp://staging/~chris.macnaughton/mojo/py3002
Merge into: lp://staging/~ost-maintainers/mojo/py3
Diff against target: 337 lines (+71/-33)
9 files modified
contrib/test/utils.py (+1/-1)
mojo/cli.py (+13/-15)
mojo/juju/status.py (+3/-1)
mojo/juju/wait.py (+3/-0)
mojo/phase.py (+4/-1)
mojo/tests/test_juju2.py (+19/-9)
mojo/utils.py (+3/-0)
setup.py (+1/-0)
tox.ini (+24/-6)
To merge this branch: bzr merge lp://staging/~chris.macnaughton/mojo/py3002
Reviewer Review Type Date Requested Status
OpenStack Charm Testing Maintainers Pending
Review via email: mp+336352@code.staging.launchpad.net
To post a comment you must log in.
470. By Chris MacNaughton

add list() back around map() to make it work on py2+3

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

Have confirmed with a basic mojo run that this works on py2 still, commencing a test on py3

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

Not quite py3 ready:

2018-01-24 11:10:49 [INFO] Rsyncing /home/ubuntu/mojo-openstack-specs to /srv/mojo/openstack/xenial/_20181024_111047/spec
2018-01-24 11:10:50 [INFO] Retrieve the spec's manifest
2018-01-24 11:10:50 [INFO] Manifest comment:

#############################################################################
Collect the charm branches from Launchpad
#############################################################################

2018-01-24 11:10:50 [INFO] Building resource tree
2018-01-24 11:10:50 [ERROR] Unknown error
Traceback (most recent call last):
  File "/home/ubuntu/charm-test-infra/.tox/clients/lib/python3.5/site-packages/mojo/cli.py", line 628, in run_with_args
    args.func(args)
  File "/home/ubuntu/charm-test-infra/.tox/clients/lib/python3.5/site-packages/mojo/utils.py", line 305, in wrapped
    return method(*args, **kwargs)
  File "/home/ubuntu/charm-test-infra/.tox/clients/lib/python3.5/site-packages/mojo/cli.py", line 346, in run_from_manifest
    manifest.run(project, workspace, args.stage)
  File "/home/ubuntu/charm-test-infra/.tox/clients/lib/python3.5/site-packages/mojo/manifest.py", line 100, in run
    auto_repo=auto_repo)
  File "/home/ubuntu/charm-test-infra/.tox/clients/lib/python3.5/site-packages/mojo/phase.py", line 221, in run
    rendered_collect.write(Template(inp.read()).render(**tmpl_vars))
  File "/home/ubuntu/charm-test-infra/.tox/clients/lib/python3.5/tempfile.py", line 622, in func_wrapper
    return func(*args, **kwargs)
TypeError: a bytes-like object is required, not 'str'

471. By Chris MacNaughton

decode bytes to str

472. By Chris MacNaughton

import six

473. By Chris MacNaughton

add encoding to popen

474. By Chris MacNaughton

ensure we decode command line output if needed

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

Ok, have run the openstack-mojo-specs, ceph base spec with both py2 and py3, and have identical output ;)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches