Commit 96e030b
committed
fix: ensure BodyPartReader.read() returns bytes instead of bytearray
The read() method's return type annotation promises bytes, but both
the decoded and raw paths returned the internal bytearray buffer.
This caused TypeError with json.dumps and other serializers that
don't accept bytearray.
Convert both return values to bytes() to match the documented API.1 parent b0601d6 commit 96e030b
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
326 | | - | |
| 325 | + | |
| 326 | + | |
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| |||
0 commit comments