Re: [Automated-testing] kci command line poll: Click or Typer?

Richard Purdie <[email protected]>
Newsgroups dev.linux.lists.kernelci
Message-ID <b6743bf5808d43a48e9cc78ea0871fd8f23e1f6f.camel@linuxfoundation.org>
Hi Tim,

On Thu, 2023-09-21 at 19:41 +0000, Tim Bird wrote:
> 
> If you do stay with argparse, I would pull a current copy of the
> module into your own repository, so
> you are not dependent on updates or external repositories.
> 
> For my own projects, I have my own argument parsing functions written
> in native python, so I am reliant
> on as few core python modules as possible. (So my answer, for my own
> projects, to the question of which
> external python  module to use for argument parsing is "none of the
> above".)
> The python community just cannot be trusted not to break the language
> or the core modules in a
> backwards-incompatible way.
> 
> If the python community cared about backwards (and forwards)
> compatibility, they would not need
> the whole mess that is virtual environments.

I saw this and found it interesting. I've somehow ended up working with
and maintaining a relatively complex python application for over 15
years (Bitbake in case it isn't obvious). Admittedly we've tried to
keep it's dependencies minimal (much to the frustration of some) so
I've not had much exposure to the wider module ecosystem and I've point
blank refused to 'need' virtual environments for our use.

Whilst there certainly have been annoyances and the 2->3 migration had
its moments, in general I've not found it to be that bad. I started out
wanting to use something else but over time have grown to quite like
the language and I'm not sure what we do would have worked in something
else. Where there have been changes, you can see there were clear
improvements they were trying to make.

Most of the feedback I get is that we should be embracing modules and
I'm stuck in the past keeping things minimal but it clearly does have
some advantages! I've forever being pushed to require a higher minimum
python version so we can adopt new language features.

Just a different perspective :)

(we use argparse FWIW)

Cheers,

Richard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.