Merge ~smoser/cloud-init:fix/tox-xenial-3.5 into cloud-init:master

Proposed by Scott Moser on 2017-08-30
Status: Merged
Approved by: Scott Moser on 2017-08-30
Approved revision: d9e79a6ca14aa3e1816e8a4c9b88a3eeb1e0f19d
Merged at revision: 502082f6f21fb7592a798087a4c49f90d886ad14
Proposed branch: ~smoser/cloud-init:fix/tox-xenial-3.5
Merge into: cloud-init:master
Diff against target: 17 lines (+4/-2)
1 file modified
tox.ini (+4/-2)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve on 2017-08-30
Joshua Powers (community) Approve on 2017-08-30
cloud-init commiters 2017-08-30 Pending
Review via email: mp+329926@code.launchpad.net

Commit Message

tox: make xenial environment run with python3.6

The pinned versions of python packages in xenial do not work with
python3.6. Currently, the failure can be seen with:
 $ tox -e xenial tests/unittests/test_merging.py
which ends up failing with in /usr/lib/python3.6/inspect.py with:
  ValueError: Function has keyword-only parameters or annotations, use
  getfullargspec() API which can support them

Instead of setting 'basepython' to 3.5 for the 'xenial', we just update
the one package that does not run correctly with python3.6. That allows
the developer to have either python3.5 or python3.6 installed and have
tox work as expected.

To post a comment you must log in.
Scott Moser (smoser) wrote :

On xenial, if you run:
  tox -e xenial tests/unittests/test_merging.py

You'll see it fail with:
  http://paste.ubuntu.com/25432309/

I believe the reason is simply that some package (probably python-jsonpatch) at the version that we've pinned does not work with python3.6 that is 'python3' in an artful system at the moment.

I'm not sure what to do about the fact that 'xenial' is in the default 'envlist'.

Should we drop that?

Scott Moser (smoser) wrote :

Another tested working option is this:

$ git diff
diff --git a/tox.ini b/tox.ini
index 1e7ca2d3..c95f4443 100644
--- a/tox.ini
+++ b/tox.ini
@@ -66,8 +66,9 @@ deps =
     pyserial==3.0.1
     configobj==5.0.6
     requests==2.9.1
- # jsonpatch ubuntu is 1.10, not 1.19 (#839779)
- jsonpatch==1.10
+ # jsonpatch in xenial is 1.10, not 1.19 (#839779). The oldest version
+ # to work with python3.6 is 1.16.
+ jsonpatch==1.16
     six==1.10.0
     # test-requirements
     httpretty==0.8.6

PASSED: Continuous integration, rev:6e2f7e373a2526a9f9857db9155c5772f19df5a5
https://jenkins.ubuntu.com/server/job/cloud-init-ci/228/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    SUCCESS: MAAS Compatability Testing
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/228/rebuild

review: Approve (continuous-integration)
Joshua Powers (powersj) wrote :

I think we should accept the comment diff change (i.e. python version change + jsonpatch version change). This way we can keep it in the default environments to continue to get coverage of those modules versions.

Scott Moser (smoser) wrote :

Josh. OK, i'll re-submit.
That said, this doesn't work forever (only until 3.6 breaks something else or 3.7 along).

Joshua Powers (powersj) :
review: Approve

PASSED: Continuous integration, rev:d9e79a6ca14aa3e1816e8a4c9b88a3eeb1e0f19d
https://jenkins.ubuntu.com/server/job/cloud-init-ci/235/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    SUCCESS: MAAS Compatability Testing
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/235/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tox.ini b/tox.ini
2index a17156c..ec96e85 100644
3--- a/tox.ini
4+++ b/tox.ini
5@@ -66,8 +66,10 @@ deps =
6 pyserial==3.0.1
7 configobj==5.0.6
8 requests==2.9.1
9- # jsonpatch ubuntu is 1.10, not 1.19 (#839779)
10- jsonpatch==1.10
11+ # jsonpatch in xenial is 1.10, not 1.19 (#839779). The oldest version
12+ # to work with python3.6 is 1.16 as found in Artful. To keep default
13+ # invocation of 'tox' happy, accept the difference in version here.
14+ jsonpatch==1.16
15 six==1.10.0
16 # test-requirements
17 httpretty==0.8.6

Subscribers

People subscribed via source and target branches

to all changes: