[Enhancement] Add a Clear method to the Message class for compatibility.
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
调研方向
从抽象的 Message 类以及现有的 parse 和默认值逻辑开始;将它们的行为与标准 protobuf 进行比较,包括用户定义的默认值。当 clear 方法将所有字段重置为其默认值,并支持 #323 和 #336 中描述的兼容性工作时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
When converting existing code to use this module over standard protobuf, one issue raised was the lack of ParseFromString. This has already been mentioned at #323, with a PR in the works at #336. However, this is blocked because it does not perform the same calls as the standard, namely, Clear. In my use of this module, i have worked around this issue by simply creating a new instance (which is always the default) instead of using an existing one, at which point just calling parse works fine.
Ideally, we'd need a clear function (preferably lowercase to match python syntax, but might want TitleCase for compatibility) on the abstract Message class and an implementation that resets all fields to their default values. We'd need to confirm that our implementation matches standard protobuf when it comes to user-defined default values.
to be clear, this isn't a bug, and it doesn't prevent the use of this module.
I'd look into addressing this myself but the logic used to set default values eludes me, at least at first glance.
- 主要语言
- Python
- 星标
- 1.8k
- 派生
- 235
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
danielgtaylor/python-betterproto 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 55/100
-
难度 5/5 一周以上 新手友好度 15/100
-
bug investigation needed
难度 3/5 1-2 天 新手友好度 42/100
-
bug investigation needed
难度 3/5 1-2 天 新手友好度 45/100
-
bug investigation needed
难度 4/5 3-5 天 新手友好度 38/100
danielgtaylor/python-betterproto#676 · 3 条评论 ·
查看 danielgtaylor/python-betterproto 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
CLIMADA-project/climada_python#1337 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
8go/matrix-commander#233 ·
-
documentation
难度 2/5 1-3 小时 新手友好度 66/100
-
documentation enhancement priority:high size:M
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Validate non-divisible effective batch sizes in the Unsloth LoRA backend可能已有人在做 @debesh-biswas 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100