[v2][Python] Make generated implementation modules private
还没有人认领这个 Issue。
评估
调研方向
从 python/copilot/generated/init.py、python/copilot/rpc.py、python/copilot/session_events.py 以及生成的 rpc.py 和 session_events.py 模块开始。在更改包名或导出列表之前,追踪哪些生成的符号应当是公开的。完成的标准是实现模块为私有,且公共模块只公开预期的 API,不会意外公开生成的符号。
由索引模型根据 Issue 内容生成。
描述
https://github.com/github/copilot-sdk/blob/main/python/copilot/generated/__init__.py Makes it clear that the copilot.generated subpackage is not meant to be public:
But the subpackage doesn't start with an underscore to signify it's an implementation detail: copilot._generated.
As well, https://github.com/github/copilot-sdk/blob/main/python/copilot/rpc.py and https://github.com/github/copilot-sdk/blob/main/python/copilot/session_events.py which are meant to act as the public API potentially over-expose things. While copilot.rpc does export something explicitly:
... both files also do an import * followed by an import of __all__ from the generated code which lists everything contained in the generated code. E.g.:
exposes 330 symbols in the module:
I'm not sure if all 330 symbols are meant to be exposed, but at least copilot.generated should be made private by renaming it to copilot._generated. If all of those symbols are meant to be exposed then that one-liner in copilot.rpc might as well be removed. If they are not meant to be exposed then the import __all__ and import * should go and you can explicitly set __all__ in the exporting modules.
- 主要语言
- Java
- 星标
- 10.5k
- 派生
- 1.5k
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 130
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/copilot-sdk 的其他 Issue
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 65/100
github/copilot-sdk#2760 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
github/copilot-sdk#2759 ·
-
documentation
难度 1/5 1 小时以内 新手友好度 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 68/100
github/copilot-sdk#2709 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 78/100
github/copilot-sdk#2673 ·
查看 github/copilot-sdk 的全部 Issue
相似的 Issue
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
apache/flink-agents#1152 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100
jenkinsci/blueocean-plugin#5417 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
objectionary/eo-graphs#75 ·