Expand payload types for `email.message.Message.set_payload`
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Feature or enhancement
Proposal:
While working on bug in PR #136071 we (me and @picnixz) discussed that set_payload of email.message.Message method could use list, str, bytes or handle buffer objects as payload to set.
For now it using duck type for objects with decode and encode methods. https://github.com/python/cpython/blob/main/Lib/email/message.py#L335-L353
I guess we need to decide necessary of it and if so the types that need to be support. Also update typing in typeshed for email.message.Message
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
#134759
#136071
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、335~353 行付近の Lib/email/message.py と、#134759 および #136071 にリンクされている議論を読んでください。サポートされている payload 型を判断し、typeshed の email.message.Message の typing を更新してください。型に関する判断が解決され、ランタイムの動作とアノテーションの両方にそれが反映されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- backend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100