From: Günter M. <mi...@us...> - 2022-01-19 00:21:17
|
Thank you for the reworked patch set! > It will likely be easiest to review commit-by-commit. Lets start with 1/4 I do not see the benefit in the new helper functions outweighting the refactoring effort: Usage (after all 4 commits): ========================================= === ===== ========= new function lib tests dev-tools ========================================= === ===== ========= frontend.read_config_files 2 frontend.config_files_settings 1 1 frontend.get_default_settings 1 7 1 frontend.get_settings_with_defaults 1 frontend.parse_args 1 Publisher.config_section_to_settings_spec 3 ========================================= === ===== ========= Making OptionParser.get_standard_config_files() a class method could be combined with the removal of the mod_python hack. The commit message or should note the reason (mod_python beeing no longer developed and too old) with a link to, e.g., https://en.wikipedia.org/wiki/Mod_python. I see that after all 4 commits, frontend.OptionParser is still present (is it also fully backwards compatible?) Would it be feasible to have a minimal change where only the Values, Option, and OptionParser classes were based on "argparse" instead of "optparse" Then we can start moving to frontend.ArgumentParser and using "argparse" features step by step. --- ** [bugs:#441] Move from "optparse" to "argparse".** **Status:** open **Created:** Thu Jan 06, 2022 03:02 PM UTC by Günter Milde **Last Updated:** Mon Jan 17, 2022 12:42 AM UTC **Owner:** Günter Milde The optparse documentation says: > Deprecated since version 3.2: The optparse module is deprecated and will not be developed further; development will continue with the argparse module. We are currently suppressing related deprecation warnings in the test suite. After raising the Python dependency to >=3.7, now may be the right time to make the move. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |