normalize_version_number([1]) yields (1,)

Bug #1703414 reported by Eric Fried
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keystoneauth
Fix Released
Undecided
Eric Fried

Bug Description

keystoneauth1.discover.normalize_version_number is supposed to accept a variety of input formats and produce a tuple of ints of length at least two, with an assumed second element of 0 if not specified. However, although

1, '1', 'v1', 1.0, '1.0', 'v1.0', (1, 0)

all result in a return of (1, 0),

[1], (1,), ['1']

result in a return of (1,).

These should be fixed to be consistent and return (1, 0).

Eric Fried (efried)
Changed in keystoneauth:
assignee: nobody → Eric Fried (efried)
Changed in keystoneauth:
status: New → In Progress
Revision history for this message
Eric Fried (efried) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystoneauth (master)

Reviewed: https://review.openstack.org/481309
Committed: https://git.openstack.org/cgit/openstack/keystoneauth/commit/?id=1415a94586caa76f54d32cace530324dfe05ed31
Submitter: Jenkins
Branch: master

commit 1415a94586caa76f54d32cace530324dfe05ed31
Author: Eric Fried <email address hidden>
Date: Mon Jul 10 12:36:44 2017 -0500

    normalize_version_number([1]) => (1, 0) and docs

    Fix an edge case where discover.normalize_version_number could return a
    one-member tuple rather than the expected >=2-member tuple.

    Fix up the docstring for the same, including the above behavior.

    Change-Id: Ibe54da05705846e47063f8fc639b31df773bed9d
    Closes-Bug: #1703414

Changed in keystoneauth:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/keystoneauth 3.0.0

This issue was fixed in the openstack/keystoneauth 3.0.0 release.

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.