8000 [feat] Move from the deprecated optparse to argparse (CLI) · Issue #2574 · cobbler/cobbler · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[feat] Move from the deprecated optparse to argparse (CLI) #2574
Closed as not planned
@nodeg

Description

@nodeg

Is your feature request related to a problem?

According to the documentation, optparse is deprecated since Python 3.2. According to PEP 594, however, it will not be removed in the near future since it is so widely used. Nevertheless to make Cobbler more future proof, we should switch to argparse.

There is already a document which describes the transition from optparse to argparse.

The following files have to be edited afaik but this has to be confirmed and tested afterwards. I think especially the test cases for the CLI have to be adjusted, as well.

cobbler/cli.py
contrib/api-examples/create_snippet.py
contrib/api-examples/demo_connect.py
contrib/api-examples/read_snippet.py
contrib/api-examples/remove_snippet.py
tests/cli/cobbler_cli_direct_test.py
tests/cli/cobbler_cli_object_test.py

When #2747 is merged, the following is already taken care of.

bin/cobblerd

Furthermore we need to look into Cobbler builtiso when not supplying any parameter. See #2985

Metadata

Metadata

Assignees

No one assigned

    Labels

    DeprecatedDeprecated feature which will be removed in future versions.Good first issueGood for newcomersenhancementNew feature or requestmainNot a release but referring to the Git main branch

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0