Commit 7294566
committed
fix: recurse into tuples in deepcopy_minimal to prevent mutation
deepcopy_minimal only copied dicts and lists, leaving tuples
as-is. When a FileTypes tuple like (name, content, mime, headers)
was passed to files.beta.upload, the headers Mapping inside the
tuple could be mutated in-place, corrupting the caller's data.
Fixes #12021 parent fbbc757 commit 7294566
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| 192 | + | |
| 193 | + | |
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
| |||
0 commit comments