cliutils passing sortby=None breaks older versions of prettytable

Bug #1256883 reported by Eoghan Glynn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo-incubator
Fix Released
Medium
Eoghan Glynn

Bug Description

Older versions (e.g. 0.6.1) of PrettyTable.get_string fails with:

  "Invalid field name: None!"

when sortby is set to None (to indicate no sorting is required).

The prettytable version requirement is generally set to:

  prettytable>=0.6,<0.8

for example in Oslo and python-ceilometerclient respectively:

  https://github.com/openstack/oslo-incubator/blob/master/requirements.txt#L8
  https://github.com/openstack/python-ceilometerclient/blob/master/requirements.txt#L5

Now, as it happens the global requirements have been very recently updated to increase the lower bound for another reason:

  https://github.com/openstack/requirements/commit/45b937a2

However this change has not percolated out to the client libraries as yet, and in any case would still cause a practical issue as most major distros are still on prettytable 0.6.1.

Eoghan Glynn (eglynn)
Changed in oslo:
assignee: nobody → Eoghan Glynn (eglynn)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

Fix proposed to branch: master
Review: https://review.openstack.org/59346

Mark McLoughlin (markmc)
Changed in oslo:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/59346
Committed: http://github.com/openstack/oslo-incubator/commit/0d2546b228f13a42355bc54e82256bf17a2eb478
Submitter: Jenkins
Branch: master

commit 0d2546b228f13a42355bc54e82256bf17a2eb478
Author: Eoghan Glynn <email address hidden>
Date: Mon Dec 2 10:50:05 2013 +0000

    Only pass non-None sortby to PrettyTable.get_string

    Fixes bug 1256883

    Older versions of prettytable are not tolerant to sortby
    being provided as an explicit kwarg set to None.

    We avoid this issue by leaving the kwarg unspecified when
    sorting is not required.

    Change-Id: I4ef7bc73a820a63d790a23a0f4e64a1077274d8a

Changed in oslo:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo:
milestone: icehouse-1 → 2014.1
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.