tests fail on python3.5

Bug #1473093 reported by Zygmunt Krynicki
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Next Generation Checkbox (CLI)
Fix Released
Critical
Zygmunt Krynicki
checkbox-ng (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I got a ping from Barry Warsaw about a bit of our code breaking in Python 3.5:

https://launchpadlibrarian.net/210474153/buildlog_ubuntu-wily-amd64.checkbox-ng_0.18-1_BUILDING.txt.gz

The link (if you don't see it anymore) is showing this failure:

FAIL: test_help (commands.test_sru.TestSru)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/checkbox_ng/commands/test_sru.py", line 76, in test_help
    self.assertEqual(io.combined, cleandoc(expected) + "\n")
AssertionError: "/«BUILDDIR»/checkbox-ng-0.1[1594 chars]ns\n" != "usage: checkbox sru [-h] [--check-config][1384 chars]ns\n"
- /«PKGBUILDDIR»/checkbox_ng/service.py:162: DeprecationWarning: inspect.Signature.from_function() is deprecated, use Signature.from_callable()
- sig = Signature.from_function(func)
  usage: checkbox sru [-h] [--check-config] --secure-id SECURE-ID
                      [--fallback FILE] [--destination URL] [--staging] [-n]
                      [-T TEST-PLAN-ID] [-i PATTERN] [-x PATTERN] [-w WHITELIST]

  optional arguments:
    -h, --help show this help message and exit
    --check-config run check-config before starting

  sru-specific options:
    --secure-id SECURE-ID
                          associate submission with a machine using this SECURE-
                          ID (unset)
    --fallback FILE if submission fails save the test report as FILE
                          (unset)
    --destination URL POST the test report XML to this URL (https://certific
                          ation.canonical.com/submissions/submit/)
    --staging override --destination to use the staging
                          certification website

  execution options:
    -n, --dry-run don't really run most jobs

  test selection options:
    -T TEST-PLAN-ID, --test-plan TEST-PLAN-ID
                          load the specified test plan
    -i PATTERN, --include-pattern PATTERN
                          include jobs matching the given regular expression
    -x PATTERN, --exclude-pattern PATTERN
                          exclude jobs matching the given regular expression
    -w WHITELIST, --whitelist WHITELIST
                          load whitelist containing run patterns

I think we can do some simple checks for python version or, if we can, just kill checkbox-ng's dbus support.

Related branches

Revision history for this message
Barry Warsaw (barry) wrote :

A couple of quick other thoughts.

You could just suppress the DeprecationWarning, or you could use Signature.from_callable() when that API is available (i.e. do an attribute check first).

Either way, thanks for looking into this!

Zygmunt Krynicki (zyga)
Changed in checkbox-ng:
assignee: nobody → Zygmunt Krynicki (zyga)
Revision history for this message
Zygmunt Krynicki (zyga) wrote :
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

The change is in Debian SVN. I did a test build with a wily sbuild using:

sbuild -d wily --chroot-setup-commands='apt-key adv --keyserver keyserver.ubuntu.com --recv-key 224D9D15EE176F89' --extra-repository 'deb http://ppa.launchpad.net/pythoneers/py35asdefault/ubuntu wily main' --extra-repository 'deb http://archive.ubuntu.com/ubuntu wily main universe'

I've sent a RFS to Piotr Ożarowski as I cannot upload this myself.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch commited to Debian svn" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package checkbox-ng - 0.18-2

---------------
checkbox-ng (0.18-2) unstable; urgency=medium

  * Add fix-tests-on-python35 patch to use inspect.Signature.from_callable
    instead of deprecated from_function in Python >= 3.5 (LP: #1473093)

 -- Zygmunt Krynicki <email address hidden> Thu, 09 Jul 2015 19:58:33 +0200

Changed in checkbox-ng (Ubuntu):
status: New → Fix Released
Zygmunt Krynicki (zyga)
Changed in checkbox-ng:
status: Confirmed → Fix Committed
Changed in checkbox-ng:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.