Add Python3 support

Bug #1877200 reported by Shyam Singh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Group Based Policy
Fix Released
Undecided
Shyam Singh

Bug Description

Currently we support only Python 2.7 and many OpenStack projects are also compatible with Python3.

Python 3 is already well supported by major Linux distributions, whereas Python 2.7 reached its end-of-life. This need to be fixed.

Shyam Singh (shyam81295)
Changed in group-based-policy:
assignee: nobody → Shyam Singh (shyam81295)
Changed in group-based-policy:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to group-based-policy (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/728711

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to group-based-policy (master)

Reviewed: https://review.opendev.org/726160
Committed: https://git.openstack.org/cgit/x/group-based-policy/commit/?id=1b996593ddef6bf9759aeb676e3bd6abf9d056f9
Submitter: Zuul
Branch: master

commit 1b996593ddef6bf9759aeb676e3bd6abf9d056f9
Author: Shyam Singh <email address hidden>
Date: Thu May 7 14:18:04 2020 +0530

    Added Python3 support.

     * dict_items, dict_values, dict_keys returns view in Py3 instead of
            list so wrapped with list.
     * hashlib.md5 needs bytes data in Py3, so encoded data with 'utf-8'.
     * Replaced dict.iteritems() with dict.items().
     * Replaced dict.itervalues() with dict.values().
     * Replaced iterator.next() with next(iterator)
     * 'magicMock' and 'int' cannot be compared, so patched
            'vmware_nsxlib.v3.utils._update_max_nsgroups_criteria_tags()'
            with its return value.
     * Added zip() as a replacement of itertools.izip() in Py3.
     * Added a method to compare 2 (nested) dict or list of (nested) dict,
            since Py3 (till python3.6) dict are not ordered.
     * Added zuul python35 CI jobs.
     * Added py35 env in 'tox.ini'.
     * Added patcher.stop() in 'NsxPolicyMappingTestCase' tearDown().

    Fixes bug 1877200

    Change-Id: Id96faba6c2ecd29918bda000ac0ccbfdf988d17d

Changed in group-based-policy:
status: In Progress → Fix Released
tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to group-based-policy (stable/queens)

Reviewed: https://review.opendev.org/728711
Committed: https://git.openstack.org/cgit/x/group-based-policy/commit/?id=8d417fc59e98dcb09caed580d2aff3d3eff97630
Submitter: Zuul
Branch: stable/queens

commit 8d417fc59e98dcb09caed580d2aff3d3eff97630
Author: Shyam Singh <email address hidden>
Date: Thu May 7 14:18:04 2020 +0530

    Added Python3 support.

     * dict_items, dict_values, dict_keys returns view in Py3 instead of
            list so wrapped with list.
     * hashlib.md5 needs bytes data in Py3, so encoded data with 'utf-8'.
     * Replaced dict.iteritems() with dict.items().
     * Replaced dict.itervalues() with dict.values().
     * Replaced iterator.next() with next(iterator)
     * 'magicMock' and 'int' cannot be compared, so patched
            'vmware_nsxlib.v3.utils._update_max_nsgroups_criteria_tags()'
            with its return value.
     * Added zip() as a replacement of itertools.izip() in Py3.
     * Added a method to compare 2 (nested) dict or list of (nested) dict,
            since Py3 (till python3.6) dict are not ordered.
     * Added zuul python35 CI jobs.
     * Added py35 env in 'tox.ini'.
     * Added patcher.stop() in 'NsxPolicyMappingTestCase' tearDown().

    Fixes bug 1877200

    Change-Id: Id96faba6c2ecd29918bda000ac0ccbfdf988d17d
    (cherry picked from commit 1b996593ddef6bf9759aeb676e3bd6abf9d056f9)

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.