base64 pre-config option
还没有人认领这个 Issue。
评估
调研方向
Start by reading cattrs.preconf.json.make_converter() and cattrs.preconf.ujson.make_converter(), then trace how their Base85 handling is configured. Check the surrounding preconfigured converter code and existing tests, if present; done means the requested Base64 configuration is available consistently for both entry points and its behavior is covered.
由索引模型根据 Issue 内容生成。
描述
- cattrs version: 23.2.3
- Python version: 3.11
- Operating System: Linux
Description
cattrs.preconf.json.make_converter() and cattrs.preconf.ujson.make_converter() use Base85.
While this is more efficient, it's bad for interop in the sense that base64 is much more common. (eg, both Browsers and Node have it built-in.) (Yes, Base85 code can be found for basically any language, but you can often assume that Base64 will be standard library.)
What I Did
try:
from cattrs.preconf.ujson import make_converter
except ImportError:
from cattrs.preconf.json import make_converter
converter = make_converter()
- 主要语言
- Python
- 星标
- 1.1k
- 派生
- 159
- 平均合并
- 12 小时 21 分钟
- 30 天内合并 PR
- 6
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python-attrs/cattrs 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
python-attrs/cattrs#761 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 64/100
python-attrs/cattrs#513 · 4 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 35/100
python-attrs/cattrs#779 ·
-
难度 3/5 1-2 天 新手友好度 85/100
python-attrs/cattrs#774 ·
-
难度 5/5 一周以上 新手友好度 35/100
python-attrs/cattrs#746 · 2 条评论 ·
查看 python-attrs/cattrs 的全部 Issue
相似的 Issue
-
agent-ready documentation needs-triage
难度 1/5 1-3 小时 新手友好度 88/100
-
documentation
难度 1/5 1 小时以内 新手友好度 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
instance instance add
难度 1/5 1 小时以内 新手友好度 72/100
searxng/searx-instances#939 · 1 条评论 ·
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100