[issue46101] argparse: using parents & subcommands, options can be ignored

2021-12-16 Thread Lucas Cimon
Lucas Cimon added the comment: The GitHub PR is ready for reviewing. -- ___ Python tracker <https://bugs.python.org/issue46101> ___ ___ Python-bugs-list mailin

[issue38584] argparse: Specifying a whitespace-only help message to a positional arg triggers an IndexError when displaying --help

2021-12-16 Thread Lucas Cimon
Lucas Cimon added the comment: This was resolved by https://github.com/python/cpython/pull/28050 -- message_count: 4.0 -> 5.0 pull_requests: +28366 status: open -> closed pull_request: https://github.com/python/cpython/pull/28050 ___ Python t

[issue46101] argparse: using parents & subcommands, options can be ignored

2021-12-16 Thread Lucas Cimon
Change by Lucas Cimon : -- keywords: +patch pull_requests: +28364 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30146 ___ Python tracker <https://bugs.python.org/issu

[issue46101] argparse: using parents & subcommands, options can be ignored

2021-12-16 Thread Lucas Cimon
New submission from Lucas Cimon : Hi! Here is some minimal code reproducing the issue: import argparse common_opts_parser = argparse.ArgumentParser(add_help=False) common_opts_parser.add_argument("--endpoint", choices=("prod", "dev"

[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2021-05-21 Thread Lucas Cimon
Lucas Cimon added the comment: Sorry, the fix was by Mathias Ettinger: elif isinstance(argument, _SubParsersAction): return '{%s}' % ','.join(map(str, argument.choices)) I submitted a PR with this patch and a corresponding unit test: https://github.com/pytho

[issue29298] argparse fails with required subparsers, un-named dest, and empty argv

2021-05-21 Thread Lucas Cimon
Change by Lucas Cimon : -- nosy: +Lucas Cimon nosy_count: 7.0 -> 8.0 pull_requests: +24884 pull_request: https://github.com/python/cpython/pull/26278 ___ Python tracker <https://bugs.python.org/issu

[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2021-05-21 Thread Lucas Cimon
Lucas Cimon added the comment: Reporting a duplicate / superseder with the following bug: parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(required=True) subparsers.add_parser('foo') parser.parse_args() Raising: TypeError: sequence item 0: expected st

[issue38584] argparse: Specifying a whitespace-only help message to a positional arg triggers an IndexError when displaying --help

2019-10-24 Thread Lucas Cimon
Lucas Cimon added the comment: Thanks for the feedbacks paul.j3 ! I totally agree it would be best to test all formatter classes. I modified the new test to do so. I think I should probably place this test somewhere else in test_argparse.py, but I'm having trouble figuring out where ex

[issue38586] logging: handlers names are not set when using fileConfig

2019-10-24 Thread Lucas Cimon
Change by Lucas Cimon : -- keywords: +patch pull_requests: +16450 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16918 ___ Python tracker <https://bugs.python.org/issu

[issue38586] logging: handlers names are not set when using fileConfig

2019-10-24 Thread Lucas Cimon
New submission from Lucas Cimon : The logging.Handler .name property is not set when the logging configuration is loaded with logging.fileConfig -- components: Library (Lib) messages: 355338 nosy: Lucas Cimon priority: normal severity: normal status: open title: logging: handlers

[issue38584] argparse: Specifying a whitespace-only help message to a positional arg triggers an IndexError when displaying --help

2019-10-24 Thread Lucas Cimon
Change by Lucas Cimon : -- keywords: +patch pull_requests: +16448 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16917 ___ Python tracker <https://bugs.python.org/issu

[issue38584] argparse: Specifying a whitespace-only help message to a positional arg triggers an IndexError when displaying --help

2019-10-24 Thread Lucas Cimon
New submission from Lucas Cimon : The test I am going to add to test_argparse.py: def test_whitespace_help(self): parser = self._get_parser() parser.add_argument( '--foo2', action='store_true', help=' ') parser.add_argu

[issue35720] Memory leak in Modules/main.c:pymain_parse_cmdline_impl when using the CLI flag

2019-01-11 Thread Lucas Cimon
New submission from Lucas Cimon : Hi. I think I have found a minor memory leak in Modules/main.c:pymain_parse_cmdline_impl. When the loop in the pymain_read_conf function in this same file calls pymain_init_cmdline_argv a 2nd time, the pymain->command buffer of wchar_t is overriden and