gunicorn
gunicorn copied to clipboard
style: argparse inheritance, hide some options from --help
We have way too much options (#3266)
Idea: We could hide deprecated ones from --help
, and possibly move both unstable and deprecated ones to their own, bottom-most section in the documentation.
Attached patch hacks (style improvements welcome) the config.py-class-to-argparse code so we can subclass while keeping metaclass intact. Then it adds a Deprecated
class that hides certain settings from --help
. I tried to avoid additional functional changes.
If this PR moves forward with minor changes, then the following changes are the next steps:
- change some options default value to None and have not specifying them mean "feature not used"
-
--user/--group
unset should mean do not do that
-
- permit and document some options with existing default to be overridden to some
None
-like value-
--config=""
should mean do not read config (as in:--config=/dev/null
)
-
- options that do not take effect based on environment / other options should be warned about
- behavior of
--bind
whenLISTEN_FDS
set can be surprising, it should not be
- behavior of
- Suggested merge order: after any feature/bugfix PRs. merge conflicts more easily solved within this PR.