Uppercase "UTF-8" encoding name no longer works in CircuitPython 11
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- embedded-iot
調査の方向性
The payload names no source files. Start from the encoding check that micropython/micropython#18854 and #19474 introduced, which accepts only utf-8, utf8 and ascii exactly, and reproduce with bytes("hi", "UTF-8") on a CircuitPython 11 build. The open question is whether the core should match names case-insensitively or the libraries should change, so settle that with the maintainers before writing a patch. Done means the chosen behaviour is agreed and "UTF-8" either encodes correctly or is documented as unsupported.
索引モデルが issue の本文から書いたものです。
説明
Passing "UTF-8" as an encoding raises LookupError on CircuitPython 11.
It worked on 10.x and works in CPython.
>>> bytes("hi", "utf-8")
b'hi'
>>> bytes("hi", "UTF-8")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
LookupError: unknown encoding: UTF-8
>>> "hi".encode("UTF-8")
LookupError: unknown encoding: UTF-8
| Board | Version | "UTF-8" |
|---|---|---|
| Feather RP2040 RFM | 11.0.0-alpha.1 | LookupError |
| Fruit Jam | 11.0.0-alpha.1-71-g36a5653882 | LookupError |
| Metro RP2350 | 11.0.0-alpha.0-22-g4453bba9a1 | LookupError |
| (10.3.x source) | no encoding check |
The check came from micropython/micropython#18854 and micropython/micropython#19474, which accept only utf-8, utf8 and ascii exactly.
It breaks 9 of the 14 examples in adafruit/Adafruit_CircuitPython_RFM#26, and code search finds about 340 adafruit Python files using "UTF-8").
Should CircuitPython match encoding names case-insensitively, or should we fix the libraries?
Found with help from Claude Code. The REPL output is from the boards above.
- 主要言語
- C
- スター
- 4.6k
- フォーク
- 1.4k
- 平均マージ
- 23時間 40分
- マージ済み PR(30日)
- 167
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
adafruit/circuitpython のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
adafruit/circuitpython#11606 ·
メンテナーはふだん 1 日以内に返信
-
busio zephyr
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
adafruit/circuitpython#11605 ·
メンテナーはふだん 1 日以内に返信
-
busio zephyr
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
adafruit/circuitpython#11604 ·
メンテナーはふだん 1 日以内に返信
-
busio zephyr
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
adafruit/circuitpython#11603 ·
メンテナーはふだん 1 日以内に返信
-
busio zephyr
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
adafruit/circuitpython#11602 ·
メンテナーはふだん 1 日以内に返信
adafruit/circuitpython の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
test/command failure with filtered `listxattr` syscall対応中かも @Kiskae が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100