certbot/certbot-ci
Brad Warren a71e22678f
Fix add deprecated argument (#8500) (#8501)
Fixes https://github.com/certbot/certbot/issues/8495.

To further explain the problem here, `modify_kwargs_for_default_detection` as called in `add` is simplistic and doesn't always work. See https://github.com/certbot/certbot/issues/6164 for one other example.

In this case, were bitten by the code d1e7404358/certbot/certbot/_internal/cli/helpful.py (L393-L395)

The action used for deprecated arguments isn't in `ZERO_ARG_ACTIONS` so it assumes that all deprecated flags take one parameter.

Rather than trying to fix this function (which I think can only realistically be fixed by https://github.com/certbot/certbot/issues/4493), I took the approach that was previously used in `HelpfulArgumentParser.add_deprecated_argument` of bypassing this extra logic entirely. I adapted that function to now call `HelpfulArgumentParser.add` as well for consistency and to make testing easier.

* Rename deprecated arg action class

* Skip extra parsing for deprecated arguments

* Add back test of --manual-public-ip-logging-ok

* Add changelog entry

(cherry picked from commit 5f73274390)
2020-12-03 09:06:05 +01:00
..
certbot_integration_tests Fix add deprecated argument (#8500) (#8501) 2020-12-03 09:06:05 +01:00
snap_integration_tests Make externally snapped plugin updates more stable (#8145) 2020-07-22 17:07:07 -07:00
windows_installer_integration_tests Windows installer integration tests (#7724) 2020-02-05 14:12:29 -08:00
MANIFEST.in [Unix] Create a framework for certbot integration tests: PART 3g (#6953) 2019-04-15 17:39:38 -07:00
setup.py Add Python 3.9 support and tests (#8460) 2020-11-19 12:48:36 -08:00