python / python/cpython

argparse does not preserve namespace with subparser defaults

未关闭
#89,398 23 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

3.12 stdlib type-bug
主要语言
Python
星标
77.2k
派生
36k
平均合并
1 天 9 小时
30 天内合并 PR
558

描述

BPO 45235
Nosy @rhettinger, @ambv, @pablogsal, @miss-islington, @FrostMing, @RhinosF1, @ALSchwalm, @dgw, @lwalejko
PRs
  • python/cpython#28420
  • python/cpython#28442
  • python/cpython#28443
  • python/cpython#29525
  • python/cpython#29530
  • python/cpython#29531
  • python/cpython#29574
  • python/cpython#30219
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2021-09-17.14:58:54.103>
    labels = ['type-bug', '3.8', '3.9', '3.10', '3.11', '3.7', 'library']
    title = 'argparse does not preserve namespace with subparser defaults'
    updated_at = <Date 2021-12-22.19:20:37.779>
    user = 'https://github.com/ALSchwalm'
    

    bugs.python.org fields:

    activity = <Date 2021-12-22.19:20:37.779>
    actor = 'gvanrossum'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2021-09-17.14:58:54.103>
    creator = 'ALSchwalm'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45235
    keywords = ['patch']
    message_count = 23.0
    messages = ['402060', '402120', '402121', '402122', '404990', '404991', '405007', '405129', '406052', '406079', '406121', '406123', '406128', '406171', '406172', '406175', '406186', '406231', '406232', '406233', '406571', '406814', '408991']
    nosy_count = 10.0
    nosy_names = ['rhettinger', 'lukasz.langa', 'paul.j3', 'pablogsal', 'miss-islington', 'Frost Ming', 'RhinosF1', 'ALSchwalm', 'dgw', 'lwalejko']
    pr_nums = ['28420', '28442', '28443', '29525', '29530', '29531', '29574', '30219']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45235'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8', 'Python 3.9', 'Python 3.10', 'Python 3.11']
    

    贡献指南

    打开贡献指南

    从这里开始

    1. 先读完整个 Issue,再读项目的贡献指南。
    2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
    3. Fork 仓库,在一个分支上完成修改。
    4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

    调研方向

    该 issue 提到了 argparse 子解析器,但没有提供源文件、测试、复现步骤或预期结果。首先检查 argparse 对子解析器 namespace 的处理,以及现有的 PR 28420、28442、28443、29525、29530、29531、29574 和 30219;当报告的 namespace 行为得到修正并由适当的测试覆盖时,即视为完成。

    由索引模型根据 Issue 内容生成。

    评估

    技术栈
    python
    领域
    cli
    Issue 类型
    缺陷
    难度
    4/5
    预计耗时
    3-5 天
    活跃度
    停滞
    描述清晰度
    需要澄清
    新手友好度
    25/100

    把新 issue 发到你的邮箱

    精选适合新手参与的 GitHub issue 摘要。