From: Andreas Reichel <Andreas.Reichel@tngtech.com>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
Andreas Reichel <andreas.reichel.ext@siemens.com>,
Daniel Wagner <daniel.wagner@siemens.com>,
OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [wic patch 2/5] wic: Use argparse instead of optparse
Date: Wed, 26 Apr 2017 12:34:15 +0200 [thread overview]
Message-ID: <20170426103415.GA4637@tng> (raw)
In-Reply-To: <CAJTo0LaJWXe_QfhbOi-Xi9WPYpwgL0Z59=A+PLy-TJRLf+fu5A@mail.gmail.com>
On Sun, Apr 23, 2017 at 08:58:44PM +0100, Burton, Ross wrote:
>
> On 21 April 2017 at 13:11, Andreas J. Reichel <andreas.reichel@tngtech.com>
> wrote:
>
> * optparse is deprecated and will not be developed further
> (see: https://docs.python.org/2/library/optparse.html)
> * argparse supports subcommands, which simplifies definition of
> arguments and options
> * reimplement help mechanism through sub-subcommands
>
>
> This results in a behaviour change and breaks the selftest:
>
> FAIL [0.535s]: test_unsupported_subcommand (oeqa.selftest.wic.Wic)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/
> build/meta/lib/oeqa/utils/decorators.py", line 109, in wrapped_f
> return func(*args, **kwargs)
> File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/
> build/meta/lib/oeqa/selftest/wic.py", line 163, in test_unsupported_subcommand
> ignore_status=True).status)
> AssertionError: 1 != 2
>
Dear Ross,
I see three possible strategies in fixing this problem:
- Change the code to keep current return values / behavior
- Adapt the unit test to fit the new code
- Write a less complex patch for just adding the option
"--keep-partition-images" without migration to argparse
Which way would you prefer it?
Andreas
> Ross
--
Andreas Reichel
Dipl.-Phys. (Univ.)
Software Consultant
Andreas.Reichel@tngtech.com
+49-174-3180074
TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring
Geschäftsführer: Henrik Klagges, Christoph Stock, Dr. Robert Dahlke
Sitz: Unterföhring * Amtsgericht München * HRB 135082
next prev parent reply other threads:[~2017-04-26 10:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-21 12:11 [wic patch 0/5] Add option to wic and use argparse Andreas J. Reichel
2017-04-21 12:11 ` [wic patch 1/5] wic: Catch errors during image files clean-up Andreas J. Reichel
2017-05-02 12:56 ` Ed Bartosh
2017-05-03 8:45 ` Andreas Reichel
2017-05-03 10:32 ` Ed Bartosh
2017-04-21 12:11 ` [wic patch 2/5] wic: Use argparse instead of optparse Andreas J. Reichel
2017-04-23 19:58 ` Burton, Ross
2017-04-26 10:34 ` Andreas Reichel [this message]
2017-04-26 13:03 ` Burton, Ross
2017-04-21 12:11 ` [wic patch 3/5] wic: Add missing text to usage and help strings Andreas J. Reichel
2017-04-21 12:11 ` [wic patch 4/5] wic: Add option to keep partition images Andreas J. Reichel
2017-04-21 12:11 ` [wic patch 5/5] wic: Use enum like dicts for string constants Andreas J. Reichel
2017-05-02 13:36 ` Ed Bartosh
2017-05-03 8:47 ` Andreas Reichel
2017-05-03 12:18 ` Ed Bartosh
2017-05-02 14:37 ` [wic patch 0/5] Add option to wic and use argparse Ed Bartosh
2017-05-03 8:49 ` Andreas Reichel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170426103415.GA4637@tng \
--to=andreas.reichel@tngtech.com \
--cc=andreas.reichel.ext@siemens.com \
--cc=daniel.wagner@siemens.com \
--cc=jan.kiszka@siemens.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox