This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients BreamoreBoy, bethard, ncoghlan, paul.j3, peter.otten, tebeka
Date 2014-09-10.18:52:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1410375177.56.0.348115714192.issue22240@psf.upfronthosting.co.za>
In-reply-to
Content
One way to reduce the testing burden, and to be extra safe regarding backward compatibility is to make this action optional, rather than the default.

For example, make `_prog_name` importable (i.e. change the name), and then expect the user to use it explicitly with:

    parser = argparse.ArgumentParser(prog=argparse.prog_name(), ...)

and leave the `parse_args` stack unchanged.

This would require an addition to the documentation.  The user can then check for themselves whether `prog_name` gets the right name, given their packaging and calling method.  It's a little more work for a package creator, but arguably it's a good thing to aware of.  

The added tests, if any, can focus on the output of this function, rather than the output of the 'print_help'.
History
Date User Action Args
2014-09-10 18:52:57paul.j3setrecipients: + paul.j3, tebeka, ncoghlan, peter.otten, bethard, BreamoreBoy
2014-09-10 18:52:57paul.j3setmessageid: <1410375177.56.0.348115714192.issue22240@psf.upfronthosting.co.za>
2014-09-10 18:52:57paul.j3linkissue22240 messages
2014-09-10 18:52:57paul.j3create