[issue32123] Make the API of argparse.HelpFormatter public

2018-01-08 Thread paul j3

paul j3  added the comment:

To elaborate on my last comment, the existing subclasses that customize 
formatting modify

_fill_text
_split_lines
_get_help_string
_get_default_metavar_for_optional
_get_default_metavar_for_positional

those are all 'private' methods.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32123] Make the API of argparse.HelpFormatter public

2017-12-06 Thread paul j3

paul j3  added the comment:

A difficulty with writing a public API is that useful changes can occur at 
almost any level of the class.

The existing subclasses modify small, but deep methods, ones that handle things 
like line wrapping.

On the other hand, most of the issues you cite deal with higher level issues, 
either the top most method of the formatter, or alternatives to 
parser.format_help or parser._get_formatter (which create and populate a 
formatter object).

I've also responded to issues dealing with intermediate levels things, like the 
need for a more robust usage formatting, and changing how help lines are 
constructed.

The argparse documentation is a mix of how-to and formal API.  Mostly it 
describes how to perform common parsing tasks.  Even though argparse consists 
of classes, the documentation does not formally describe the classes, and their 
subclassing and all methods.  It's not a reference API.

--
nosy: +paul.j3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32123] Make the API of argparse.HelpFormatter public

2017-11-24 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I suggest that you open a thread on python-ideas list: something like 'Make 
argparse.HelpFormatter public'.  Explain what you would like to have happen and 
why.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32123] Make the API of argparse.HelpFormatter public

2017-11-24 Thread Bernhard10

New submission from Bernhard10 :

Since there have not been any significant change to the code of 
argparse.HelpFormatter in the last few years but there are still some open 
issues where people want to customize formatting, I would like to ask: What is 
required before parts of the API of argparse.HelpFormatter can be made public?

Related issues:
https://bugs.python.org/issue17113 RawDescriptionHelpFormatter removes blank 
lines
https://bugs.python.org/issue12806 and https://bugs.python.org/issue22029 
request a formatter that (partly) wraps lines but keeps newlines.
https://bugs.python.org/issue11695 costumize usage
https://bugs.python.org/issue28742 Improve ArgumentDefaultsHelpFormatter


All this issues could be fixed outside the standard library by sub-classing 
HelpFormatter, which would require a public and documented API for it.

So my question: What is missing before HelpFormatter can get a public API and 
how can I help?

--
components: Library (Lib)
messages: 306879
nosy: Bernhard10
priority: normal
severity: normal
status: open
title: Make the API of argparse.HelpFormatter public
type: enhancement
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com