Move to python3

Bug #1778644 reported by Nguyen Hai
8
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tacker
Fix Released
Low
Yasufumi Ogawa

Bug Description

OpenStack community is moving to Python 3 as Python 2.7 is nearing its end of life. See https://wiki.openstack.org/wiki/Python3

Tacker currently still has some functions related to the old python version. Therefore, when we force to run python3 for testing, it creates some fails, for example, https://review.openstack.org/#/c/572984/

Changed in tacker:
importance: High → Low
Changed in tacker:
assignee: nobody → MADHUHA AMBATI (madhuha)
Changed in tacker:
assignee: nobody → MADHUHA AMBATI (madhuha5)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tacker (master)

Fix proposed to branch: master
Review: https://review.opendev.org/758717

Changed in tacker:
assignee: MADHUHA AMBATI (madhuha5) → Yasufumi Ogawa (yasufum)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/758772

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

Reviewed: https://review.opendev.org/758717
Committed: https://git.openstack.org/cgit/openstack/tacker/commit/?id=a3377de8719889401f6ea97fb0c74eae4aa5c2f0
Submitter: Zuul
Branch: master

commit a3377de8719889401f6ea97fb0c74eae4aa5c2f0
Author: Yasufumi Ogawa <email address hidden>
Date: Mon Oct 19 04:59:05 2020 +0000

    Drop most of six importings

    This update is to drop six, and also Python2 support. However, only
    `tacker/test/common/helpers.py` which defines a set of functions for
    Python2 is remained because `compact_byte()` is called from several test
    classes. Although it'is not so quite hard to drop, better to be done in
    another patch because so many changes shouldn't be included in a update.

    Here is a summary of changes.

    * Remove all six importing other than `helpers.py`.

    * Revise the order of importing modules becaseu it's checked strictly
      more in the recent pep8 test.

    * For the update, it removes a test `test_json_with_utf()` defined in
      `tacker/tests/unit/test_wsgi.py` because it's required only for Python2
      and can be skipped for Python3, so no need to keep anymore.

    * Remove six from `requirements.txt` and `lower-constraints.txt`.

    Partial-bug: #1778644

    Change-Id: Ib37fd00ab6836e4efc04d1c14c10f312379c7212
    Signed-off-by: Yasufumi Ogawa <email address hidden>

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.opendev.org/758772
Committed: https://git.openstack.org/cgit/openstack/tacker/commit/?id=4222140d1eacd8da90216fa3591d33cc830a1fcf
Submitter: Zuul
Branch: master

commit 4222140d1eacd8da90216fa3591d33cc830a1fcf
Author: Yasufumi Ogawa <email address hidden>
Date: Mon Oct 19 09:34:40 2020 +0000

    Remove test helpers for Python2

    As the last update for dropping Python2 support, remove helper functions
    introduced to run unittests on both of py2 and py3 with six.

    Closes-bug: #1778644

    Change-Id: Ie75879f33edeeaa94247fec2d665fd1a4266c700
    Signed-off-by: Yasufumi Ogawa <email address hidden>

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

This issue was fixed in the openstack/tacker 5.0.0.0rc1 release candidate.

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.