mojo requires python < 3

Bug #1744007 reported by Ryan Beisner on 2018-01-18
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mojo: Continuous Delivery for Juju
High
Unassigned
OpenStack Charm Test Infra
High
Unassigned

Bug Description

Mojo appears to not be python3 compatible. There are some python tools which are py3-only. This prevents usage of mojo in the same environment as the newer tool (such as python-libjuju).

clients runtests: commands[0] | mojo --version
Traceback (most recent call last):
  File "/home/rbeisner/git/charm-test-infra/.tox/clients/bin/mojo", line 11, in <module>
    load_entry_point('mojo==0.4.5', 'console_scripts', 'mojo')()
  File "/home/rbeisner/git/charm-test-infra/.tox/clients/lib/python3.6/site-packages/pkg_resources/__init__.py", line 570, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/rbeisner/git/charm-test-infra/.tox/clients/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2687, in load_entry_point
    return ep.load()
  File "/home/rbeisner/git/charm-test-infra/.tox/clients/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2341, in load
    return self.resolve()
  File "/home/rbeisner/git/charm-test-infra/.tox/clients/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2347, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/rbeisner/git/charm-test-infra/.tox/clients/lib/python3.6/site-packages/mojo/cli.py", line 27, in <module>
    import mojo.project
  File "/home/rbeisner/git/charm-test-infra/.tox/clients/lib/python3.6/site-packages/mojo/project.py", line 209
    mkdirs(self.root, self.owner, mode=0700)
                                          ^
SyntaxError: invalid token

Related branches

Ryan Beisner (1chb1n) wrote :

Octal expression syntax changed for Py3. Numbers with leading zeros are now invalid.

Changed in charm-test-infra:
status: New → Confirmed
importance: Undecided → High
Ryan Beisner (1chb1n) wrote :

We are taking a limited spike on evaluating the depth of work to make mojo py3-only compatible. Branches linked.

Ryan Beisner (1chb1n) wrote :

Related bug (mojo tests are failing at upstream trunk): https://bugs.launchpad.net/mojo/+bug/1744048

Paul Gear (paulgear) on 2018-05-01
Changed in mojo:
status: New → Triaged
importance: Undecided → Medium
importance: Medium → High
Tom Haddon (mthaddon) wrote :

Mojo now supports python3.

Changed in mojo:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers