untestable in Python 3.4

Bug #1382582 reported by Jeremy Stanley on 2014-10-17
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Critical
Feilong Wang

Bug Description

As part of an effort to deprecate our specialized testing platform for Python 3.3, many of us have been working to confirm projects which currently gate on 3.3 can also pass their same test sets under Python 3.4 (which comes by default in Ubuntu Trusty). For the vast majority of projects, the differences between 3.3 and 3.4 are immaterial and no effort is required. For some, minor adjustments are needed...

For python-glanceclient, we have 22 failing tests in a `tox -e py34` run. I spent the better part of today digging into them, and they basically all stem from the fact that PEP 456 http://legacy.python.org/dev/peps/pep-0456/ switches the unordered data hash algorithm from FNV to SipHash in 3.4. The unit tests in python-glanceclient frequently rely on trying to match multi-parameter URL queries and JSON built from unordered data types against predetermined string representations. Put simply, this just doesn't work if you can't guarantee their ordering.

I'm left with a dilemma--I don't really have time to fix all of these (I started to go through and turn the fixture keys into format strings embedding dicts filtered through urlencode() for example, but it created as many new failures as it fixed), however I'd hate to drop Py3K testing for software which currently has it no matter how fragile. This is mainly a call for help to anyone with some background and/or interest in python-glanceclient's unit tests to get them working under Python 3.4, so that we can eliminate the burden of maintaining special 3.3 test infrastructure.

Changed in python-glanceclient:
assignee: nobody → Fei Long Wang (flwang)
importance: Undecided → Medium
status: New → Confirmed
Changed in python-glanceclient:
importance: Medium → Critical
Feilong Wang (flwang) on 2014-10-29
Changed in python-glanceclient:
status: Confirmed → In Progress
Feilong Wang (flwang) wrote :

I just make py34 works for tox in my laptop. But with the latest code, I got 26 failures.

Louis Taylor (kragniz) wrote :

flwang: do you want to push up the changes you've made so far?

Reviewed: https://review.openstack.org/133594
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=ef0abdc8858cafe0bdbf8f37dac032cbffe85c7a
Submitter: Jenkins
Branch: master

commit ef0abdc8858cafe0bdbf8f37dac032cbffe85c7a
Author: Fei Long Wang <email address hidden>
Date: Tue Nov 11 15:29:37 2014 +1300

    Fix py34 failure for glance client

    Fix somes tests failures for py34, most of them are related
    to items order of dict.

    Closes-Bug: 1382582

    Change-Id: I954b884f03931e4f0ecb654fb38edd0c46a3c379

Changed in python-glanceclient:
status: In Progress → Fix Committed
Louis Taylor (kragniz) on 2014-12-18
Changed in python-glanceclient:
milestone: none → v0.15.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers