Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Add fundamental types to resolvers

未关闭
#1,959 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
devtools

调研方向

从 src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_xml.py 第 41 行附近的默认 resolver 定义开始。检查现有内置集合类型的选择方式,然后将该行为与 collections.abc.Mapping、Sequence 和 Set 以及 issue 中提到的其他基础类型进行比较。完成的标准是:默认值反映预期的 Python 基础类型,而不是内置类型的任意子集。

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

描述

enhancement

seems like the actual types that define Python behavior like collections.abc.Mapping are missing from the default resolvers, and instead some random collection of builtin types is there:

https://github.com/microsoft/debugpy/blob/6cbdf8767e4c88dfaedf3db7b09ce2781496fc51/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_xml.py#L41

I say “random” because MappingProxyType, KeysView, … are just as fundamental Python types that are used whenever something as basic as a class is encountered so I can’t think of a reason why they shouldn’t be there when dict is, let alone some Django classes and other stuff!

But as initially said: Python’s behavior is actually defined by collections.abc.* classes, so instead of having random builtin sequences like list, frozenset, … in the defaults, why not just use collections.abc.{Sequence,Mapping,Set} directly?

PS: #825 was closed because its title asked about this being possible. I know it’s possible and ask for it to be changed instead.

主要语言
Python
星标
2.5k
派生
202
平均合并
5 天 1 小时
30 天内合并 PR
1

贡献指南

打开贡献指南

从这里开始

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

microsoft/debugpy 的其他 Issue

查看 microsoft/debugpy 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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