Change optparse to argparse, optparse is Deprecated since python version 2.7

Bug #1553030 reported by Vishal kumar mahajan on 2016-03-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Medium
Vishal kumar mahajan
OpenStack DBaaS (Trove)
Fix Released
Low
Zhao Chao
OpenStack Object Storage (swift)
Undecided
dharmendra
oslo-incubator
Undecided
Vishal kumar mahajan
python-swiftclient
Undecided
Tim Burke

Bug Description

In glance currently we use optparse.So we can move optparse to argparse because optparse is deprecated since python version2.7.
Related link:- https://docs.python.org/2/library/optparse.html

Changed in ironic:
assignee: nobody → Vishal kumar mahajan (mahajan-vishal-mca)
Changed in python-ironicclient:
assignee: nobody → Vishal kumar mahajan (mahajan-vishal-mca)
Changed in python-swiftclient:
assignee: nobody → Vishal kumar mahajan (mahajan-vishal-mca)
Changed in python-congressclient:
assignee: nobody → Vishal kumar mahajan (mahajan-vishal-mca)
description: updated
Changed in python-saharaclient:
assignee: nobody → Vishal kumar mahajan (mahajan-vishal-mca)
Changed in cinder:
assignee: nobody → Vishal kumar mahajan (mahajan-vishal-mca)
Changed in glance:
assignee: nobody → Vishal kumar mahajan (mahajan-vishal-mca)
Changed in nova:
assignee: nobody → Vishal kumar mahajan (mahajan-vishal-mca)
Changed in oslo-incubator:
assignee: nobody → Vishal kumar mahajan (mahajan-vishal-mca)
no longer affects: cinder
no longer affects: ironic
Changed in python-swiftclient:
assignee: Vishal kumar mahajan (mahajan-vishal-mca) → nobody
Changed in python-swiftclient:
assignee: nobody → dharmendra (dharmendra-kushwaha)
no longer affects: python-ironicclient
no longer affects: python-congressclient
Changed in manila:
assignee: nobody → MD NADEEM (mail2nadeem92)
no longer affects: python-saharaclient
no longer affects: nova
no longer affects: manila
Changed in swift:
assignee: nobody → dharmendra (dharmendra-kushwaha)
Reedip (reedip-banerjee) on 2016-03-06
summary: - Change optparse to argparse, optparse is Deprecated since pyhton version
+ Change optparse to argparse, optparse is Deprecated since python version
2.7
Changed in oslo-incubator:
status: New → Won't Fix
Changed in glance:
status: New → Triaged
importance: Undecided → Medium
description: updated
Tim Burke (1-tim-z) wrote :

Will be fixed in python-swiftclient by https://review.openstack.org/#/c/287666/

Changed in python-swiftclient:
assignee: dharmendra (dharmendra-kushwaha) → Tim Burke (1-tim-z)
status: New → In Progress
Changed in swift:
status: New → In Progress
Changed in glance:
status: Triaged → In Progress

Reviewed: https://review.openstack.org/287666
Committed: https://git.openstack.org/cgit/openstack/python-swiftclient/commit/?id=17aa6c789e3c28e59be3b92e6fa65edb89077436
Submitter: Jenkins
Branch: master

commit 17aa6c789e3c28e59be3b92e6fa65edb89077436
Author: Tim Burke <email address hidden>
Date: Wed Mar 2 16:02:28 2016 +0000

    Port from optparse to argparse

    Why now?

    * argparse was introduced in Python 3.2 and back-ported to Python 2.7.
      Until we dropped Python 2.6 support, we were stuck on optparse.

    * keystoneauth.loading.cli provides register_argparse_arguments and
      load_from_argparse_arguments helper methods. Now that we're moving
      toward Keystone Session support, argparse seems required.

    Closes-Bug: 1553030
    Change-Id: I5139fb64a8631a3010680090fd04345f95c55c7b

Changed in python-swiftclient:
status: In Progress → Fix Released

This issue was fixed in the openstack/python-swiftclient 3.1.0 release.

Amrith Kumar (amrith) on 2017-03-20
Changed in trove:
importance: Undecided → Low
Changed in trove:
assignee: nobody → iswarya vakati (v-iswarya)

Reviewed: https://review.openstack.org/508729
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=1c13d8a232f1d129285aa2c494072fe796266ade
Submitter: Zuul
Branch: master

commit 1c13d8a232f1d129285aa2c494072fe796266ade
Author: Sean McGinnis <email address hidden>
Date: Sun Oct 1 07:08:00 2017 -0500

    Remove use of deprecated optparse module

    The optparse module has been deprecated for some time and all apps
    should be updated to use argparse instead. This switches our one
    remaining command that was using it to the newer argparse usage.

    Change-Id: I8f801fb804515ecf2a8b402b2923135379730098
    Closes-bug: #1553030

Changed in glance:
status: In Progress → Fix Released

This issue was fixed in the openstack/glance 16.0.0.0b2 development milestone.

Zhao Chao (zhaochao1984) on 2018-02-07
Changed in trove:
assignee: iswarya vakati (v-iswarya) → Zhao Chao (zhaochao1984)
status: New → In Progress

Reviewed: https://review.openstack.org/541619
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=9e5186b95bba51d911a0de9e6d6bd412c478aef4
Submitter: Zuul
Branch: master

commit 9e5186b95bba51d911a0de9e6d6bd412c478aef4
Author: Zhao Chao <email address hidden>
Date: Wed Feb 7 16:16:53 2018 +0800

    Remove unused optparse code in trove.db

    add_options in trove.db is not used for a long time, and this is the
    same situation fofr optparse in python 2.7, so we can safely remove
    this part from trove.db.

    Closes-Bug: #1553030
    Change-Id: I17228eed5c122bce49ce80ec665fe73d6caa1e04
    Signed-off-by: Zhao Chao <email address hidden>

Changed in trove:
status: In Progress → Fix Released

This issue was fixed in the openstack/trove 9.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers